From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>, <netdev@vger.kernel.org>,
<eric.dumazet@gmail.com>
Subject: Re: [PATCH net] net: gro: clear skb_shinfo(skb)->hwtstamps in napi_reuse_skb()
Date: Wed, 15 Oct 2025 14:04:14 +0200 [thread overview]
Message-ID: <e24f9c99-f800-44ed-86a9-8a48739586ab@intel.com> (raw)
In-Reply-To: <20251015063221.4171986-1-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 15 Oct 2025 06:32:21 +0000
> Some network drivers assume this field is zero after napi_get_frags().
>
> We must clear it in napi_reuse_skb() otherwise the following can happen:
>
> 1) A packet is received, and skb_shinfo(skb)->hwtstamps is populated
> because a bit in the receive descriptor announced hwtstamp
> availability for this packet.
>
> 2) Packet is given to gro layer via napi_gro_frags().
>
> 3) Packet is merged to a prior one held in GRO queues.
>
> 4) skb is saved after some cleanup in napi->skb via a call
> to napi_reuse_skb().
>
> 5) Next packet is received 10 seconds later, gets the recycled skb
> from napi_get_frags().
>
> 6) The receive descriptor does not announce hwtstamp availability.
> Driver does not clear shinfo->hwtstamps.
>
> 7) We have in shinfo->hwtstamps an old timestamp.
>
> Fixes: ac45f602ee3d ("net: infrastructure for hardware time stamping")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Thanks,
Olek
next prev parent reply other threads:[~2025-10-15 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 6:32 [PATCH net] net: gro: clear skb_shinfo(skb)->hwtstamps in napi_reuse_skb() Eric Dumazet
2025-10-15 12:04 ` Alexander Lobakin [this message]
2025-10-16 22:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e24f9c99-f800-44ed-86a9-8a48739586ab@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).