Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262732

Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports
Date 2015-11-05 00:30 +0100
Message-ID <qrfF7-75I-1@gated-at.bofh.it> (permalink)
References <qreJ4-6sC-17@gated-at.bofh.it> <qrf2q-6BJ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > +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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-11-04 23:30 +0100
  Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports Florian Fainelli <f.fainelli@gmail.com> - 2015-11-04 23:50 +0100
    Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports Andrew Lunn <andrew@lunn.ch> - 2015-11-05 00:30 +0100
  Re: [PATCH net] net: dsa: mv88e6xxx: isolate unbridged ports David Miller <davem@davemloft.net> - 2015-11-05 19:40 +0100

csiph-web