diff options
author | David S. Miller <davem@davemloft.net> | 2023-04-03 10:04:27 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-03 10:04:27 +0100 |
commit | 858e5b06409f65d09dc60e32432e4b8e12e4dba0 (patch) | |
tree | e59030b8a2b0657651f7b0528d270f0d2d585a72 /include/linux/netdevice.h | |
parent | 51aaa68222d6c34f0373cf95223ce2f230329e8f (diff) | |
parent | 88c0a6b503b7f4fffb68a8d49c3987870c5b1d6b (diff) | |
download | linux-858e5b06409f65d09dc60e32432e4b8e12e4dba0.tar.gz linux-858e5b06409f65d09dc60e32432e4b8e12e4dba0.tar.bz2 linux-858e5b06409f65d09dc60e32432e4b8e12e4dba0.zip |
Merge branch 'dsa_master_ioctl-notifier'
Vladimir Oltean says:
====================
net: Convert dsa_master_ioctl() to netdev notifier
This is preparatory work in order for Maxim Georgiev to be able to start
the API conversion process of hardware timestamping from ndo_eth_ioctl()
to ndo_hwtstamp_set():
https://lore.kernel.org/netdev/20230331045619.40256-1-glipus@gmail.com/
In turn, Maxim Georgiev's work is a preparation so that Köry Maincent is
able to make the active hardware timestamping layer selectable by user
space.
https://lore.kernel.org/netdev/20230308135936.761794-1-kory.maincent@bootlin.com/
So, quite some dependency chain.
Before this patch set, DSA prevented the conversion of any networking
driver from the ndo_eth_ioctl() API to the ndo_hwtstamp_set() API,
because it wanted to validate the hwtstamping settings on the DSA
master, and it was only coded up to do this using the old API.
After this patch set, a new netdev notifier exists, which does not
depend on anything that would constitute the "soon-to-be-legacy" API,
but rather, it uses a newly introduced struct kernel_hwtstamp_config,
and it doesn't issue any ioctl at all, being thus compatible both with
ndo_eth_ioctl(), and with the not-yet-introduced, but now possible,
ndo_hwtstamp_set().
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 62e093a6d6d1..a740be3bb911 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2878,6 +2878,7 @@ enum netdev_cmd { NETDEV_OFFLOAD_XSTATS_REPORT_USED, NETDEV_OFFLOAD_XSTATS_REPORT_DELTA, NETDEV_XDP_FEAT_CHANGE, + NETDEV_PRE_CHANGE_HWTSTAMP, }; const char *netdev_cmd_to_name(enum netdev_cmd cmd); @@ -2928,6 +2929,11 @@ struct netdev_notifier_pre_changeaddr_info { const unsigned char *dev_addr; }; +struct netdev_notifier_hwtstamp_info { + struct netdev_notifier_info info; /* must be first */ + struct kernel_hwtstamp_config *config; +}; + enum netdev_offload_xstats_type { NETDEV_OFFLOAD_XSTATS_TYPE_L3 = 1, }; @@ -2984,7 +2990,8 @@ netdev_notifier_info_to_extack(const struct netdev_notifier_info *info) } int call_netdevice_notifiers(unsigned long val, struct net_device *dev); - +int call_netdevice_notifiers_info(unsigned long val, + struct netdev_notifier_info *info); extern rwlock_t dev_base_lock; /* Device list lock */ |