From: Jacob Keller <jacob.e.keller@intel.com>
To: <netdev-bot+sashiko@kernel.org>, <anthony.l.nguyen@intel.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@kernel.org>, <andrew+netdev@lunn.ch>,
<netdev@vger.kernel.org>, <poros@redhat.com>,
<maciej.machnikowski@intel.com>, <przemyslaw.korba@intel.com>,
<grzegorz.nitka@intel.com>, <sergey.temerkhanov@intel.com>,
<arkadiusz.kubalewski@intel.com>, <richardcochran@gmail.com>,
<horms@kernel.org>
Subject: Re: [PATCH net v3 07/14] ice: E822: cancel offset verification work during reset preparation
Date: Mon, 19 Oct 2026 16:40:39 -0700 [thread overview]
Message-ID: <9ea64678-991d-4bfa-89af-d97d56bb5895@intel.com> (raw)
In-Reply-To: <179244084873.3135.13916049377075971690@kernel.org>
On 10/19/2026 1:14 PM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] Possible requeue of ov_work after the new cancel (judged harmless
> and by design).
>
> --
>
> ice: E822: cancel offset verification work during reset preparation
>
> This patch cancels the E822 offset verification work (ov_work) in
> ice_ptp_prepare_for_reset(). Without the cancel, the work can keep running
> or rescheduling itself while a reset is in progress. The PHY gets
> reconfigured after the reset anyway, either by the clock owner or by
> ice_ptp_link_change() at the end of the rebuild.
>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> index 828d46a73f292..6297773806949 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> @@ -3006,6 +3006,9 @@ void ice_ptp_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
>>
>> kthread_cancel_delayed_work_sync(&ptp->port.work);
>>
>> + if (hw->mac_type == ICE_MAC_GENERIC)
>> + kthread_cancel_delayed_work_sync(&ptp->port.ov_work);
>> +
>
> [Severity: Low]
> This is a minor observation and it may well be intended. This cancel runs
> without adapter->ps_lock held, and nothing stops ov_work from being queued
> again afterwards. Can another PF queue a peer's ov_work again while that
> peer is still resetting?
>
> On a multi-PF E822 adapter, the clock owner can reach this producer for
> every port that has link_up set:
>
> ice_ptp_rebuild_owner() / ice_ptp_settime64()
> ice_ptp_restart_all_phy()
> ice_ptp_port_phy_restart(port)
> kthread_queue_delayed_work(pf->ptp.kworker, &ptp_port->ov_work, 0);
>
> ice_ptp_restart_all_phy() checks only this before restarting the peer's PHY:
>
> if (READ_ONCE(port->link_up))
> ice_ptp_port_phy_restart(port);
>
> It does not look at the peer's ptp.state or its reset state.
>
> The impact looks small. A requeued ice_ptp_wait_for_offsets() sees
> ice_is_reset_in_progress() and only reschedules, with no hardware access:
>
> if (ice_is_reset_in_progress(pf->state)) {
> /* wait for device driver to complete reset */
> kthread_queue_delayed_work(pf->ptp.kworker,
> &port->ov_work,
> msecs_to_jiffies(100));
> return;
> }
>
> Each PF's ice_rebuild() also calls ice_ptp_link_change(). That path goes
> through ice_ptp_port_phy_restart(), which cancels and requeues the work.
>
> The commit message also says the PHY is reconfigured "as part of the clock
> owner resetting", so the requeue may be the intended recalibration path. If
> so, the only effect left is a few no-op 100 ms reschedules during a reset.
>
> Is that the expected behaviour, or should the restart path skip ports whose
> PF is in reset?
>
This is intended, in the sense that we don't really have a great method
of handling sequencing here. If the main PF resets it will be modifying
the clock so it must restart each PHY to account for that reset clock.
However, each port might be resetting too and will need to restart the
PHY in order to ensure the appropriate link state. We don't currently
have a good synchronization mechanism to ensure that we wait till
everything resets and then restart all PHY... This could use a better
design of the entire reset procedure but we don't have one since each PF
is (mostly) independent. At worst I believe this results in a duplicate
PHY reset which is annoying but overall ok as long as we reset after we
know the appropriate link state.
Cancelling the work is just done to avoid wasting unnecessary CPU doing
nothing useful.
>> if (reset_type == ICE_RESET_PFR)
>> return;
>>
>
next prev parent reply other threads:[~2026-10-19 23:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 19:10 [PATCH net v3 00/14][pull request] ice: E82x: timestamp processing logic fixes Tony Nguyen
2026-10-15 19:10 ` [PATCH net v3 01/14] ice: fix removal of PTP timestamp tracker during reset Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:14 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 02/14] ice: use reference counting and SRCU for PTP port access Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:16 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 03/14] ice: fix PHY port restart serialization Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:21 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 04/14] ice: set in_use only after preparing Tx timestamp index Tony Nguyen
2026-10-15 19:10 ` [PATCH net v3 05/14] ice: call PTP link change only from link events Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:35 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 06/14] ice: E822: keep Tx timestamps disabled during offset calibration Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:37 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 07/14] ice: E822: cancel offset verification work during reset preparation Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:40 ` Jacob Keller [this message]
2026-10-15 19:10 ` [PATCH net v3 08/14] ice: E825: stop clearing PHY_REG_TX_OFFSET_READY Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:42 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 09/14] ice: E825: clear PHY_TSTAMP memory prior to soft reset Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:49 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 10/14] ice: E825: perform a soft reset when starting the PHY timer Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-19 23:57 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 11/14] ice: wait for in-flight Tx timestamps before removing the tracker Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-20 0:05 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 12/14] ice: keep Tx timestamp slots tracked until completion or timeout Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-20 0:11 ` Jacob Keller
2026-10-15 19:10 ` [PATCH net v3 13/14] ice: skip reading Tx ready bitmap on ports with no timestamps Tony Nguyen
2026-10-15 19:11 ` [PATCH net v3 14/14] ice: don't clear in_use until HW clears ready bitmap Tony Nguyen
2026-10-19 20:14 ` netdev-bot+sashiko
2026-10-20 0:18 ` Jacob Keller
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=9ea64678-991d-4bfa-89af-d97d56bb5895@intel.com \
--to=jacob.e.keller@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grzegorz.nitka@intel.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=maciej.machnikowski@intel.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=przemyslaw.korba@intel.com \
--cc=richardcochran@gmail.com \
--cc=sergey.temerkhanov@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