summaryrefslogtreecommitdiff
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorKory Maincent <kory.maincent@bootlin.com>2024-12-12 18:06:43 +0100
committerDavid S. Miller <davem@davemloft.net>2024-12-16 12:51:40 +0000
commit35f7cad1743e04bf2944a2aadb6b6a42adc57bca (patch)
tree63ae79d9fb92533e051e790d52083fb0190b08f1 /include/linux/netdevice.h
parentb18fe47c0c093cc429f7e4d7694fdf0fc362aaf5 (diff)
net: Add the possibility to support a selected hwtstamp in netdevice
Introduce the description of a hwtstamp provider, mainly defined with a the hwtstamp source and the phydev pointer. Add a hwtstamp provider description within the netdev structure to allow saving the hwtstamp we want to use. This prepares for future support of an ethtool netlink command to select the desired hwtstamp provider. By default, the old API that does not support hwtstamp selectability is used, meaning the hwtstamp provider pointer is unset. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d917949bba03..2593019ad5b1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -82,6 +82,7 @@ struct xdp_metadata_ops;
struct xdp_md;
struct ethtool_netdev_state;
struct phy_link_topology;
+struct hwtstamp_provider;
typedef u32 xdp_features_t;
@@ -2045,6 +2046,7 @@ enum netdev_reg_state {
*
* @neighbours: List heads pointing to this device's neighbours'
* dev_list, one per address-family.
+ * @hwprov: Tracks which PTP performs hardware packet time stamping.
*
* FIXME: cleanup struct net_device such that network protocol info
* moves out.
@@ -2457,6 +2459,8 @@ struct net_device {
struct hlist_head neighbours[NEIGH_NR_TABLES];
+ struct hwtstamp_provider __rcu *hwprov;
+
u8 priv[] ____cacheline_aligned
__counted_by(priv_len);
} ____cacheline_aligned;