Re: [PATCH net-next v17 01/14] net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask

From
Jacob Keller <jacob.e.keller@intel.com>
Date
2024-07-15 23:28:44
Also in
linux-doc, lkml
Reply to
Kory Maincent, 2024-07-09

On 7/9/2024 6:53 AM, Kory Maincent wrote:
Timestamping software or hardware flags are often used as a group,
therefore adding these masks will ease future use.

I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and
not used at all.
+1. Is there any hope of completely removing it? I'm not certain if this
is part of uAPI or not. Even so, we could make it more clear with
deprecation naming or similar.
quoted hunk ↗ jump to hunk
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---

Changes in v7:
- Move the masks out of uapi to include/linux/net_tstamp.h

Changes in v9:
- Fix commit message typos
---
 include/linux/net_tstamp.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/include/linux/net_tstamp.h b/include/linux/net_tstamp.h
index eb01c37e71e0..3799c79b6c83 100644
--- a/include/linux/net_tstamp.h
+++ b/include/linux/net_tstamp.h
@@ -5,6 +5,14 @@
 
 #include <uapi/linux/net_tstamp.h>
 
+#define SOF_TIMESTAMPING_SOFTWARE_MASK	(SOF_TIMESTAMPING_RX_SOFTWARE | \
+					 SOF_TIMESTAMPING_TX_SOFTWARE | \
+					 SOF_TIMESTAMPING_SOFTWARE)
+
+#define SOF_TIMESTAMPING_HARDWARE_MASK	(SOF_TIMESTAMPING_RX_HARDWARE | \
+					 SOF_TIMESTAMPING_TX_HARDWARE | \
+					 SOF_TIMESTAMPING_RAW_HARDWARE)
+
We can't drop _MASK because there already is SOF_TIMESTAMPING_SOFTWARE.
Makes sense.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
 enum hwtstamp_source {
 	HWTSTAMP_SOURCE_NETDEV,
 	HWTSTAMP_SOURCE_PHYLIB,
Thread (39 messages) 39 messages, 4 authors, last reply 2024-09-26
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