netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	Martin Porter <mporter@solarflare.com>,
	John Ronciak <john.ronciak@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH ethtool] Add the command to show the time stamping capabilities.
Date: Tue, 3 Apr 2012 07:37:17 +0200	[thread overview]
Message-ID: <20120403053717.GA2155@netboy.at.omicron.at> (raw)
In-Reply-To: <1333394758.5356.28.camel@bwh-desktop.uk.solarflarecom.com>

On Mon, Apr 02, 2012 at 08:25:58PM +0100, Ben Hutchings wrote:
> On Sun, 2012-04-01 at 17:23 +0200, Richard Cochran wrote:

> > +	if (info->tx_types & (1 << HWTSTAMP_TX_OFF))
> > +		fprintf(stdout, "HWTSTAMP_TX_OFF\n");
> > +
> > +	if (info->tx_types & (1 << HWTSTAMP_TX_ON))
> > +		fprintf(stdout, "HWTSTAMP_TX_ON\n");
> > +
> > +	if (info->tx_types & (1 << HWTSTAMP_TX_ONESTEP_SYNC))
> > +		fprintf(stdout, "HWTSTAMP_TX_ONESTEP_SYNC\n");
> 
> If there is no hardware timestamping available then shouldn't we see
> HWTSTAMP_TX_OFF reported here?  But that's going to be the case.  Not
> sure whether the kernel or the ethtool utility should deal with that,
> but don't assume the ethtool utility is the only consumer.

Actually, if the device does not support hardware time stamping at
all, then ioctl SIOCSHWTSTAMP returns EOPNOTSUPP. So, HWTSTAMP_TX_ON
means you can turn Tx time stamping on, and HWTSTAMP_TX_OFF means you
can turn it off again. It might not seem too logical, but that is how
the interface works.

So (tx_types == 0) means no hardware timestamping available. We can
print that as a special case, if you think it best.

> Hardware Receive Filter Modes:
> 	none (HWTSTAMP_FILTER_NONE)
> 	ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
> 	ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
> 
> (Maybe you can think of better names.)

Okay, I get the idea.

Thanks,
Richard

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  parent reply	other threads:[~2012-04-03  5:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 15:23 [PATCH ethtool] Add the command to show the time stamping capabilities Richard Cochran
2012-04-02 19:25 ` Ben Hutchings
2012-04-02 20:23   ` Ben Hutchings
2012-04-03  5:37   ` Richard Cochran [this message]
2012-04-03 13:38     ` Ben Hutchings

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=20120403053717.GA2155@netboy.at.omicron.at \
    --to=richardcochran@gmail.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jacob.e.keller@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=mporter@solarflare.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).