Re: [PATCH net-next v5 08/16] net: ethtool: Add a command to expose current time stamping layer

From
Andrew Lunn <andrew@lunn.ch>
Date
2023-10-13 16:15:01
Also in
linux-doc, lkml
Reply to
Jakub Kicinski, 2023-10-13
quoted
All these possibles timestamps go through exclusively the netdev API or the
phylib API. Even the software timestamping is done in the netdev driver,
therefore it goes through the netdev API and then should have the
NETDEV_TIMESTAMPING bit set.
Netdev vs phylib is an implementation detail of Linux.
I'm also surprised that you changed this.
quoted
quoted
quoted
+ */
+enum {
+	NO_TIMESTAMPING = 0,
+	NETDEV_TIMESTAMPING = (1 << 0),
+	PHYLIB_TIMESTAMPING = (1 << 1),
+	SOFTWARE_TIMESTAMPING = (1 << 2) | (1 << 0),    
Just emphasising Jakubs point here. phylib is an implementation
detail, in that the MAC driver might be using firmware to drive its
PHY, and that firmware can do a timestamp in the PHY. The API being
defined here should be independent of the implementation details. So
it probably should be MAC_TIMESTAMPING and PHY_TIMESTAMPING, and leave
it to the driver to decide if its PHYLIB doing the actual work, or
firmware.

	Andrew
Thread (61 messages) 61 messages, 11 authors, last reply 2023-10-20
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