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]
Message-ID: <baf0fe9c0a1741a6883768e816346123@amazon.com>
Date: Tue, 12 Nov 2024 17:53:41 +0000
From: "Arinzon, David" <darinzon@...zon.com>
To: Jakub Kicinski <kuba@...nel.org>, Rahul Rameshbabu
	<rrameshbabu@...dia.com>, Gal Pressman <gal@...dia.com>
CC: David Miller <davem@...emloft.net>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
	<pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>, "Woodhouse,
 David" <dwmw@...zon.co.uk>, "Machulsky, Zorik" <zorik@...zon.com>,
	"Matushevsky, Alexander" <matua@...zon.com>, "Bshara, Saeed"
	<saeedb@...zon.com>, "Wilson, Matt" <msw@...zon.com>, "Liguori, Anthony"
	<aliguori@...zon.com>, "Bshara, Nafea" <nafea@...zon.com>, "Schmeilin,
 Evgeny" <evgenys@...zon.com>, "Belgazal, Netanel" <netanel@...zon.com>,
	"Saidi, Ali" <alisaidi@...zon.com>, "Herrenschmidt, Benjamin"
	<benh@...zon.com>, "Kiyanovski, Arthur" <akiyano@...zon.com>, "Dagan, Noam"
	<ndagan@...zon.com>, "Bernstein, Amit" <amitbern@...zon.com>, "Agroskin,
 Shay" <shayagr@...zon.com>, "Abboud, Osama" <osamaabb@...zon.com>,
	"Ostrovsky, Evgeny" <evostrov@...zon.com>, "Tabachnik, Ofir"
	<ofirt@...zon.com>, "Machnikowski, Maciek" <maciek@...hnikowski.net>
Subject: RE: [PATCH v3 net-next 3/3] net: ena: Add PHC documentation

Thank you Rahul for the detailed explanations

Hi Jakub,

> > Just wanted to clarify that this feature and the associated
> > documentation are specifically intended for reading a HW timestamp,
> > not for TX/RX packet timestamping.
> 
> Oh, so you're saying you can only read the clock from the device?
> The word timestamp means time associated with an event.
> 

Based on the documentation of gettimex64 API
The ts parameter holds the PHC timestamp.
We are using the same terminology
https://elixir.bootlin.com/linux/v6.11.6/source/include/linux/ptp_clock_kernel.h#L97

 * @gettimex64:  Reads the current time from the hardware clock and optionally
 *               also the system clock.
 *               parameter ts: Holds the PHC timestamp.
 *               parameter sts: If not NULL, it holds a pair of timestamps from
 *               the system clock. The first reading is made right before
 *               reading the lowest bits of the PHC timestamp and the second
 *               reading immediately follows that.

> In the doc you talk about:
> 
> > +PHC support and capabilities can be verified using ethtool:
> > +
> > +.. code-block:: shell
> > +
> > +  ethtool -T <interface>
> 
> which is for packet timestamping
> 

ethtool -T shows all timestamping capabilities, which indeed include
packet timestamping but also the PTP Hardware Clock (PHC) index
If the value is `none`, it means that there's no PHC support
This is done by implementing the `get_ts_info` hook, which is
part of this patchset.

https://elixir.bootlin.com/linux/v6.11.6/source/include/linux/ethtool.h#L720

> also:
> 
> > ENA Linux driver supports PTP hardware clock providing timestamp
> > reference to achieve nanosecond accuracy.
> 
> You probably want to double check the definitions of accuracy and
> resolution.
> 

Thank you, will be changed in the next patchset

> We recently merged an Amazon PTP clock driver from David Woodhouse,
> see commit 20503272422693. If you're not timestamping packets why not use
> that driver?

The AMZNC10C vmclock device driver is intended to be used in systems where there's an hypervisor.
The PHC driver in this patchset is intended for virtual and non-virtual (metal) instances in AWS.
The AMZNC10C might not be available in the future on the same instances where PHC is available.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ