linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, Matthew Hagan <mnhagan88@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] net: dsa: b53: Do not force tagging on CPU port VLANs
Date: Mon, 7 Jun 2021 15:31:41 -0700	[thread overview]
Message-ID: <7ee3b08f-c734-99fe-bd97-cddb018199c5@gmail.com> (raw)
In-Reply-To: <20210607222250.zxqnwvosqeavhqhi@skbuf>



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@gmail.com>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>>  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

  reply	other threads:[~2021-06-07 22:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 22:08 [PATCH net-next 0/2] net: dsa: b53: Remove unconditional CPU VLAN tagging Florian Fainelli
2021-06-07 22:08 ` [PATCH net-next 1/2] net: dsa: b53: Do not force tagging on CPU port VLANs Florian Fainelli
2021-06-07 22:22   ` Vladimir Oltean
2021-06-07 22:31     ` Florian Fainelli [this message]
2021-06-07 22:36       ` Florian Fainelli
2021-06-07 22:08 ` [PATCH net-next 2/2] net: dsa: Remove bridge PVID untagging Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ee3b08f-c734-99fe-bd97-cddb018199c5@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnhagan88@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).