Re: [PATCH net] net: dsa: b53: be VLAN unaware when not filtering

Florian Fainelli <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/11/26 01:06, Jonas Gorski wrote:
> On Mon, Aug 10, 2026 at 2:04 PM Vladimir Oltean <[email protected]> wrote:
>>
>> On Thu, Aug 06, 2026 at 01:09:03PM +0200, Jonas Gorski wrote:
>>>> static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)
>>>> {
>>>>          u8 reg;
>>>>
>>>>          if (op > ARLTBL_RW)
>>>>                  return -EINVAL;
>>>>
>>>>          b53_read8(dev, B53_ARLIO_PAGE, B53_ARLTBL_RW_CTRL, &reg);
>>>>          reg |= ARLTBL_START_DONE;
>>>>          if (op)
>>>>                  reg |= ARLTBL_RW;
>>>>          else
>>>>                  reg &= ~ARLTBL_RW;
>>>>          if (dev->vlan_enabled)
>>>>                  reg &= ~ARLTBL_IVL_SVL_SELECT;
>>>>          else
>>>>                  reg |= ARLTBL_IVL_SVL_SELECT;
>>>
>>> This ARLTBL_IVL_SVL_SELECT bit is only implemented for a small subset
>>> of switches (bcm5302x / bcm58* and bcm53134). Additionally, according
>>> to the register description, this also requires enabling "per port
>>> IVL/SVL" mode, which is not enable by b53. The description of that
>>> also says that the VIDs used in SVL ports must not be used in IVL
>>> ports. No idea what the consequences are if they do.
>>
>> What does enabling per port IVL/SVL mode do?
> 
> I don't have access to a datasheet or a device to test, Florian will
> need to answer that completely.

Not a whole lot of details in the datasheet, but essentially what is 
being provided is:

IVL: a given MAC address can only appear in one VLAN
SVL: a given MAC address can appear on different ports as long as the 
ports are not in the same VLAN.

> 
> I can only guess from the register descriptions, which imply that
> enabling SVL for port makes any ARL lookups SVL based, i.e. VID is
> ignored/forced to 0. Presumably this essentially only applies to for
> frames received on that port for lookup / learning.
> 
> There is a global option for configuring IVL or SVL, but this option
> is only valid when VLAN-aware is enabled in the switch. Without it,
> learning is always SVL.
> 
> I do not know how the per port IVL/SVL actually register works, and
> whether you can enable IVL in VLAN-unaware mode (I would guess not).

IVL/SVL applies to 802.1Q (VLAN enabled) mode, double tagging mode and 
individual double tagging mode, so yes this depends on VLAN being 
enabled globally.

> 
> Note that there is no differentiation in ARL entries themselves
> whether they are IVL or SVL entries, only the table index calculation
> changes.
> 
> Best regards,
> Jonas


-- 
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.