diff options
author | David S. Miller <davem@davemloft.net> | 2021-10-02 14:15:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 14:15:57 +0100 |
commit | fa8274b788a3766c299a3172d4f5416e574ec42d (patch) | |
tree | 62942bf9fe56ab22b1800e8e8f1586a79fd76479 /include/linux/dsa/ocelot.h | |
parent | f533bc14e21a0941b5b878ce5dda90cae65e81c3 (diff) | |
parent | 434ef35095d6d9da013d4d8f3777ffd99cce699a (diff) | |
download | linux-fa8274b788a3766c299a3172d4f5416e574ec42d.tar.gz linux-fa8274b788a3766c299a3172d4f5416e574ec42d.tar.bz2 linux-fa8274b788a3766c299a3172d4f5416e574ec42d.zip |
Merge branch 'ocelot-vlan'
Vladimir Oltean says:
====================
Egress VLAN modification using VCAP ES0 on Ocelot switches
This patch set adds support for modifying a VLAN ID at the egress stage
of Ocelot/Felix switch ports. It is useful for replicating a packet on
multiple ports, and each egress port sends it using a different VLAN ID.
Tested by rewriting the VLAN ID of both
(a) packets injected from the CPU port
(b) packets received from an external station on a front-facing port
Adding a selftest to make sure it doesn't bit-rot, and if it does, that
it can be traced back easily.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa/ocelot.h')
-rw-r--r-- | include/linux/dsa/ocelot.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dsa/ocelot.h b/include/linux/dsa/ocelot.h index 435777a0073c..0fe101e8e190 100644 --- a/include/linux/dsa/ocelot.h +++ b/include/linux/dsa/ocelot.h @@ -210,9 +210,9 @@ static inline void ocelot_ifh_set_tag_type(void *injection, u64 tag_type) packing(injection, &tag_type, 16, 16, OCELOT_TAG_LEN, PACK, 0); } -static inline void ocelot_ifh_set_vid(void *injection, u64 vid) +static inline void ocelot_ifh_set_vlan_tci(void *injection, u64 vlan_tci) { - packing(injection, &vid, 11, 0, OCELOT_TAG_LEN, PACK, 0); + packing(injection, &vlan_tci, 15, 0, OCELOT_TAG_LEN, PACK, 0); } #endif |