netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Intel-wired-lan] [iwl-net v2 2/2] igb: Fix missing time sync events
@ 2024-08-09  5:42 Daiwei Li
  2024-08-09 16:38 ` Vinicius Costa Gomes
  0 siblings, 1 reply; 4+ messages in thread
From: Daiwei Li @ 2024-08-09  5:42 UTC (permalink / raw)
  To: vinicius.gomes
  Cc: anthony.l.nguyen, davem, edumazet, intel-wired-lan,
	jeffrey.t.kirsher, jesse.brandeburg, kuba, kurt, linux-kernel,
	netdev, pabeni, richardcochran, sasha.neftin

Hi,

It appears this change breaks PTP on the 82580 controller, as ptp4l reports:

> timed out while polling for tx timestamp increasing tx_timestamp_timeout or
> increasing kworker priority may correct this issue, but a driver bug likely
> causes it

The 82580 controller has a hardware bug in which reading TSICR doesn't clear
it. See this thread
https://lore.kernel.org/all/CDCB8BE0.1EC2C%25matthew.vick@intel.com/ where the
bug was confirmed by an Intel employee. Any chance we could add back the ack
for 82580 specifically? Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [iwl-net v2 0/2] igc/igb: Fix missing time sync events
@ 2024-02-20 23:57 Vinicius Costa Gomes
  2024-02-20 23:57 ` [iwl-net v2 2/2] igb: " Vinicius Costa Gomes
  0 siblings, 1 reply; 4+ messages in thread
From: Vinicius Costa Gomes @ 2024-02-20 23:57 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: sasha.neftin, richardcochran, kurt, anthony.l.nguyen,
	jesse.brandeburg, netdev, Vinicius Costa Gomes

Hi,

Changes from v1:
 - Reworded cover letter and commit messages, so it's clear that the
   issue is when the same kind of event happens "twice" it might be
   ignored (Richard Cochran);

Link to v1:
https://lore.kernel.org/all/20240217010455.58258-1-vinicius.gomes@intel.com/

It was reported that i225/i226 could sometimes miss some time sync
events when two or more types of events (PPS and Timestamps were used
by the reporter) are being used at the same time under heavy traffic.

The core issue is that the driver was double clearing interrupts, as
the register is both "read to clear" and "write 1 to clear"
(documented in section 8.16.1 of the datasheet), and the handler was
doing both. Which could cause events to be missed if the same kind of
event that triggered the handler happens again between the "read" and
the "write".

Removing the write fixes the issue.

It was tracked down to commit 2c344ae24501 ("igc: Add support for TX
timestamping"), in which I added support for basic timestamp
operations, the issue is that as the hardware operates very similarly
to i210, I used igb code as inspiration. And indeed, the same double
clearing is present there.

But in the igb case, I haven't seen myself or heard about any issues
that seem related to this. So I think it's more like a possible issue.
But it seems like a good idea to fix it there was well.


Vinicius Costa Gomes (2):
  igc: Fix missing time sync events
  igb: Fix missing time sync events

 drivers/net/ethernet/intel/igb/igb_main.c | 23 +++++------------------
 drivers/net/ethernet/intel/igc/igc_main.c | 12 +-----------
 2 files changed, 6 insertions(+), 29 deletions(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-09 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09  5:42 [Intel-wired-lan] [iwl-net v2 2/2] igb: Fix missing time sync events Daiwei Li
2024-08-09 16:38 ` Vinicius Costa Gomes
2024-08-09 21:04   ` Daiwei Li
  -- strict thread matches above, loose matches on Subject: below --
2024-02-20 23:57 [iwl-net v2 0/2] igc/igb: " Vinicius Costa Gomes
2024-02-20 23:57 ` [iwl-net v2 2/2] igb: " Vinicius Costa Gomes
2024-02-27 12:04   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy

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).