diff options
| author | David S. Miller <davem@davemloft.net> | 2021-06-21 12:50:20 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2021-06-21 12:50:20 -0700 |
| commit | 6ff5f8135af71beaa1345fc10eb595c7c39f9424 (patch) | |
| tree | a0b008535cbfc4cf904fa6661f043090f248940a /include | |
| parent | 41505d3f0f51329c959e92479ed1219a2e85f5c2 (diff) | |
| parent | f9bcdc362c7776b875c0f390e982cbac597d660f (diff) | |
Merge branch 'dsa-cross-chip'
Vladimir Oltean says:
====================
Improvement for DSA cross-chip setups
This series improves some aspects in multi-switch DSA tree topologies:
- better device tree validation
- better handling of MTU changes
- better handling of multicast addresses
- removal of some unused code
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 289d68e82da0..ea47783d5695 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -409,6 +409,21 @@ static inline struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p) return NULL; } +static inline bool dsa_port_is_dsa(struct dsa_port *port) +{ + return port->type == DSA_PORT_TYPE_DSA; +} + +static inline bool dsa_port_is_cpu(struct dsa_port *port) +{ + return port->type == DSA_PORT_TYPE_CPU; +} + +static inline bool dsa_port_is_user(struct dsa_port *dp) +{ + return dp->type == DSA_PORT_TYPE_USER; +} + static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p) { return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED; |
