]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: use ports list to setup default CPU port
authorVivien Didelot <vivien.didelot@gmail.com>
Mon, 21 Oct 2019 20:51:24 +0000 (16:51 -0400)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 19:37:07 +0000 (12:37 -0700)
commit8c24b56285e2149ee4121ad84a62a82b62d8cf74
treedc0c58861bfc4b42552b218e7ff7b3f75422375d
parent9a20add4f58dcf3d88284c8c8cbea55c0dd05d02
net: dsa: use ports list to setup default CPU port

Use the new ports list instead of iterating over switches and their
ports when setting up the default CPU port. Unassign it on teardown.

Now that we can iterate over multiple CPU ports, remove dst->cpu_dp.

At the same time, provide a better error message for CPU-less tree.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
include/net/dsa.h
net/dsa/dsa2.c