mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
b18fe47c0c
commit
35f7cad174
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user