aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/netkit.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-09-03 11:38:00 +0200
committerPaolo Abeni <pabeni@redhat.com>2024-09-03 11:38:01 +0200
commitc55f34a7a1c347afc4c7adc5639c9f7b3749a922 (patch)
tree352246cbb5dab7b083fc7377b45d523b8aad68b1 /drivers/net/netkit.c
parentnet: dsa: vsc73xx: implement FDB operations (diff)
parentnetdev_features: remove NETIF_F_ALL_FCOE (diff)
downloadwireguard-linux-c55f34a7a1c347afc4c7adc5639c9f7b3749a922.tar.xz
wireguard-linux-c55f34a7a1c347afc4c7adc5639c9f7b3749a922.zip
Merge branch 'netdev_features-start-cleaning-netdev_features_t-up'
Alexander Lobakin says: ==================== netdev_features: start cleaning netdev_features_t up NETDEV_FEATURE_COUNT is currently 64, which means we can't add any new features as netdev_features_t is u64. As per several discussions, instead of converting netdev_features_t to a bitmap, which would mean A LOT of changes, we can try cleaning up netdev feature bits. There's a bunch of bits which don't really mean features, rather device attributes/properties that can't be changed via Ethtool in any of the drivers. Such attributes can be moved to netdev private flags without losing any functionality. Start converting some read-only netdev features to private flags from the ones that are most obvious, like lockless Tx, inability to change network namespace etc. I was able to reduce NETDEV_FEATURE_COUNT from 64 to 60, which mean 4 free slots for new features. There are obviously more read-only features to convert, such as highDMA, "challenged VLAN", HSR (4 bits) - this will be done in subsequent series. Please note that currently netdev features are not uAPI/ABI by any means. Ethtool passes their names and bits to the userspace separately and there are no hardcoded names/bits in the userspace, so that new Ethtool could work on older kernels and vice versa. This, however, isn't true for Ethtools < 3.4. I haven't changed the bit positions of the already existing features and instead replaced the freed bits with stubs. But it's anyway theoretically possible that Ethtools older than 2011 will break. I hope no currently supported distros supply such an ancient version. Shell scripts also most likely won't break since the removed bits were always read-only, meaning nobody would try touching them from a script. ==================== Link: https://patch.msgid.link/20240829123340.789395-1-aleksander.lobakin@intel.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/netkit.c')
-rw-r--r--drivers/net/netkit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c
index 16789cd446e9..79232f5cc088 100644
--- a/drivers/net/netkit.c
+++ b/drivers/net/netkit.c
@@ -255,11 +255,12 @@ static void netkit_setup(struct net_device *dev)
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
dev->priv_flags |= IFF_PHONY_HEADROOM;
dev->priv_flags |= IFF_NO_QUEUE;
+ dev->lltx = true;
dev->ethtool_ops = &netkit_ethtool_ops;
dev->netdev_ops = &netkit_netdev_ops;
- dev->features |= netkit_features | NETIF_F_LLTX;
+ dev->features |= netkit_features;
dev->hw_features = netkit_features;
dev->hw_enc_features = netkit_features;
dev->mpls_features = NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;