On 1/14/26 7:07 PM, Eric Dumazet wrote:
quoted
diff --git a/net/core/dev.c b/net/core/dev.c
index c711da335510..6154f306ed76 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3788,8 +3788,10 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb,
struct iphdr *iph = skb->encapsulation ?
inner_ip_hdr(skb) : ip_hdr(skb);
- if (!(iph->frag_off & htons(IP_DF)))
+ if (!(iph->frag_off & htons(IP_DF))) {
features &= ~NETIF_F_TSO_MANGLEID;
Nit : We could avoid the above line, if we always make sure
NETIF_F_TSO_MANGLEID is set in dev->mangleid_features
I thinks it makes a lot of sense. register_netdevice() could ensure such
this constraint is respected; I'll add the following in the next
iteration and I will update the chunk here accordingly.
Thanks!
Paolo
---
diff --git a/net/core/dev.c b/net/core/dev.c
index c711da335510..a028ef1a3bcf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -11372,6 +11372,12 @@ int register_netdevice(struct net_device *dev)
if (dev->hw_enc_features & NETIF_F_TSO)
dev->hw_enc_features |= NETIF_F_TSO_MANGLEID;
+ /* Any mangleid feature disables TSO_MANGLEID; including the latter
+ * in mangleid_features allows for better code in the fastpath.
+ */
+ if (dev->mangleid_features)
+ dev->mangleid_features |= NETIF_F_TSO_MANGLEID;
+
/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
*/
dev->vlan_features |= NETIF_F_HIGHDMA;