OSDN Git Service

net: gro: avoid re-computing truesize twice on recycle
authorPaolo Abeni <pabeni@redhat.com>
Fri, 4 Feb 2022 11:28:36 +0000 (12:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Feb 2022 15:13:52 +0000 (15:13 +0000)
After commit 5e10da5385d2 ("skbuff: allow 'slow_gro' for skb
carring sock reference") and commit af352460b465 ("net: fix GRO
skb truesize update") the truesize of the skb with stolen head is
properly updated by the GRO engine, we don't need anymore resetting
it at recycle time.

v1 -> v2:
 - clarify the commit message (Alexander)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gro.c

index a11b286..d43d422 100644 (file)
@@ -634,7 +634,6 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
 
        skb->encapsulation = 0;
        skb_shinfo(skb)->gso_type = 0;
-       skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
        if (unlikely(skb->slow_gro)) {
                skb_orphan(skb);
                skb_ext_reset(skb);