Skip to content

net: dsa: Setup dsa_netdev_ops

Florian Fainelli lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v14 patches 13 repliesSuperseded

Changes in v2 from the cover letter

- use static inline int vs. static int inline (Kbuild robot)
- fixed typos in patch 4 (Andrew)
- avoid using macros (Andrew)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: Wrap ndo_do_ioctl() to prepare for DSA stacked opsnet/core/dev_ioctl.c+17 -70 replies
2/4net: dsa: Add wrappers for overloaded ndo_opsinclude/net/dsa.h+70 -00 replies
3/4net: Call into DSA netdevice_ops wrappersnet/core/dev.c net/core/dev_ioctl.c+10 -00 replies
4/4net: dsa: Setup dsa_netdev_opsinclude/net/dsa.h net/dsa/master.c+13 -400 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchAndrew Lunn
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/4] net: dsa: Setup dsa_netdev_ops

Hi David, Jakub,

This patch series addresses the overloading of a DSA CPU/management interface's netdev_ops for the purpose of providing useful information from the switch side.

Up until now we had duplicated the existing netdev_ops structure and added specific function pointers to return information of interest. Here we have a more controlled way of doing this by involving the specific netdev_ops function pointers that we want to be patched, which is easier for auditing code in the future. As a byproduct we can now maintain netdev_ops pointer comparisons which would be failing before (no known in tree problems because of that though).

Let me know if this approach looks reasonable to you and we might do the same with our ethtool_ops overloading as well.

Thanks!

Changes in v2:

- use static inline int vs. static int inline (Kbuild robot)
- fixed typos in patch 4 (Andrew)
- avoid using macros (Andrew)

Florian Fainelli (4):
net: Wrap ndo_do_ioctl() to prepare for DSA stacked ops
net: dsa: Add wrappers for overloaded ndo_ops
net: Call into DSA netdevice_ops wrappers
net: dsa: Setup dsa_netdev_ops

 include/net/dsa.h    | 71 +++++++++++++++++++++++++++++++++++++++++++-
 net/core/dev.c       |  5 ++++
 net/core/dev_ioctl.c | 29 +++++++++++++-----
 net/dsa/master.c     | 52 ++++++++------------------------
 4 files changed, 110 insertions(+), 47 deletions(-)
Signature · 1 line
2.25.1