> -----Original Message-----
> From: Richard Cochran <richardcoch...@gmail.com>
> Sent: Saturday, October 12, 2019 4:27 PM
> To: Keller, Jacob E <jacob.e.kel...@intel.com>
> Cc: netdev@vger.kernel.org; Intel Wired LAN 
> <intel-wired-...@lists.osuosl.org>;
> Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>; Brandon Streiff
> <brandon.stre...@ni.com>
> Subject: Re: [net-next v3 3/7] mv88e6xxx: reject unsupported external
> timestamp flags
> 
> On Sat, Oct 12, 2019 at 07:36:31PM +0000, Keller, Jacob E wrote:
> > Right, so in practice, unless it supports both edges, it should reject 
> > setting both
> RISING and FALLING together.
> 
> Enforcing that now *could* break existing user space, but I wonder
> whether any programs would actually be affected.
> 
> Maybe we can add a STRICT flag than requests strict checking.  If user
> space uses the "2" ioctl, then we would add this flag before invoking
> the driver callback.
> 
> Thanks,
> Richard

That could work. I don't know how much it's worth fixing it, but that would be 
the right way to fix it, I think.

I think the strict flag should do the following:

a) enforce that you must set at least one of the two edge flags (ensuring that 
a request to timestamp without one of the edges is rejected)
b) drivers *must* honor the edge flags or exit with a rejection if they can't 
support it. (unlike without 'strict', which would be like today and driver 
defined).
c) possibly: reject both flags at once since it doesn't really make sense to 
create a timestamp for each edge. At least, I think that makes it harder to 
actually use the timestamps since you need to be more careful to separate the 
two timestamps.

I'm not 100% sure on (c) but (b) can only be implemented in drivers, since the 
stack wouldn't know which modes the driver supports.

Thanks,
Jake

Reply via email to