[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0UdV2ruuRsYLmOjnqbXW0_i4QqMfo+VhuCSBqJjWrKhRdQ@mail.gmail.com>
Date: Sun, 1 May 2016 19:25:04 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Or Gerlitz <gerlitz.or@...il.com>
Cc: Alexander Duyck <aduyck@...antis.com>,
"talal@...lanox.com" <talal@...lanox.com>,
Linux Netdev List <netdev@...r.kernel.org>,
Michael Chan <michael.chan@...adcom.com>,
David Miller <davem@...emloft.net>,
Gal Pressman <galp@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [net-next PATCH v2 5/9] mlx4: Add support for UDP tunnel
segmentation with outer checksum offload
On Sun, May 1, 2016 at 1:35 PM, Or Gerlitz <gerlitz.or@...il.com> wrote:
> On Sat, Apr 30, 2016 at 1:43 AM, Alexander Duyck <aduyck@...antis.com> wrote:
>> This patch assumes that the mlx4 hardware will ignore existing IPv4/v6
>> header fields for length and checksum as well as the length and checksum
>> fields for outer UDP headers.
>
> Hi Alex,
>
> I see now the above text appearing in bunch of similar commit of
> yours, specifically to Intel drivers and mlx5... could you please
> elaborate a bit more what you mean here and what are the practical
> consequences of that characteristics?
>
> I got that right NETIF_F_GSO_UDP_TUNNEL_CSUM means that the HW can do
> segmentation for TCP packets encapsulated by UDP tunnel e.g VXLAN
> where the outer checksum is not zero. AFAIK, any other outer checksum
> value can't correctly be a constant... are you assuming here RCO or
> LCO?
Actually it is really easy for outer UDP checksum to be constant as
long as we keep the length of all segments constant. This all ties
back into LCO. As long as the fields between the start of the UDP
header and the start of the TCP header are either constant, as in the
case of IPv6, or have their own checksum as in the case of IPv4 we
will end up with the checksum of the outer header being constant.
So in effect as long as we can trust the hardware to segment every
frame to the specified size and that it won't insert any extra data
anywhere in that region that we aren't expecting we can guarantee that
each frame will have the same checksum for the outer UDP header.
- Alex
Powered by blists - more mailing lists