Re: [PATCH net-next 1/2] net: dsa: b53: Do not force tagging on CPU port VLANs
From: Florian Fainelli
Date: Mon Jun 07 2021 - 18:31:57 EST
On 6/7/2021 3:22 PM, Vladimir Oltean wrote:
> On Mon, Jun 07, 2021 at 03:08:42PM -0700, Florian Fainelli wrote:
>> Commit ca8931948344 ("net: dsa: b53: Keep CPU port as tagged in all
>> VLANs") forced the CPU port to be always tagged in any VLAN membership.
>> This was necessary back then because we did not support Broadcom tags
>> for all configurations so the only way to differentiate tagged and
>> untagged traffic while DSA_TAG_PROTO_NONE was used was to force the CPU
>> port into being always tagged.
>>
>> This is not necessary anymore since 8fab459e69ab ("net: dsa: b53: Enable
>> Broadcom tags for 531x5/539x families") and we can simply program what
>> we are being told now, regardless of the port being CPU or user-facing.
>>
>> Reported-by: Matthew Hagan <mnhagan88@xxxxxxxxx>
>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>> ---
>> drivers/net/dsa/b53/b53_common.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
>> index 3ca6b394dd5f..56e3b42ec28c 100644
>> --- a/drivers/net/dsa/b53/b53_common.c
>> +++ b/drivers/net/dsa/b53/b53_common.c
>> @@ -1477,7 +1477,7 @@ int b53_vlan_add(struct dsa_switch *ds, int port,
>> untagged = true;
>>
>> vl->members |= BIT(port);
>> - if (untagged && !dsa_is_cpu_port(ds, port))
>> + if (untagged)
>> vl->untag |= BIT(port);
>> else
>> vl->untag &= ~BIT(port);
>> @@ -1514,7 +1514,7 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
>> if (pvid == vlan->vid)
>> pvid = b53_default_pvid(dev);
>>
>> - if (untagged && !dsa_is_cpu_port(ds, port))
>> + if (untagged)
>> vl->untag &= ~(BIT(port));
>>
>> b53_set_vlan_entry(dev, vlan->vid, vl);
>> --
>> 2.25.1
>>
>
> Don't you want to keep this functionality for BCM5325 / BCM5365 and
> such, which still use DSA_TAG_PROTO_NONE?
Humm, in premise yes, however I am debating removing support for
5325/5365 entirely, nobody that I know of has even been trying to get
those devices to work with that driver.
--
Florian