[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DA2674DE-A4F4-4375-9E22-121E76C95830@intel.com>
Date: Wed, 20 Jan 2016 23:34:03 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: Alexander Duyck <alexander.duyck@...il.com>
CC: Tom Herbert <tom@...bertland.com>,
Edward Cree <ecree@...arflare.com>,
David Laight <David.Laight@...lab.com>,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-net-drivers@...arflare.com" <linux-net-drivers@...arflare.com>
Subject: Re: [PATCH net-next 6/8] net: gre: Implement LCO for GRE over IPv4
Alexander Duyck <alexander.duyck@...il.com> wrote:
> There isn't any need to add such an indication, nor do we need to
> start bitflipping the return value from csum_fold in all cases. I
> think there was just some confusion about UDP checksums vs GRE or TCP
> checksums.
Yeah. I think I finally got there. The naive software methods will never
generate a true 0 unless everything was zero. Real one's complement
machines did addition in terms of subtraction so that 1 + -1 would never
produce a -0, only a normal 0. Of course a simple adder would produce a -0,
making it impossible to get back to a normal 0.
> I'd say we are better off keeping this simple. The original patch
> just needs to drop the check for the resultant checksum being 0 since
> that is not needed for GRE.
I'm all in favor of simple. I had just started to worry about a possible
change in behavior that might have interoperability problems with some
implementations. I wonder if any implementation ever did the addition by
subtraction, but also failed to make 0 compare equal to -0? I guess if they
knew enough to do the former, they should not have blown the latter.
--
Mark Rustad, Networking Division, Intel Corporation
Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)
Powered by blists - more mailing lists