[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3892a971-6f0d-405a-a938-a8439e89b329@redhat.com>
Date: Mon, 19 Jan 2026 11:13:53 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
Donald Hunter <donald.hunter@...il.com>, Andrew Lunn
<andrew+netdev@...n.ch>, Shuah Khan <shuah@...nel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>, sdf@...ichev.me,
petrm@...dia.com, razor@...ckwall.org, idosch@...dia.com
Subject: Re: [PATCH v3 net-next 01/10] net: introduce mangleid_features
On 1/14/26 7:07 PM, Eric Dumazet wrote:
>> 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;
Powered by blists - more mailing lists