[Intel-wired-lan] [PATCH net 06/13] mlx5: reject unsupported external timestamp flags

Keller, Jacob E jacob.e.keller at intel.com
Fri Nov 15 01:15:27 UTC 2019


> -----Original Message-----
> From: Saeed Mahameed <saeedm at mellanox.com>
> Sent: Thursday, November 14, 2019 4:03 PM
> To: Ariel Levkovich <lariel at mellanox.com>; richardcochran at gmail.com;
> netdev at vger.kernel.org
> Cc: Hall, Christopher S <christopher.s.hall at intel.com>; Eugenia Emantayev
> <eugenia at mellanox.com>; davem at davemloft.net;
> sergei.shtylyov at cogentembedded.com; Feras Daoud <ferasda at mellanox.com>;
> stefan.sorensen at spectralink.com; brandon.streiff at ni.com; Keller, Jacob E
> <jacob.e.keller at intel.com>; Kirsher, Jeffrey T <jeffrey.t.kirsher at intel.com>;
> intel-wired-lan at lists.osuosl.org; felipe.balbi at linux.intel.com
> Subject: Re: [PATCH net 06/13] mlx5: reject unsupported external timestamp
> flags
> 
> On Thu, 2019-11-14 at 10:45 -0800, Richard Cochran wrote:
> > From: Jacob Keller <jacob.e.keller at intel.com>
> >
> > Fix the mlx5 core PTP support to explicitly reject any future flags
> > that
> > get added to the external timestamp request ioctl.
> >
> > In order to maintain currently functioning code, this patch accepts
> > all
> > three current flags. This is because the PTP_RISING_EDGE and
> > PTP_FALLING_EDGE flags have unclear semantics and each driver seems
> > to
> > have interpreted them slightly differently.
> >
> > [ RC: I'm not 100% sure what this driver does, but if I'm not wrong
> > it
> >       follows the dp83640:
> >
> 
> The driver will check if the PTP_FALLING_EDGE flag was set then it will
> set it in HW, if not then it is going to default to PTP_RISING_EDGE, so
> LGTM.
> 
> Reviewed-by: Saeed Mahameed <saeedm at mellanox.com>
> 
> But same story here, old tools that lazily set 0xffff or 0x0000 and
> expected every thing to work.. again not sure if they do exist.
> 
> Ariel please have a look at this patch.
> 

As long as they stick to the original ioctls this won't be a problem, because the v1 ioctl now explicitly clears unsupported bits before calling driver, so this check will pass. Obviously, this change should not be backported to earlier than 5.4 without also backporting that masking in the original ioctl functions.

Thanks,
Jake



More information about the Intel-wired-lan mailing list