]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: convert cross-chip notifiers to iterate using dp
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 20 Oct 2021 17:49:53 +0000 (20:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Oct 2021 11:44:07 +0000 (12:44 +0100)
commit3792621af7b56f0276dfa982419391dfaa30e008
treebebbbd86c881483a55e7de8124dbfa18da19b5f1
parentb9757dd5a002a5470c2482da0147418c7a539dd0
net: dsa: convert cross-chip notifiers to iterate using dp

The majority of cross-chip switch notifiers need to filter in some way
over the type of ports: some install VLANs etc on all cascade ports.

The difference is that the matching function, which filters by port
type, is separate from the function where the iteration happens. So this
patch needs to refactor the matching functions' prototypes as well, to
take the dp as argument.

In a future patch/series, I might convert dsa_towards_port to return a
struct dsa_port *dp too, but at the moment it is a bit entangled with
dsa_routing_port which is also used by mv88e6xxx and they both return an
int port. So keep dsa_towards_port the way it is and convert it into a
dp using dsa_to_port.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/switch.c
net/dsa/tag_8021q.c