netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] Faster ndo_fdb_dump for drivers with shared FDB
@ 2021-08-21 21:00 Vladimir Oltean
  2021-08-21 21:00 ` [RFC PATCH 1/4] net: rtnetlink: create a netlink cb context struct for fdb dump Vladimir Oltean
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Vladimir Oltean @ 2021-08-21 21:00 UTC (permalink / raw)
  To: netdev

I have a board where it is painfully slow to run "bridge fdb". It has 16
switch ports which are accessed over an I2C controller -> I2C mux 1 ->
I2C mux 2 -> I2C-to-SPI bridge.

It doesn't really help either that we traverse the hardware FDB of each
switch for every netdev, even though we already know all there is to
know the first time we traversed it. In fact, I hacked up some rtnetlink
and DSA changes, and with those, the time to run 'bridge fdb' on this
board decreases from 207 seconds to 26 seconds (2 FDB traversals instead
of 16), turning something intolerable into 'tolerable'.

I don't know how much we care about .ndo_fdb_dump implemented directly
by drivers (and that's where I expect this to be most useful), because
of SWITCHDEV_FDB_ADD_TO_BRIDGE and all that. So this is RFC in case it
is helpful for somebody, at least during debugging.

Vladimir Oltean (4):
  net: rtnetlink: create a netlink cb context struct for fdb dump
  net: rtnetlink: add a minimal state machine for dumping shared FDBs
  net: dsa: implement a shared FDB dump procedure
  net: dsa: sja1105: implement shared FDB dump

 drivers/net/dsa/sja1105/sja1105_main.c        |  50 +++--
 .../ethernet/freescale/dpaa2/dpaa2-switch.c   |   9 +-
 drivers/net/ethernet/mscc/ocelot.c            |   5 +-
 drivers/net/ethernet/mscc/ocelot_net.c        |   4 +
 drivers/net/vxlan.c                           |   8 +-
 include/linux/rtnetlink.h                     |  25 +++
 include/net/dsa.h                             |  17 ++
 net/bridge/br_fdb.c                           |   6 +-
 net/core/rtnetlink.c                          | 105 +++++++---
 net/dsa/dsa2.c                                |   2 +
 net/dsa/dsa_priv.h                            |   1 +
 net/dsa/slave.c                               | 189 ++++++++++++++++--
 net/dsa/switch.c                              |   8 +
 13 files changed, 368 insertions(+), 61 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-09-25 14:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 21:00 [RFC PATCH 0/4] Faster ndo_fdb_dump for drivers with shared FDB Vladimir Oltean
2021-08-21 21:00 ` [RFC PATCH 1/4] net: rtnetlink: create a netlink cb context struct for fdb dump Vladimir Oltean
2021-08-21 21:00 ` [RFC PATCH 2/4] net: rtnetlink: add a minimal state machine for dumping shared FDBs Vladimir Oltean
2021-08-21 21:00 ` [RFC PATCH 3/4] net: dsa: implement a shared FDB dump procedure Vladimir Oltean
2021-08-21 21:00 ` [RFC PATCH 4/4] net: dsa: sja1105: implement shared FDB dump Vladimir Oltean
2021-09-23 15:25 ` [RFC PATCH 0/4] Faster ndo_fdb_dump for drivers with shared FDB Vladimir Oltean
2021-09-23 22:29   ` Florian Fainelli
2021-09-23 22:49     ` Vladimir Oltean
2021-09-24 10:03       ` Nikolay Aleksandrov
2021-09-25 14:31         ` Roopa Prabhu

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