netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How net_device feature flag of 'tx-udp_tnl-segmetnation' is decided?
@ 2019-06-07  6:56 양유석
  2019-06-07 23:08 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: 양유석 @ 2019-06-07  6:56 UTC (permalink / raw)
  To: netdev

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@krane-pg1-com1000:~$ ethtool --show-offload vxlan100
Features for vxlan100:
tx-udp_tnl-segmentation: off [fixed]

deploy@krane-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?

Thanks in advance!

Best regards

Yang Youseok

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How net_device feature flag of 'tx-udp_tnl-segmetnation' is decided?
  2019-06-07  6:56 How net_device feature flag of 'tx-udp_tnl-segmetnation' is decided? 양유석
@ 2019-06-07 23:08 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2019-06-07 23:08 UTC (permalink / raw)
  To: 양유석; +Cc: netdev

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@krane-pg1-com1000:~$ ethtool --show-offload vxlan100
> Features for vxlan100:
> tx-udp_tnl-segmentation: off [fixed]
> 
> deploy@krane-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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-07 23:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-07  6:56 How net_device feature flag of 'tx-udp_tnl-segmetnation' is decided? 양유석
2019-06-07 23:08 ` Jakub Kicinski

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).