[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151104232513.GA8263@lunn.ch>
Date: Thu, 5 Nov 2015 00:25:13 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...oirfairelinux.com,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports
> > +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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists