[Intel-wired-lan] X710-T4L: 5Gb support for IEEE1588

Nguyen, Anthony L anthony.l.nguyen at intel.com
Fri May 7 23:35:34 UTC 2021


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


More information about the Intel-wired-lan mailing list