From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jacob Keller <jacob.e.keller@intel.com>,
Anthony Nguyen <anthony.l.nguyen@intel.com>
Cc: david.zage@intel.com, rodrigo.cadore@l-acoustics.com,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Jacob Keller <jacob.e.keller@intel.com>,
Christopher S M Hall <christopher.s.hall@intel.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Mor Bar-Gabay <morx.bar.gabay@intel.com>,
Avigail Dahan <avigailx.dahan@intel.com>,
Corinna Vinschen <vinschen@redhat.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v4 0/6] igc: Fix PTM timeout
Date: Thu, 10 Apr 2025 16:44:35 -0700 [thread overview]
Message-ID: <87y0w74m58.fsf@intel.com> (raw)
In-Reply-To: <20250401-jk-igc-ptm-fixes-v4-v4-0-c0efb82bbf85@intel.com>
Hi,
Jacob Keller <jacob.e.keller@intel.com> writes:
> There have been sporadic reports of PTM timeouts using i225/i226 devices
>
> These timeouts have been root caused to:
>
> 1) Manipulating the PTM status register while PTM is enabled and triggered
> 2) The hardware retrying too quickly when an inappropriate response is
> received from the upstream device
>
> The issue can be reproduced with the following:
>
> $ sudo phc2sys -R 1000 -O 0 -i tsn0 -m
>
> Note: 1000 Hz (-R 1000) is unrealistically large, but provides a way to
> quickly reproduce the issue.
>
> PHC2SYS exits with:
>
> "ioctl PTP_OFFSET_PRECISE: Connection timed out" when the PTM transaction
> fails
>
> The first patch in this series also resolves an issue reported by Corinna
> Vinschen relating to kdump:
>
> This patch also fixes a hang in igc_probe() when loading the igc
> driver in the kdump kernel on systems supporting PTM.
>
> The igc driver running in the base kernel enables PTM trigger in
> igc_probe(). Therefore the driver is always in PTM trigger mode,
> except in brief periods when manually triggering a PTM cycle.
>
> When a crash occurs, the NIC is reset while PTM trigger is enabled.
> Due to a hardware problem, the NIC is subsequently in a bad busmaster
> state and doesn't handle register reads/writes. When running
> igc_probe() in the kdump kernel, the first register access to a NIC
> register hangs driver probing and ultimately breaks kdump.
>
> With this patch, igc has PTM trigger disabled most of the time,
> and the trigger is only enabled for very brief (10 - 100 us) periods
> when manually triggering a PTM cycle. Chances that a crash occurs
> during a PTM trigger are not zero, but extremly reduced.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> Changes in v4:
> - Jacob taking over sending v4 due to lack of time on Chris's part.
> - Updated commit messages based on review feedback from v3
> - Updated commit titles to slightly more imperative wording
> - Link to v3: https://lore.kernel.org/r/20241106184722.17230-1-christopher.s.hall@intel.com
> Changes in v3:
> - Added mutex_destroy() to clean up PTM lock.
> - Added missing checks for PTP enabled flag called from igc_main.c.
> - Cleanup PTP module if probe fails.
> - Wrap all access to PTM registers with PTM lock/unlock.
> - Link to v2: https://lore.kernel.org/netdev/20241023023040.111429-1-christopher.s.hall@intel.com/
> Changes in v2:
> - Removed patch modifying PTM retry loop count.
> - Moved PTM mutex initialization from igc_reset() to igc_ptp_init(), called
> once during igc_probe().
> - Link to v1: https://lore.kernel.org/netdev/20240807003032.10300-1-christopher.s.hall@intel.com/
>
> ---
> Christopher S M Hall (6):
> igc: fix PTM cycle trigger logic
> igc: increase wait time before retrying PTM
> igc: move ktime snapshot into PTM retry loop
> igc: handle the IGC_PTP_ENABLED flag correctly
> igc: cleanup PTP module if probe fails
> igc: add lock preventing multiple simultaneous PTM transactions
>
For the series:
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cheers,
--
Vinicius
WARNING: multiple messages have this Message-ID (diff)
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jacob Keller <jacob.e.keller@intel.com>,
Anthony Nguyen <anthony.l.nguyen@intel.com>
Cc: david.zage@intel.com, rodrigo.cadore@l-acoustics.com,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
Jacob Keller <jacob.e.keller@intel.com>,
Christopher S M Hall <christopher.s.hall@intel.com>,
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Mor Bar-Gabay <morx.bar.gabay@intel.com>,
Avigail Dahan <avigailx.dahan@intel.com>,
Corinna Vinschen <vinschen@redhat.com>
Subject: Re: [PATCH iwl-net v4 0/6] igc: Fix PTM timeout
Date: Thu, 10 Apr 2025 16:44:35 -0700 [thread overview]
Message-ID: <87y0w74m58.fsf@intel.com> (raw)
In-Reply-To: <20250401-jk-igc-ptm-fixes-v4-v4-0-c0efb82bbf85@intel.com>
Hi,
Jacob Keller <jacob.e.keller@intel.com> writes:
> There have been sporadic reports of PTM timeouts using i225/i226 devices
>
> These timeouts have been root caused to:
>
> 1) Manipulating the PTM status register while PTM is enabled and triggered
> 2) The hardware retrying too quickly when an inappropriate response is
> received from the upstream device
>
> The issue can be reproduced with the following:
>
> $ sudo phc2sys -R 1000 -O 0 -i tsn0 -m
>
> Note: 1000 Hz (-R 1000) is unrealistically large, but provides a way to
> quickly reproduce the issue.
>
> PHC2SYS exits with:
>
> "ioctl PTP_OFFSET_PRECISE: Connection timed out" when the PTM transaction
> fails
>
> The first patch in this series also resolves an issue reported by Corinna
> Vinschen relating to kdump:
>
> This patch also fixes a hang in igc_probe() when loading the igc
> driver in the kdump kernel on systems supporting PTM.
>
> The igc driver running in the base kernel enables PTM trigger in
> igc_probe(). Therefore the driver is always in PTM trigger mode,
> except in brief periods when manually triggering a PTM cycle.
>
> When a crash occurs, the NIC is reset while PTM trigger is enabled.
> Due to a hardware problem, the NIC is subsequently in a bad busmaster
> state and doesn't handle register reads/writes. When running
> igc_probe() in the kdump kernel, the first register access to a NIC
> register hangs driver probing and ultimately breaks kdump.
>
> With this patch, igc has PTM trigger disabled most of the time,
> and the trigger is only enabled for very brief (10 - 100 us) periods
> when manually triggering a PTM cycle. Chances that a crash occurs
> during a PTM trigger are not zero, but extremly reduced.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> Changes in v4:
> - Jacob taking over sending v4 due to lack of time on Chris's part.
> - Updated commit messages based on review feedback from v3
> - Updated commit titles to slightly more imperative wording
> - Link to v3: https://lore.kernel.org/r/20241106184722.17230-1-christopher.s.hall@intel.com
> Changes in v3:
> - Added mutex_destroy() to clean up PTM lock.
> - Added missing checks for PTP enabled flag called from igc_main.c.
> - Cleanup PTP module if probe fails.
> - Wrap all access to PTM registers with PTM lock/unlock.
> - Link to v2: https://lore.kernel.org/netdev/20241023023040.111429-1-christopher.s.hall@intel.com/
> Changes in v2:
> - Removed patch modifying PTM retry loop count.
> - Moved PTM mutex initialization from igc_reset() to igc_ptp_init(), called
> once during igc_probe().
> - Link to v1: https://lore.kernel.org/netdev/20240807003032.10300-1-christopher.s.hall@intel.com/
>
> ---
> Christopher S M Hall (6):
> igc: fix PTM cycle trigger logic
> igc: increase wait time before retrying PTM
> igc: move ktime snapshot into PTM retry loop
> igc: handle the IGC_PTP_ENABLED flag correctly
> igc: cleanup PTP module if probe fails
> igc: add lock preventing multiple simultaneous PTM transactions
>
For the series:
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cheers,
--
Vinicius
next prev parent reply other threads:[~2025-04-10 23:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 23:35 [Intel-wired-lan] [PATCH iwl-net v4 0/6] igc: Fix PTM timeout Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 1/6] igc: fix PTM cycle trigger logic Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-02 10:46 ` [Intel-wired-lan] " Corinna Vinschen
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 2/6] igc: increase wait time before retrying PTM Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 3/6] igc: move ktime snapshot into PTM retry loop Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 4/6] igc: handle the IGC_PTP_ENABLED flag correctly Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-10 12:11 ` [Intel-wired-lan] " Mor Bar-Gabay
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 5/6] igc: cleanup PTP module if probe fails Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-10 12:12 ` [Intel-wired-lan] " Mor Bar-Gabay
2025-04-01 23:35 ` [Intel-wired-lan] [PATCH iwl-net v4 6/6] igc: add lock preventing multiple simultaneous PTM transactions Jacob Keller
2025-04-01 23:35 ` Jacob Keller
2025-04-10 12:14 ` [Intel-wired-lan] " Mor Bar-Gabay
2025-04-10 23:44 ` Vinicius Costa Gomes [this message]
2025-04-10 23:44 ` [PATCH iwl-net v4 0/6] igc: Fix PTM timeout Vinicius Costa Gomes
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=87y0w74m58.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=avigailx.dahan@intel.com \
--cc=christopher.s.hall@intel.com \
--cc=david.zage@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=morx.bar.gabay@intel.com \
--cc=netdev@vger.kernel.org \
--cc=rodrigo.cadore@l-acoustics.com \
--cc=vinschen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.