diff options
| author | Tobias Waldekranz <[email protected]> | 2021-03-18 19:25:33 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-03-18 23:24:06 +0000 |
| commit | cc76ce9e8dc659561ee62876da2cffc03fb58cc5 (patch) | |
| tree | 37ac389b8d14bdb74b514e704792837f0d6c366b /drivers/net/wan/lapbether.c | |
| parent | Merge branch 'ipa-32bit' (diff) | |
| download | kernel-cc76ce9e8dc659561ee62876da2cffc03fb58cc5.tar.gz kernel-cc76ce9e8dc659561ee62876da2cffc03fb58cc5.zip | |
net: dsa: Add helper to resolve bridge port from DSA port
In order for a driver to be able to query a bridge for information
about itself, e.g. reading out port flags, it has to use a netdev that
is known to the bridge. In the simple case, that is just the netdev
representing the port, e.g. swp0 or swp1 in this example:
br0
/ \
swp0 swp1
But in the case of an offloaded lag, this will be the bond or team
interface, e.g. bond0 in this example:
br0
/
bond0
/ \
swp0 swp1
Add a helper that hides some of this complexity from the
drivers. Then, redefine dsa_port_offloads_bridge_port using the helper
to avoid double accounting of the set of possible offloaded uppers.
Signed-off-by: Tobias Waldekranz <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
0 files changed, 0 insertions, 0 deletions
