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

From: Jakub Kicinski
Date: Wed May 01 2024 - 22:10:27 EST


On Tue, 30 Apr 2024 17:49:52 +0200 Kory Maincent wrote:
> 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.