mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 04:37:57 +07:00
b9cd75e668
The switch driver keeps a "vid" variable per port, which signifies _the_
VLAN ID that is stripped on that port's egress (aka the native VLAN on a
trunk port).
That is the way the hardware is designed (mostly). The port->vid is
programmed into REW:PORT:PORT_VLAN_CFG:PORT_VID and the rewriter is told
to send all traffic as tagged except the one having port->vid.
There exists a possibility of finer-grained egress untagging decisions:
using the VCAP IS1 engine, one rule can be added to match every
VLAN-tagged frame whose VLAN should be untagged, and set POP_CNT=1 as
action. However, the IS1 can hold at most 512 entries, and the VLANs are
in the order of 6 * 4096.
So the code is fine for now. But this sequence of commands:
$ bridge vlan add dev swp0 vid 1 pvid untagged
$ bridge vlan add dev swp0 vid 2 untagged
makes untagged and pvid-tagged traffic be sent out of swp0 as tagged
with VID 1, despite user's request.
Prevent that from happening. The user should temporarily remove the
existing untagged VLAN (1 in this case), add it back as tagged, and then
add the new untagged VLAN (2 in this case).
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
ocelot_ace.c | ||
ocelot_ace.h | ||
ocelot_ana.h | ||
ocelot_board.c | ||
ocelot_dev.h | ||
ocelot_flower.c | ||
ocelot_io.c | ||
ocelot_police.c | ||
ocelot_police.h | ||
ocelot_ptp.h | ||
ocelot_qs.h | ||
ocelot_qsys.h | ||
ocelot_regs.c | ||
ocelot_rew.h | ||
ocelot_s2.h | ||
ocelot_sys.h | ||
ocelot_tc.c | ||
ocelot_tc.h | ||
ocelot_vcap.h | ||
ocelot.c | ||
ocelot.h |