• Vladimir Oltean's avatar
    net: dsa: convert cross-chip notifiers to iterate using dp · fac6abd5
    Vladimir Oltean authored
    
    
    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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fac6abd5
switch.c 18.5 KB