]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: don't flip hw_features when VXLANs are added/deleted
authorDavide Caratti <dcaratti@redhat.com>
Wed, 3 Oct 2018 13:20:58 +0000 (15:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 07:59:21 +0000 (00:59 -0700)
commit6b78ba78163927278b5f2e8751acde8543014bdb
tree9236400b15184a6d52116da13cdcd0dec1cda418
parent4b69b91dea15708c89885905945f0fcc6dfb6af6
be2net: don't flip hw_features when VXLANs are added/deleted

the be2net implementation of .ndo_tunnel_{add,del}() changes the value of
NETIF_F_GSO_UDP_TUNNEL bit in 'features' and 'hw_features', but it forgets
to call netdev_features_change(). Moreover, ethtool setting for that bit
can potentially be reverted after a tunnel is added or removed.

GSO already does software segmentation when 'hw_enc_features' is 0, even
if VXLAN offload is turned on. In addition, commit 742fac765a2d ("benet:
stricter vxlan offloading check in be_features_check") avoids hardware
segmentation of non-VXLAN tunneled packets, or VXLAN packets having wrong
destination port. So, it's safe to avoid flipping the above feature on
addition/deletion of VXLAN tunnels.

Fixes: 54bca705260c ("be2net: Export tunnel offloads only when a VxLAN tunnel is created")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c