Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Intel Wired LAN <intel-wired-lan@lists.osuosl.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	Brandon Streiff <brandon.streiff@ni.com>
Subject: RE: [net-next v3 3/7] mv88e6xxx: reject unsupported external timestamp flags
Date: Mon, 14 Oct 2019 17:20:31 +0000
Message-ID: <02874ECE860811409154E81DA85FBB589692862E@ORSMSX121.amr.corp.intel.com> (raw)
In-Reply-To: <20191012232719.GA7148@localhost>

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: Saturday, October 12, 2019 4:27 PM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: netdev@vger.kernel.org; Intel Wired LAN <intel-wired-lan@lists.osuosl.org>;
> Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Brandon Streiff
> <brandon.streiff@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 index

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 18:11 [net-next v3 0/7] new PTP ioctl fixes Jacob Keller
2019-09-26 18:11 ` [net-next v3 1/7] ptp: correctly disable flags on old ioctls Jacob Keller
2019-10-11  1:03   ` Brown, Aaron F
2019-09-26 18:11 ` [net-next v3 2/7] net: reject PTP periodic output requests with unsupported flags Jacob Keller
2019-10-11  1:05   ` Brown, Aaron F
2019-10-12 18:08   ` Richard Cochran
2019-09-26 18:11 ` [net-next v3 3/7] mv88e6xxx: reject unsupported external timestamp flags Jacob Keller
2019-10-12 18:24   ` Richard Cochran
2019-10-12 19:36     ` Keller, Jacob E
2019-10-12 23:27       ` Richard Cochran
2019-10-14 17:20         ` Keller, Jacob E [this message]
2019-09-26 18:11 ` [net-next v3 4/7] dp83640: " Jacob Keller
2019-10-12 18:28   ` Richard Cochran
2019-09-26 18:11 ` [net-next v3 5/7] igb: " Jacob Keller
2019-10-11  0:57   ` [Intel-wired-lan] " Brown, Aaron F
2019-10-12 18:31   ` Richard Cochran
2019-09-26 18:11 ` [net-next v3 6/7] mlx5: " Jacob Keller
2019-10-12 18:36   ` Richard Cochran
2019-09-26 18:11 ` [net-next v3 7/7] renesas: " Jacob Keller
2019-09-27 16:22   ` Sergei Shtylyov
2019-10-12 18:38   ` Richard Cochran
2019-09-27 18:29 ` [net-next v3 0/7] new PTP ioctl fixes David Miller
2019-09-27 22:16   ` Keller, Jacob E
2019-11-13  1:58 ` Richard Cochran
2019-11-13 17:10   ` Richard Cochran
2019-11-13 19:34     ` Richard Cochran
2019-11-13 19:58       ` Keller, Jacob E

Reply instructions:

You may reply publically 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=02874ECE860811409154E81DA85FBB589692862E@ORSMSX121.amr.corp.intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=brandon.streiff@ni.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git