net: add new netdevice feature for offload of RX port for UDP tunnels
This adds a new netdevice feature, so that the offloading of RX port for UDP tunnels can be disabled by the administrator on some netdevices, using the "rx-udp_tunnel-port-offload" feature in ethtool. This feature is set for all devices that provide ndo_udp_tunnel_add. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5b861f6baa
commit
d764a122cc
@ -7530,6 +7530,12 @@ int register_netdevice(struct net_device *dev)
|
||||
*/
|
||||
dev->hw_features |= NETIF_F_SOFT_FEATURES;
|
||||
dev->features |= NETIF_F_SOFT_FEATURES;
|
||||
|
||||
if (dev->netdev_ops->ndo_udp_tunnel_add) {
|
||||
dev->features |= NETIF_F_RX_UDP_TUNNEL_PORT;
|
||||
dev->hw_features |= NETIF_F_RX_UDP_TUNNEL_PORT;
|
||||
}
|
||||
|
||||
dev->wanted_features = dev->features & dev->hw_features;
|
||||
|
||||
if (!(dev->flags & IFF_LOOPBACK))
|
||||
|
Reference in New Issue
Block a user