[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0Uc7_QSDu05ZmbHuKOM1KTu38ORoQJfPFQOTKBkdOzczsg@mail.gmail.com>
Date: Fri, 4 May 2018 07:22:17 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Netdev <netdev@...r.kernel.org>,
Willem de Bruijn <willemb@...gle.com>,
David Miller <davem@...emloft.net>,
Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [net-next PATCH 3/5] udp: Add support for software checksum and
GSO_PARTIAL with GSO offload
On Thu, May 3, 2018 at 8:50 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>
>
> On 05/03/2018 05:33 PM, Alexander Duyck wrote:
>> From: Alexander Duyck <alexander.h.duyck@...el.com>
>>
>> This patch adds support for a software provided checksum and GSO_PARTIAL
>> segmentation support. With this we can offload UDP segmentation on devices
>> that only have partial support for tunnels.
>>
>> Since we are no longer needing the hardware checksum we can drop the checks
>> in the segmentation code that were verifying if it was present.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>
>> ---
>> net/ipv4/udp_offload.c | 28 ++++++++++++++++++----------
>> net/ipv6/udp_offload.c | 11 +----------
>> 2 files changed, 19 insertions(+), 20 deletions(-)
>>
>> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
>> index 946d06d2aa0c..fd94bbb369b2 100644
>> --- a/net/ipv4/udp_offload.c
>> +++ b/net/ipv4/udp_offload.c
>> @@ -217,6 +217,13 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
>> return segs;
>> }
>>
>> + /* GSO partial and frag_list segmentation only requires splitting
>> + * the frame into an MSS multiple and possibly a remainder, both
>> + * cases return a GSO skb. So update the mss now.
>> + */
>> + if (skb_is_gso(segs))
>> + mss *= skb_shinfo(segs)->gso_segs;
>> +
>>
>
> I do not understand this code.
In the case of GSO partial or frag_list segmentation we only split
along certain MSS sized boundaries and we leave the resulting frame as
a GSO skb. As a result the actual frame size is a multiple of MSS so
we were updating the mss by that value.
> I am also seeing it in tcp, after commit 07b26c9454a2a ("gso: Support partial splitting at the frag_list pointer")
>
> Presumably this broke tcp_gso_tstamp() , right ?
I'm not sure it did. The MSS multiplication is there because the frame
now spans multiple MSS chunks in one shot. So tcp_gso_tstamp should
still have the correct behavior, I think.
- Alex
Powered by blists - more mailing lists