From: "naamax.meir" <naamax.meir@linux.intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
intel-wired-lan@lists.osuosl.org
Cc: vladimir.oltean@nxp.com, kurt@linutronix.de, anthony.l.nguyen@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v4 4/4] igc: Work around HW bug causing missing timestamps
Date: Thu, 22 Jun 2023 11:59:51 +0300 [thread overview]
Message-ID: <7a4885d3-d977-436c-f298-e29ef199d49e@linux.intel.com> (raw)
In-Reply-To: <20230607213232.875138-5-vinicius.gomes@intel.com>
On 6/8/2023 00:32, Vinicius Costa Gomes wrote:
> There's an hardware issue that can cause missing timestamps. The bug
> is that the interrupt is only cleared if the IGC_TXSTMPH_0 register is
> read.
>
> The bug can cause a race condition if a timestamp is captured at the
> wrong time, and we will miss that timestamp. To reduce the time window
> that the problem is able to happen, in case no timestamp was ready, we
> read the "previous" value of the timestamp registers, and we compare
> with the "current" one, if it didn't change we can be reasonably sure
> that no timestamp was captured. If they are different, we use the new
> value as the captured timestamp.
>
> The HW bug is not easy to reproduce, got to reproduce it when smashing
> the NIC with timestamping requests from multiple applications (e.g.
> multiple ntpperf instances + ptp4l), after 10s of minutes.
>
> This workaround has more impact when multiple timestamp registers are
> used, and the IGC_TXSTMPH_0 register always need to be read, so the
> interrupt is cleared.
>
> Fixes: 2c344ae24501 ("igc: Add support for TX timestamping")
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc_ptp.c | 48 ++++++++++++++++++------
> 1 file changed, 37 insertions(+), 11 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
prev parent reply other threads:[~2023-06-22 9:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 21:32 [Intel-wired-lan] [PATCH iwl-net v4 0/4] igc: TX timestamping fixes Vinicius Costa Gomes
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 1/4] igc: Fix race condition in PTP tx code Vinicius Costa Gomes
2023-06-19 7:29 ` naamax.meir
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 2/4] igc: Check if hardware TX timestamping is enabled earlier Vinicius Costa Gomes
2023-06-20 6:54 ` naamax.meir
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 3/4] igc: Retrieve TX timestamp during interrupt handling Vinicius Costa Gomes
2023-06-20 19:02 ` naamax.meir
2023-06-07 21:32 ` [Intel-wired-lan] [PATCH iwl-net v4 4/4] igc: Work around HW bug causing missing timestamps Vinicius Costa Gomes
2023-06-22 8:59 ` naamax.meir [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=7a4885d3-d977-436c-f298-e29ef199d49e@linux.intel.com \
--to=naamax.meir@linux.intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kurt@linutronix.de \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.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