Re: [PATCH net-next v12 09/13] net: Add the possibility to support a selected hwtstamp in netdevice

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-05-02 02:10:18
Also in
linux-doc, lkml
Reply to
Kory Maincent, 2024-04-30
On Tue, 30 Apr 2024 17:49:52 +0200 Kory Maincent wrote:
quoted hunk ↗ jump to hunk
 static inline void hwtstamp_config_to_kernel(struct kernel_hwtstamp_config *kernel_cfg,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f0e4572cdad5..f6333b8a630d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -46,6 +46,7 @@
 #include <uapi/linux/if_bonding.h>
 #include <uapi/linux/pkt_cls.h>
 #include <uapi/linux/netdev.h>
+#include <linux/net_tstamp.h>
 #include <linux/hashtable.h>
 #include <linux/rbtree.h>
 #include <net/net_trackers.h>
@@ -2026,6 +2027,8 @@ enum netdev_reg_state {
  *	@dpll_pin: Pointer to the SyncE source pin of a DPLL subsystem,
  *		   where the clock is recovered.
  *
+ *	@hwtstamp: Tracks which PTP performs hardware packet time stamping.
+ *
  *	FIXME: cleanup struct net_device such that network protocol info
  *	moves out.
  */
@@ -2400,6 +2403,8 @@ struct net_device {
 	/** @page_pools: page pools created for this netdevice */
 	struct hlist_head	page_pools;
 #endif
+
+	struct hwtstamp_provider	*hwtstamp;
 };
 #define to_net_dev(d) container_of(d, struct net_device, dev)
Please avoid adding includes to netdevice.h.
IDK if you have more dependencies in later patches but for a pointer
member you don't even need a forward declaration, let alone include.
Thread (21 messages) 21 messages, 3 authors, last reply 2024-05-17
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