On Mon, Feb 01, 2021 at 14:24, DENG Qingfang <dqf...@gmail.com> wrote:
> Hi Tobias,
>
> I've tested your patch series on kernel 5.4 and found that it only works
> when VLAN filtering is enabled.
> After some debugging, I noticed DSA will add static entries to ATU 0 if
> VLAN filtering is disabled, regardless of default_pvid of the bridge,
> which is also the ATU# used by the bridge.

Good catch, thanks! This seems to stem from a different policy regarding
VLAN assignment in the bridge vs. how a Marvell switch works.

By default, a bridge will use a default PVID of 1, even when VLAN
filtering is disabled (nbp_vlan_init). Yet it will assign all packets to
VLAN 0 on ingress (br_handle_frame_finish->br_allowed_ingress).

The switch OTOH, will use the PVID of the port for all packets when
802.1Q is disabled, thus assigning all packets to VLAN 1 when VLAN
filtering is disabled.

Andrew, Vladimir: Should mv88e6xxx always set the PVID to 0 when VLAN
filtering is disabled?

> Currently I use the hack below to rewrite ATU# to 1, but it obviously
> does not solve the root cause.

Alternatively, as a userspace workaround, you can change the default
PVID to 0:

ip link set dev $BR type bridge vlan_default_pvid 0

Reply via email to