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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 26 Feb 2024 09:59:19 +0100
From: Köry Maincent <kory.maincent@...tlin.com>
To: Rahul Rameshbabu <rrameshbabu@...dia.com>
Cc: Saeed Mahameed <saeed@...nel.org>, Leon Romanovsky <leon@...nel.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, Jonathan Corbet <corbet@....net>, Richard Cochran
 <richardcochran@...il.com>, Tariq Toukan <tariqt@...dia.com>, Gal Pressman
 <gal@...dia.com>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Andrew Lunn
 <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, Przemek Kitszel
 <przemyslaw.kitszel@...el.com>, Ahmed Zaki <ahmed.zaki@...el.com>,
 Alexander Lobakin <aleksander.lobakin@...el.com>, Hangbin Liu
 <liuhangbin@...il.com>, Paul Greenwalt <paul.greenwalt@...el.com>, Justin
 Stitt <justinstitt@...gle.com>, Randy Dunlap <rdunlap@...radead.org>,
 Maxime Chevallier <maxime.chevallier@...tlin.com>, Wojciech Drewek
 <wojciech.drewek@...el.com>, Vladimir Oltean <vladimir.oltean@....com>,
 Jiri Pirko <jiri@...nulli.us>, Jacob Keller <jacob.e.keller@...el.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu
 <joabreu@...opsys.com>, Dragos Tatulea <dtatulea@...dia.com>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-doc@...r.kernel.org
Subject: Re: [PATCH RFC net-next v1 1/6] ethtool: add interface to read Tx
 hardware timestamping statistics

On Fri, 23 Feb 2024 11:24:45 -0800
Rahul Rameshbabu <rrameshbabu@...dia.com> wrote:

> Multiple network devices that support hardware timestamping appear to have
> common behavior with regards to timestamp handling. Implement common Tx
> hardware timestamping statistics in a tx_stats struct_group. Common Rx
> hardware timestamping statistics can subsequently be implemented in a
> rx_stats struct_group for ethtool_ts_stats.
> 
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@...dia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
  
> +/**
> + * enum ethtool_ts_stats_layer - layer to query hardware timestamping
> statistics
> + * @ETHTOOL_TS_STATS_LAYER_ACTIVE:
> + *	retrieve the statistics from the layer that is currently feeding
> + *	hardware timestamps for packets.
> + * @ETHTOOL_TS_STATS_LAYER_DMA:
> + *	retrieve the statistics from the DMA hardware timestamping layer
> of the
> + *	device.
> + * @ETHTOOL_TS_STATS_PHY:
> + *	retrieve the statistics from the PHY hardware timestamping layer
> of the
> + *	device.
> + */
> +enum ethtool_ts_stats_layer {
> +	ETHTOOL_TS_STATS_LAYER_ACTIVE,
> +	ETHTOOL_TS_STATS_LAYER_DMA,
> +	ETHTOOL_TS_STATS_LAYER_PHY,
> +};

The all point of my v8 series new implementation (asked by the maintainers) was
to move on from the timestamp layer to the phc provider which is described by a
phc index + phc qualifier (precise IEEE 1588/approx DMA). The struct being
introduce in patch 9 of my series.
You should do the same, use the phc provider instead of the layer.

With using only the layer and in case of several PHYs we could not reach the
right ts stats.
Same goes for the MAC having both type of timestamp IEEE 1588 and DMA.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ