Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] DSA cross-chip notifier cleanups
@ 2022-04-15 15:46 Vladimir Oltean
  2022-04-15 15:46 ` [PATCH net-next 1/6] net: dsa: move reset of VLAN filtering to dsa_port_switchdev_unsync_attrs Vladimir Oltean
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Vladimir Oltean @ 2022-04-15 15:46 UTC (permalink / raw)
  To: netdev
  Cc: Jakub Kicinski, David S. Miller, Paolo Abeni, Florian Fainelli,
	Andrew Lunn, Vivien Didelot, Vladimir Oltean

This patch set makes the following improvements:

- Cross-chip notifiers pass a switch index, port index, sometimes tree
  index, all as integers. Sometimes we need to recover the struct
  dsa_port based on those integers. That recovery involves traversing a
  list. By passing directly a pointer to the struct dsa_port we can
  avoid that, and the indices passed previously can still be obtained
  from the passed struct dsa_port.

- Resetting VLAN filtering on a switch has explicit code to make it run
  on a single switch, so it has no place to stay in the cross-chip
  notifier code. Move it out.

- Changing the MTU on a user port affects only that single port, yet the
  code passes through the cross-chip notifier layer where all switches
  are notified. Avoid that.

- Other related cosmetic changes in the MTU changing procedure.

Apart from the slight improvement in performance given by
(a) doing less work in cross-chip notifiers
(b) emitting less cross-chip notifiers
we also end up with about 100 less lines of code.

Vladimir Oltean (6):
  net: dsa: move reset of VLAN filtering to
    dsa_port_switchdev_unsync_attrs
  net: dsa: make cross-chip notifiers more efficient for host events
  net: dsa: use dsa_tree_for_each_user_port in dsa_slave_change_mtu
  net: dsa: avoid one dsa_to_port() in dsa_slave_change_mtu
  net: dsa: drop dsa_slave_priv from dsa_slave_change_mtu
  net: dsa: don't emit targeted cross-chip notifiers for MTU change

 net/dsa/dsa_priv.h  |  28 ++-----
 net/dsa/port.c      | 128 ++++++++++++++++++------------
 net/dsa/slave.c     |  31 +++-----
 net/dsa/switch.c    | 188 +++++++++++---------------------------------
 net/dsa/tag_8021q.c |  10 +--
 5 files changed, 146 insertions(+), 239 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2022-04-20  9:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-15 15:46 [PATCH net-next 0/6] DSA cross-chip notifier cleanups Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 1/6] net: dsa: move reset of VLAN filtering to dsa_port_switchdev_unsync_attrs Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 2/6] net: dsa: make cross-chip notifiers more efficient for host events Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 3/6] net: dsa: use dsa_tree_for_each_user_port in dsa_slave_change_mtu Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 4/6] net: dsa: avoid one dsa_to_port() " Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 5/6] net: dsa: drop dsa_slave_priv from dsa_slave_change_mtu Vladimir Oltean
2022-04-15 15:46 ` [PATCH net-next 6/6] net: dsa: don't emit targeted cross-chip notifiers for MTU change Vladimir Oltean
2022-04-20  9:40 ` [PATCH net-next 0/6] DSA cross-chip notifier cleanups 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