[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190607160857.23a31e98@cakuba.netronome.com>
Date: Fri, 7 Jun 2019 16:08:57 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: 양유석 <ileixe@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: How net_device feature flag of 'tx-udp_tnl-segmetnation' is
decided?
On Fri, 7 Jun 2019 15:56:48 +0900, 양유석 wrote:
> Hi netdev!
>
> I'm kernel newbie and I'm not sure it's right place to ask though, if
> not please let me know the right place. :)
>
> I sent this mail to ask about net_device interface feature called
> 'tx-udp_tnl-segmentation'. Ethtool does not appear correct status of
> offloading, even if the vxlan offloading is enabled. Ethtool show like
> below for vxlan interface.
>
> deploy@...ne-pg1-com1000:~$ ethtool --show-offload vxlan100
> Features for vxlan100:
> tx-udp_tnl-segmentation: off [fixed]
>
> deploy@...ne-pg1-com1000:~$ ethtool --show-offload eth0
> Features for eth0:
> tx-udp_tnl-csum-segmentation: on
>
> Tcpdumping show offload is correctly applied in vxlan interface, so I
> wonder this is bug for vxlan implementation. I found
> drivers/net/vxlan.c does not set the feature SKB_GSO_UDP_TUNNEL, just
> applying the flag at creation time. Is it bug or something that I
> misunderstood?
The flag is set on the lower interface, not on the tunnel interface.
It means that the interface can perform TCP segmentation over a UDP
header.
IOW packet gets generated by the TCP code and it gets tagged as
requiring normal segmentation (tx-tcp-segmentation). It then
reaches the vxlan0 device - since the packet only requires normal
segmentation at this point the "tx-udp_tnl-segmentation" feature isn't
checked. When the packet passes through the VXLAN device it is
additionally tagged as requiring segmentation over UDP. Now whatever
the packet arrives at next needs to have "tx-udp_tnl-segmentation"
offload, otherwise the kernel will perform segmentation in software.
HTH
Powered by blists - more mailing lists