From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Jacob Keller <jacob.e.keller@intel.com>,
Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [net-next 4/6] ice: track and warn when PHC update is late
Date: Wed, 27 Jul 2022 10:40:49 -0700 [thread overview]
Message-ID: <c5fd7d19-326d-305d-bfe0-390f417171e6@intel.com> (raw)
In-Reply-To: <20220726234357.50610-5-jacob.e.keller@intel.com>
On 7/26/2022 4:43 PM, Jacob Keller wrote:
<snip>
> @@ -507,17 +507,29 @@ ice_ptp_read_src_clk_reg(struct ice_pf *pf, struct ptp_system_timestamp *sts)
> */
> static int ice_ptp_update_cached_phctime(struct ice_pf *pf)
> {
> + struct device *dev = ice_pf_to_dev(pf);
> + unsigned long update_before;
> u64 systime;
> int i;
>
> if (test_and_set_bit(ICE_CFG_BUSY, pf->state))
> return -EAGAIN;
>
> + update_before = pf->ptp.cached_phc_jiffies + msecs_to_jiffies(2000);
> + if (pf->ptp.cached_phc_time &&
> + time_is_before_jiffies(update_before)) {
> + unsigned long time_taken = jiffies - pf->ptp.cached_phc_jiffies;
> + dev_warn(dev, "%u msecs passed between update to cached PHC time\n",
> + jiffies_to_msecs(time_taken));
> + pf->ptp.late_cached_phc_updates++;
One more thing... this got reported on the next patch, but problem
originated here:
WARNING: Missing a blank line after declarations
#440: FILE: drivers/net/ethernet/intel/ice/ice_ptp.c:904:
+ unsigned long time_taken = jiffies -
pf->ptp.cached_phc_jiffies;
+ dev_warn(dev, "%u msecs passed between update to cached
PHC time\n",
> + }
> +
> /* Read the current PHC time */
> systime = ice_ptp_read_src_clk_reg(pf, NULL);
>
> /* Update the cached PHC time stored in the PF structure */
> WRITE_ONCE(pf->ptp.cached_phc_time, systime);
> + WRITE_ONCE(pf->ptp.cached_phc_jiffies, jiffies);
>
> ice_for_each_vsi(pf, i) {
> struct ice_vsi *vsi = pf->vsi[i];
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2022-07-27 17:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 23:43 [Intel-wired-lan] [net-next 0/6] ice: detect and report PTP timestamp issues Jacob Keller
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 1/6] ice: set tx_tstamps when creating new Tx rings via ethtool Jacob Keller
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 2/6] ice: initialize cached_phctime when creating Rx rings Jacob Keller
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 3/6] ice: track Tx timestamp stats similar to other Intel drivers Jacob Keller
2022-07-27 17:30 ` Tony Nguyen
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 4/6] ice: track and warn when PHC update is late Jacob Keller
2022-07-27 17:33 ` Tony Nguyen
2022-07-27 17:40 ` Tony Nguyen [this message]
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 5/6] ice: re-arrange some static functions in ice_ptp.c Jacob Keller
2022-07-26 23:43 ` [Intel-wired-lan] [net-next 6/6] ice: introduce ice_ptp_reset_cached_phctime function 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=c5fd7d19-326d-305d-bfe0-390f417171e6@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@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