From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: Chwee-Lin Choong <chwee.lin.choong@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Avi Shalev <avi.shalev@intel.com>,
Song Yoong Siang <yoong.siang.song@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v3] igc: fix race condition in TX timestamp read for register 0
Date: Thu, 27 Nov 2025 20:26:18 +0100 [thread overview]
Message-ID: <ee934ba9-8ed8-4938-8058-ac80d88dafc9@linux.intel.com> (raw)
In-Reply-To: <20251127151137.2883-1-chwee.lin.choong@intel.com>
On 2025-11-27 4:11 PM, Chwee-Lin Choong wrote:
> The current HW bug workaround checks the TXTT_0 ready bit first,
> then reads TXSTMPL_0 twice (before and after reading TXSTMPH_0)
> to detect whether a new timestamp was captured by timestamp
> register 0 during the workaround.
>
> This sequence has a race: if a new timestamp is captured after
> checking the TXTT_0 bit but before the first TXSTMPL_0 read, the
> detection fails because both the “old” and “new” values come from
> the same timestamp.
>
> Fix by reading TXSTMPL_0 first to establish a baseline, then
> checking the TXTT_0 bit. This ensures any timestamp captured
> during the race window will be detected.
>
> Old sequence:
> 1. Check TXTT_0 ready bit
> 2. Read TXSTMPL_0 (baseline)
> 3. Read TXSTMPH_0 (interrupt workaround)
> 4. Read TXSTMPL_0 (detect changes vs baseline)
>
> New sequence:
> 1. Read TXSTMPL_0 (baseline)
> 2. Check TXTT_0 ready bit
> 3. Read TXSTMPH_0 (interrupt workaround)
> 4. Read TXSTMPL_0 (detect changes vs baseline)
>
> Fixes: c789ad7cbebc ("igc: Work around HW bug causing missing timestamps")
> Suggested-by: Avi Shalev <avi.shalev@intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
...
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> Signed-off-by: Chwee-Lin Choong <chwee.lin.choong@intel.com>
I don't understand the double sign-off here. Did Song Yoong Siang
co-develop this fix or you are upstreaming a change they made somewhere
else?
Please take a look at the documentation [1] regarding signing your work,
especially the use of Co-developed-by tags in case there were multiple
authors and/or proper From tag if you are submitting on someone's behalf.
[1]
https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
Best regards,
Dawid
prev parent reply other threads:[~2025-11-27 19:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 15:11 [Intel-wired-lan] [PATCH iwl-net v3] igc: fix race condition in TX timestamp read for register 0 Chwee-Lin Choong
2025-11-27 19:26 ` Dawid Osuchowski [this message]
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=ee934ba9-8ed8-4938-8058-ac80d88dafc9@linux.intel.com \
--to=dawid.osuchowski@linux.intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=avi.shalev@intel.com \
--cc=chwee.lin.choong@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=richardcochran@gmail.com \
--cc=vinicius.gomes@intel.com \
--cc=yoong.siang.song@intel.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