Skip to content
  • Davide Caratti's avatar
    be2net: don't flip hw_features when VXLANs are added/deleted · 049b662e
    Davide Caratti authored
    [ Upstream commit 2d52527e ]
    
    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 096de2f8 ("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: 630f4b70
    
     ("be2net: Export tunnel offloads only when a VxLAN tunnel is created")
    Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    049b662e