From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports
Date: Thu, 5 Nov 2015 00:25:13 +0100 [thread overview]
Message-ID: <20151104232513.GA8263@lunn.ch> (raw)
In-Reply-To: <563A8A05.6020401@gmail.com>
> > +int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port, u32 members)
> > +{
> > + struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
> > + const u16 pvid = 4000 + ds->index * DSA_MAX_PORTS + port;
> > + int err;
> > +
> > + /* The port joined a bridge, so leave its reserved VLAN */
> > + mutex_lock(&ps->smi_mutex);
> > + err = _mv88e6xxx_port_vlan_del(ds, port, pvid);
> > + if (!err)
> > + err = _mv88e6xxx_port_pvid_set(ds, port, 0);
>
> Does that mean that the following happens:
>
> - bridge is created and port joins it
> - port is configured to be in pvid 0 while joining
> - port is then configured again by the bridge layer to be in whatever
> pvid the user has decided
>
> The other question is, does that break isolation between multiple
> bridges on the same switch? Should we use the bridge ifindex here
> somehow as a pvid indication?
Hi Florian
The old code which got changed when VLAN support was added used some
property from the bridge to handle multiple bridges.
But that is probably a different bug to the one being fixed here.
This is all about using ports individually.
Andrew
next prev parent reply other threads:[~2015-11-04 23:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 22:23 [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports Vivien Didelot
2015-11-04 22:43 ` Florian Fainelli
2015-11-04 23:25 ` Andrew Lunn [this message]
2015-11-05 18:37 ` David Miller
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=20151104232513.GA8263@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).