Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable

From
Köry Maincent <kory.maincent@bootlin.com>
Date
2023-11-20 09:44:48
Also in
linux-doc, lkml
Reply to
Jakub Kicinski, 2023-11-19
On Sat, 18 Nov 2023 18:34:33 -0800
Jakub Kicinski [off-list ref] wrote:
On Tue, 14 Nov 2023 12:28:43 +0100 Kory Maincent wrote:
quoted
+	if (!tb[ETHTOOL_A_TS_LAYER])
+		return 0;  
GENL_REQ_ATTR_CHECK(), not sure why anyone would issue this command
without any useful attr.
quoted
+	/* Disable time stamping in the current layer. */
+	if (netif_device_present(dev) &&
+	    (dev->ts_layer == PHY_TIMESTAMPING ||
+	    dev->ts_layer == MAC_TIMESTAMPING)) {
+		ret = dev_set_hwtstamp_phylib(dev, &config, info->extack);
+		if (ret < 0)
+			return ret;  
So you only support PHYLIB?

The semantics need to be better documented :(
Yes as we don't really know how each MAC deal with the timestamping
before ndo_hwstamp_get/set. Using phylib only allows us to be sure these NDO are
implemented and the management of timestamping is coherent in the MAC. Also It
will push people to move on to these NDOs.

Ok I will add documentation.

-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Thread (78 messages) 78 messages, 9 authors, last reply 2023-11-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help