netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] Convert dsa_master_ioctl() to netdev notifier
@ 2023-04-02 12:37 Vladimir Oltean
  2023-04-02 12:37 ` [PATCH net-next 1/7] net: don't abuse "default" case for unknown ioctl in dev_ifsioc() Vladimir Oltean
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Vladimir Oltean @ 2023-04-02 12:37 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, Florian Fainelli, Maxim Georgiev, Horatiu Vultur,
	Köry Maincent, Maxime Chevallier

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().

Vladimir Oltean (7):
  net: don't abuse "default" case for unknown ioctl in dev_ifsioc()
  net: simplify handling of dsa_ndo_eth_ioctl() return code
  net: promote SIOCSHWTSTAMP and SIOCGHWTSTAMP ioctls to dedicated
    handlers
  net: move copy_from_user() out of net_hwtstamp_validate()
  net: add struct kernel_hwtstamp_config and make
    net_hwtstamp_validate() use it
  net: dsa: make dsa_port_supports_hwtstamp() construct a fake ifreq
  net: create a netdev notifier for DSA to reject PTP on DSA master

 include/linux/net_tstamp.h |  33 +++++++++++
 include/linux/netdevice.h  |   9 ++-
 include/net/dsa.h          |  51 -----------------
 net/core/dev.c             |   8 +--
 net/core/dev_ioctl.c       | 110 ++++++++++++++++++++++---------------
 net/dsa/master.c           |  50 +++++------------
 net/dsa/master.h           |   3 +
 net/dsa/port.c             |  10 ++--
 net/dsa/port.h             |   2 +-
 net/dsa/slave.c            |  11 ++++
 10 files changed, 147 insertions(+), 140 deletions(-)
 create mode 100644 include/linux/net_tstamp.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-04-03 16:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-02 12:37 [PATCH net-next 0/7] Convert dsa_master_ioctl() to netdev notifier Vladimir Oltean
2023-04-02 12:37 ` [PATCH net-next 1/7] net: don't abuse "default" case for unknown ioctl in dev_ifsioc() Vladimir Oltean
2023-04-02 12:46   ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 2/7] net: simplify handling of dsa_ndo_eth_ioctl() return code Vladimir Oltean
2023-04-02 12:47   ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 3/7] net: promote SIOCSHWTSTAMP and SIOCGHWTSTAMP ioctls to dedicated handlers Vladimir Oltean
2023-04-02 12:52   ` Florian Fainelli
2023-04-02 12:53     ` Vladimir Oltean
2023-04-02 12:56       ` Florian Fainelli
2023-04-02 13:01         ` Vladimir Oltean
2023-04-02 13:03           ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 4/7] net: move copy_from_user() out of net_hwtstamp_validate() Vladimir Oltean
2023-04-02 12:52   ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 5/7] net: add struct kernel_hwtstamp_config and make net_hwtstamp_validate() use it Vladimir Oltean
2023-04-02 12:57   ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 6/7] net: dsa: make dsa_port_supports_hwtstamp() construct a fake ifreq Vladimir Oltean
2023-04-02 12:57   ` Florian Fainelli
2023-04-02 12:37 ` [PATCH net-next 7/7] net: create a netdev notifier for DSA to reject PTP on DSA master Vladimir Oltean
2023-04-02 13:01   ` Florian Fainelli
2023-04-03 15:30   ` Jakub Kicinski
2023-04-03 16:48     ` Vladimir Oltean
2023-04-03  9:20 ` [PATCH net-next 0/7] Convert dsa_master_ioctl() to netdev notifier patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).