Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nguyen, Anthony L <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] X710-T4L: 5Gb support for IEEE1588
Date: Fri, 7 May 2021 23:35:34 +0000	[thread overview]
Message-ID: <681c1aecdf283d8b70fb2ece8a1f0b17a55f5d93.camel@intel.com> (raw)
In-Reply-To: <CAAE-T7KPQ73PX0LkPPQPeb9Eaun33GbN9AWcyJ18jUXcGMUS3w@mail.gmail.com>

On Fri, 2021-05-07 at 13:57 -0700, Alex Sergeev wrote:
> Thanks for quick response and the fix!
> 
> Would it be backported to standalone drivers, or previous kernel
> versions (e.g. 5.4), too?

When the patch is sent to netdev, I will add stable so that it will be
backported to applicable stable kernels.

Thanks,
Tony

> Thanks,
> Alex Sergeev
> 
> 
> On Fri, May 7, 2021 at 10:35 AM Jesse Brandeburg <
> jesse.brandeburg at intel.com> wrote:
> > Alex Sergeev wrote:
> > 
> > > Hello,
> > > 
> > > I got forwarded here by folks at e1000-devel at .
> > > 
> > > We have tried to use PTP with X710-T4L and 5Gb link, and
> > encountered
> > > clockcheck problem in phc2sys:
> > > 
> > > Apr 30 22:57:36 budtb phc2sys[5940]: [50.569] clockcheck: clock
> > jumped
> > > forward or running faster than expected!
> > > 
> > > After further code examination, it turned out that 5Gb case is
> > not handled
> > > in i40e_ptp.c
> > > 
> > > Here's the naive version of the patch that fixed the problem for
> > us:
> > > 
> > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> > > b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> > > index f1f6fc3744e9..5747b652ee9e 100644
> > > --- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> > > +++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> > > @@ -12,12 +12,13 @@
> > >   *
> > >   * Much like the 82599, the update period is dependent upon the
> > link speed:
> > >   * At 40Gb link or no link, the period is 1.6ns.
> > > - * At 10Gb link, the period is multiplied by 2. (3.2ns)
> > > + * At 5Gb or 10Gb link, the period is multiplied by 2. (3.2ns)
> > >   * At 1Gb link, the period is multiplied by 20. (32ns)
> > >   * 1588 functionality is not supported at 100Mbps.
> > >   */
> > >  #define I40E_PTP_40GB_INCVAL 0x0199999999ULL
> > >  #define I40E_PTP_10GB_INCVAL_MULT 2
> > > +#define I40E_PTP_5GB_INCVAL_MULT    2
> > >  #define I40E_PTP_1GB_INCVAL_MULT 20
> > > 
> > >  #define I40E_PRTTSYN_CTL1_TSYNTYPE_V1
> > >  BIT(I40E_PRTTSYN_CTL1_TSYNTYPE_SHIFT)
> > > @@ -465,6 +466,9 @@ void i40e_ptp_set_increment(struct i40e_pf
> > *pf)
> > >   case I40E_LINK_SPEED_10GB:
> > >       mult = I40E_PTP_10GB_INCVAL_MULT;
> > >       break;
> > > + case I40E_LINK_SPEED_5GB:
> > > +     mult = I40E_PTP_5GB_INCVAL_MULT;
> > > +     break;
> > >   case I40E_LINK_SPEED_1GB:
> > >       mult = I40E_PTP_1GB_INCVAL_MULT;
> > >       break;
> > > 
> > > What's the process to get it applied upstream?
> > 
> > Hi Alex, that's totally a bug, I've filed an internal bug and we'll
> > be
> > providing a patch for this problem shortly.
> > 
> > We'll be sure to credit you for the work to find the bug and
> > proposal
> > for the fix!
> > 
> > If you wish to have the patch be authored by you, you're welcome to
> > resend to this list with a correctly formatted git patch from
> > git-format-patch and git-send-email. If you do nothing, we'll just
> > take
> > care of it. :-)
> > 
> > Thanks for the report and the fix!
> > Jesse
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      reply	other threads:[~2021-05-07 23:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  6:14 [Intel-wired-lan] X710-T4L: 5Gb support for IEEE1588 Alex Sergeev
2021-05-07 17:35 ` Jesse Brandeburg
2021-05-07 20:57   ` Alex Sergeev
2021-05-07 23:35     ` Nguyen, Anthony L [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=681c1aecdf283d8b70fb2ece8a1f0b17a55f5d93.camel@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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