]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: list DSA links in the fabric
authorVivien Didelot <vivien.didelot@gmail.com>
Thu, 31 Oct 2019 02:09:13 +0000 (22:09 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 21:26:38 +0000 (14:26 -0700)
commit9c2e4d8f98d4ccb238b6404245621a2c91bd4fc3
tree41309bd98e2d94c30e76b3ada52475d1bebb86dd
parentbe6f9b401dcc681049246e779564ec64ff7f1dce
net: dsa: list DSA links in the fabric

Implement a new list of DSA links in the switch fabric itself, to
provide an alterative to the ds->rtable static arrays.

At the same time, provide a new dsa_routing_port() helper to abstract
the usage of ds->rtable in drivers. If there's no port to reach a
given device, return the first invalid port, ds->num_ports. This avoids
potential signedness errors or the need to define special values.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
include/net/dsa.h
net/dsa/dsa2.c