Skip to content

net: prepare for removal of net->dev_index_head

Eric Dumazet netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 7 repliesSuperseded

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3rtnetlink: add ndo_fdb_dump_contextdrivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c drivers/net/ethernet/mscc/ocelot_net.c drivers/net/vxlan/vxlan_core.c +4 more+32 -180 repliesApplied
2/3rtnetlink: switch rtnl_fdb_dump() to for_each_netdev_dump()include/linux/rtnetlink.h net/core/rtnetlink.c+37 -590 repliesApplied
3/3rtnetlink: remove pad field in ndo_fdb_dump_contextinclude/linux/rtnetlink.h+0 -10 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchIdo SchimmelKuniyuki Iwashima
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

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 v2 net-next 0/3] net: prepare for removal of net->dev_index_head

This series changes rtnl_fdb_dump, last iterator using net->dev_index_head[]

First patch creates ndo_fdb_dump_context structure, to no longer assume specific layout for the arguments.

Second patch adopts for_each_netdev_dump() in rtnl_fdb_dump(), while changing two first fields of ndo_fdb_dump_context.

Third patch removes the padding, thus changing the location of ctx->fdb_idx now that all users agree on how to retrive it.

After this series, the only users of net->dev_index_head are __dev_get_by_index() and dev_get_by_index_rcu().

We have to evaluate if switching them to dev_by_index xarray would be sensible.

v2: addressed Ido feedback
v1: https://lore.kernel.org/netdev/[email protected]/T/#m800755d4b16c7f335927a76d9f52ebd37f7f077c

Eric Dumazet (3):
rtnetlink: add ndo_fdb_dump_context
rtnetlink: switch rtnl_fdb_dump() to for_each_netdev_dump()
rtnetlink: remove pad field in ndo_fdb_dump_context

 .../ethernet/freescale/dpaa2/dpaa2-switch.c   |   3 +-
 drivers/net/ethernet/mscc/ocelot_net.c 	   |   3 +-
 drivers/net/vxlan/vxlan_core.c 			   |   5 +-
 include/linux/rtnetlink.h					   |   6 +
 net/bridge/br_fdb.c						   |   3 +-
 net/core/rtnetlink.c						   | 108 +++++++-----------
 net/dsa/user.c 							   |   3 +-
 7 files changed, 61 insertions(+), 70 deletions(-)

--
2.47.0.338.g60cca15819-goog