lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 3 Apr 2012 14:38:58 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Richard Cochran <richardcochran@...il.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 Tue, 2012-04-03 at 07:37 +0200, Richard Cochran wrote:
> 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.

OK, this makes sense.

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

I think that from an administrator's point of view it would make more
sense to see that hardware timestamping is always off.  But from a
developer's point of view I can see it would make no sense to show a
mode/filter name which cannot actually be used.

So you could show tx_types == 0 or rx_filter == 0 using (1) no heading
and no list or (2) heading and a dummy entry (e.g. 'N/A').  Or maybe you
can think of something better.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ