netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Ido Schimmel <idosch@idosch.org>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	nikolay@cumulusnetworks.com,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 6/6] net: dsa: tag_8021q: Restore bridge pvid when enabling vlan_filtering
Date: Tue, 20 Aug 2019 10:36:38 -0700	[thread overview]
Message-ID: <9a74874b-a932-f0f9-510d-687e4c9353d7@gmail.com> (raw)
In-Reply-To: <CA+h21hody3hu_6UE9gU4dQ5+BP5HnUi=uw0PDdvtgPjTrbpKbw@mail.gmail.com>

On 8/20/19 3:28 AM, Vladimir Oltean wrote:
> Hi Florian,
> 
> On Tue, 20 Aug 2019 at 06:33, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>>
>>
>> On 8/19/2019 5:00 PM, Vladimir Oltean wrote:
>>> The bridge core assumes that enabling/disabling vlan_filtering will
>>> translate into the simple toggling of a flag for switchdev drivers.
>>>
>>> That is clearly not the case for sja1105, which alters the VLAN table
>>> and the pvids in order to obtain port separation in standalone mode.
>>>
>>> So, since the bridge will not call any vlan operation through switchdev
>>> after enabling vlan_filtering, we need to ensure we're in a functional
>>> state ourselves.
>>>
>>> Hence read the pvid that the bridge is aware of, and program that into
>>> our ports.
>>
>> That is arguably applicable with DSA at large and not just specifically
>> for tag_8021q.c no? Is there a reason why you are not seeking to solve
>> this on a more global scale?
>>
> 
> Perhaps because I don't have a good feel for what are other DSA
> drivers' struggles with restoring the pvid, even after re-reading the
> "What to do when a bridge port gets its pvid deleted?" thread.
> I understand b53 has a similar need, and for that purpose maybe you
> can EXPORT_SYMBOL_GPL(dsa_port_restore_pvid) and use it, but
> otherwise, what is the more global scale?

I was just referring to all DSA drivers, not just tag_8021q.c which is,
so far a very narrow user base. I don't have a strong feeling against
calling a helper function versus the core DSA layer doing this for you,
but clearly this is something that should plague all drivers, not just
sja1105, even if the effects of not restoring the PVID there may be more
"catastrophic".
-- 
Florian

  reply	other threads:[~2019-08-20 17:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 23:59 [PATCH net-next 0/6] Dynamic toggling of vlan_filtering for SJA1105 DSA Vladimir Oltean
2019-08-19 23:59 ` [PATCH net-next 1/6] net: dsa: tag_8021q: Future-proof the reserved fields in the custom VID Vladimir Oltean
2019-08-20  3:16   ` Florian Fainelli
2019-08-19 23:59 ` [PATCH net-next 2/6] net: bridge: Populate the pvid flag in br_vlan_get_info Vladimir Oltean
2019-08-20  0:12   ` Nikolay Aleksandrov
2019-08-19 23:59 ` [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well Vladimir Oltean
2019-08-20  5:51   ` Vivien Didelot
2019-08-20  9:54     ` Vladimir Oltean
2019-08-20 17:52       ` Vivien Didelot
2019-08-20 19:40         ` Florian Fainelli
2019-08-20 20:40           ` Vladimir Oltean
2019-08-20 20:58             ` Vivien Didelot
2019-08-20 21:02               ` Vladimir Oltean
2019-08-20 21:36                 ` Vivien Didelot
2019-08-20 22:09                   ` Vladimir Oltean
2019-08-21  3:30                     ` Vivien Didelot
2019-08-21  9:51                       ` Vladimir Oltean
2019-08-20  0:00 ` [PATCH net-next 4/6] net: dsa: Don't program the VLAN as pvid on the upstream port Vladimir Oltean
2019-08-20  3:15   ` Florian Fainelli
2019-08-20 12:09     ` Vladimir Oltean
2019-08-20 22:43       ` Florian Fainelli
2019-08-20  6:07   ` Vivien Didelot
2019-08-20 10:22     ` Vladimir Oltean
2019-08-20  0:00 ` [PATCH net-next 5/6] net: dsa: Allow proper internal use of VLANs Vladimir Oltean
2019-08-20  3:20   ` Florian Fainelli
2019-08-20  0:00 ` [PATCH net-next 6/6] net: dsa: tag_8021q: Restore bridge pvid when enabling vlan_filtering Vladimir Oltean
2019-08-20  3:32   ` Florian Fainelli
2019-08-20 10:28     ` Vladimir Oltean
2019-08-20 17:36       ` Florian Fainelli [this message]
2019-08-20 23:24   ` Florian Fainelli
2019-08-20  8:04 ` [PATCH net-next 0/6] Dynamic toggling of vlan_filtering for SJA1105 DSA Vivien Didelot
2019-08-20 10:18   ` Vladimir Oltean

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=9a74874b-a932-f0f9-510d-687e4c9353d7@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=olteanv@gmail.com \
    --cc=roopa@cumulusnetworks.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).