OSDN Git Service

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)
commitfac6abd5f13297ddeae7ff6eb903e933cffc071b
treebebbbd86c881483a55e7de8124dbfa18da19b5f1
parent57d77986e7428752a05358386e3f80c2a08c13a7
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