lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220415154626.345767-1-vladimir.oltean@nxp.com>
Date:   Fri, 15 Apr 2022 18:46:20 +0300
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     netdev@...r.kernel.org
Cc:     Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>
Subject: [PATCH net-next 0/6] DSA cross-chip notifier cleanups

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ