netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: tanhuazhong <tanhuazhong@huawei.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	davem@davemloft.net, willemb@google.com
Cc: netdev@vger.kernel.org, linuxarm@huawei.com, kuba@kernel.org
Subject: Re: [RFC net-next 1/2] udp: add NETIF_F_GSO_UDP_L4 to NETIF_F_SOFTWARE_GSO
Date: Wed, 8 Jul 2020 19:28:35 -0700	[thread overview]
Message-ID: <a71eaf51-eb05-f812-e1f9-f92ce55f5379@gmail.com> (raw)
In-Reply-To: <8af4dce7-f2a0-286a-bb5b-36c66d05c0f3@huawei.com>



On 7/8/20 7:16 PM, tanhuazhong wrote:
> 
> 
> On 2020/7/8 13:26, Eric Dumazet wrote:
>>
>>
>> On 7/7/20 8:48 PM, Huazhong Tan wrote:
>>> Add NETIF_F_SOFTWARE_GSO to the the list of GSO features with
>>
>>
>> s/NETIF_F_SOFTWARE_GSO/NETIF_F_GSO_UDP_L4/
>>
> 
> yes, thanks.
> 
>>> a software fallback.  This allows UDP GSO to be used even if
>>> the hardware does not support it, and for virtual device such
>>> as VxLAN device, this UDP segmentation will be postponed to
>>> physical device.
>>
>> Is GSO stack or hardware USO able to perform this segmentation,
>> with vxlan (or other) added encapsulation ?
>>
> 
> I have tested this patch with vxlan and vlan in i40e, the driver
> of vxlan and vlan uses  NETIF_F_SOFTWARE_GSO.
> case 1:
> tx-udp-segmentation of virtual device and i40e is on, then the
> UDP GSO is handled by hardware.
> case 2:
> tx-udp-segmentation of virual device is on, i40e is off, then
> the UDP GSO is handled between xmit of virtual device and physical device.
> case 3:
> tx-udp-segmentation of virtual device and i40e is off, then
> the UDP GSO is handled before calling virtual device's xmit.
> 
> the packet captured on receiver is same for the above cases.
> so the behavior of UDP is similar to TCP (which has already been supported)?
> 
>> What about code in net/core/tso.c (in net-next tree) ?
>>
> 
> by reading the code, i can not find anything related to the
> tunnel header. Is there any way to verify it?
>

TSO is supposed to be native ipv4 + TCP
TSO6 is supposed to be native ipv6 + TCP


Variants with added encapsulation need other GSO bits
(SKB_GSO_GRE, SKB_GSO_IPXIP4, SKB_GSO_IPXIP6 ...)

net/core/tso.c does not yet support the variants. Only native TCP/UDP

I do not see vxlan adding a bit in gso_type, so I am kind-of-confused.




  reply	other threads:[~2020-07-09  2:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  3:48 [RFC net-next 0/2] net: two updates related to UDP GSO Huazhong Tan
2020-07-08  3:48 ` [RFC net-next 1/2] udp: add NETIF_F_GSO_UDP_L4 to NETIF_F_SOFTWARE_GSO Huazhong Tan
2020-07-08  5:26   ` Eric Dumazet
2020-07-09  2:16     ` tanhuazhong
2020-07-09  2:28       ` Eric Dumazet [this message]
2020-07-08 12:11   ` Willem de Bruijn
2020-07-09  2:49     ` tanhuazhong
2020-07-09 13:34       ` Willem de Bruijn
2020-07-08  3:48 ` [RFC net-next 2/2] net: disable UDP GSO feature when CSUM is disabled Huazhong Tan
2020-07-08  5:36   ` Eric Dumazet
2020-07-09  2:30     ` tanhuazhong
2020-07-09  2:47       ` Eric Dumazet
2020-07-09  2:55         ` tanhuazhong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a71eaf51-eb05-f812-e1f9-f92ce55f5379@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=tanhuazhong@huawei.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).