summaryrefslogtreecommitdiff
path: root/include/linux/netdev_features.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-10-21 18:08:25 -0700
committerJakub Kicinski <kuba@kernel.org>2025-10-21 18:08:25 -0700
commit21e45ec8a534893ce785c906a6058c1c848710ac (patch)
tree300c9c0df6fb54d7404e5689d8c00ceb38c6f73e /include/linux/netdev_features.h
parent0364ca33097da247ef6539c765405657324f243e (diff)
parent0152747a528a185182bdb2cab973848a52d715ac (diff)
Merge branch 'net-common-feature-compute-for-upper-interface'
Hangbin Liu says: ==================== net: common feature compute for upper interface Some high-level virtual drivers need to compute features from their lower devices, but each currently has its own implementation and may miss some feature computations. This patch set introduces a common function to compute features for such devices. Currently, bonding, team, and bridge have been updated to use the new helper. ==================== Link: https://patch.msgid.link/20251017034155.61990-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/netdev_features.h')
-rw-r--r--include/linux/netdev_features.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 7a01c518e573..93e4da7046a1 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -255,6 +255,24 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
NETIF_F_GSO_UDP_TUNNEL | \
NETIF_F_GSO_UDP_TUNNEL_CSUM)
+/* virtual device features */
+#define MASTER_UPPER_DEV_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
+ NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \
+ NETIF_F_GSO_ENCAP_ALL | \
+ NETIF_F_HIGHDMA | NETIF_F_LRO)
+
+#define MASTER_UPPER_DEV_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
+ NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE | \
+ NETIF_F_GSO_PARTIAL)
+
+#define MASTER_UPPER_DEV_MPLS_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
+ NETIF_F_GSO_SOFTWARE)
+
+#define MASTER_UPPER_DEV_XFRM_FEATURES (NETIF_F_HW_ESP | NETIF_F_HW_ESP_TX_CSUM | \
+ NETIF_F_GSO_ESP)
+
+#define MASTER_UPPER_DEV_GSO_PARTIAL_FEATURES (NETIF_F_GSO_ESP)
+
static inline netdev_features_t netdev_base_features(netdev_features_t features)
{
features &= ~NETIF_F_ONE_FOR_ALL;