[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120403053717.GA2155@netboy.at.omicron.at>
Date: Tue, 3 Apr 2012 07:37:17 +0200
From: Richard Cochran <richardcochran@...il.com>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Martin Porter <mporter@...arflare.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
John Ronciak <john.ronciak@...el.com>,
e1000-devel@...ts.sourceforge.net
Subject: Re: [PATCH ethtool] Add the command to show the time stamping
capabilities.
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists