All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Petr Machata <petrm@mellanox.com>
Cc: devel@driverdev.osuosl.org,
	Florian Fainelli <f.fainelli@gmail.com>,
	andrew@lunn.ch, nikolay@cumulusnetworks.com,
	netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
	idosch@mellanox.com, jiri@mellanox.com,
	razvan.stefanescu@nxp.com, gregkh@linuxfoundation.org,
	vivien.didelot@savoirfairelinux.com, davem@davemloft.net
Subject: Re: [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs
Date: Fri, 25 May 2018 15:33:49 +0300	[thread overview]
Message-ID: <20180525123348.GA15604@apalos> (raw)
In-Reply-To: <wihbmd4gi6t.fsf@dev-r-vrt-156.mtr.labs.mlnx>

On Fri, May 25, 2018 at 01:09:46PM +0300, Petr Machata wrote:
> Florian Fainelli <f.fainelli@gmail.com> writes:
> 
> > You seem to have approached the bridge changes a little differently from
> > this series:
> >
> > https://lists.linux-foundation.org/pipermail/bridge/2016-November/010112.html
> 
> It pretty much extends the patchset to also send the notifications for
> the CPU port.
> 
> I missed this e-mail yesterday and now I see you already found out for
> yourself how it behaves.
> 
> > Both have the same intent that by targeting the bridge device itself,
> > you can propagate that through switchdev to the switch drivers, and in
> > turn create configurations where for instance, you have:
> >
> > - CPU/management port present in specific VLANs that is a subset or
> > superset of the VLANs configured on front-panel ports
> > - CPU/management port tagged/untagged in specific VLANs which can be a
> > different setting from the front-panel ports
> >
> > One problem we have in DSA at the moment is that we always add the CPU
> > port to the VLANs configured to the front-panel port but we do this with
> > the same attributes as the front panel ports! For instance, if you add
> > Port 0 to VLAN1 untagged, the the CPU port also gets added to that
> > VLAN1, also untagged. As long as there is just one VLAN untagged, this
> > is not much of a problem. Now do this with another VLAN or another port,
> > and the CPU can no longer differentiate the traffic from which VLAN it
> > is coming from, no bueno.
> 
> Yep, with this patchset you should be able to use the CPU port
> notifications to configure things exactly.
> 
> > bridge vlan add vid 2 dev port0 pvid untagged
> > 	-> port0 (e.g: switch port 0) gets programmed
> > 	-> CPU port gets programmed
> > bridge vlan add vid 2 dev br0 self
> > 	-> CPU port gets programmed
> > bridge vlan add vid 2 dev port0
> > 	-> port0 (switch port 0) gets programmed
> >
> > Are these use cases possible with your series? It seems to me like it is
> > if we drop the netif_is_bridge_master() checks and resolve orig_dev as
> > being a hint for the CPU/management port.
> 
> Yeah, that's how it behaves. If you accept the events where
> netif_is_bridge_master(orig_dev), you can tell the CPU port-related
> events from the rest by BRIDGE_VLAN_INFO_BRENTRY.
This also addresses the issue i am having trying to add switchdev functionality
to a driver that needs separate configuration for cpu port.  
https://www.spinics.net/lists/netdev/msg504577.html

Tested it and it works fine

Thanks,
Ilias

WARNING: multiple messages have this Message-ID (diff)
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Petr Machata <petrm@mellanox.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, devel@driverdev.osuosl.org,
	bridge@lists.linux-foundation.org, jiri@mellanox.com,
	idosch@mellanox.com, davem@davemloft.net,
	razvan.stefanescu@nxp.com, gregkh@linuxfoundation.org,
	stephen@networkplumber.org, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, nikolay@cumulusnetworks.com
Subject: Re: [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs
Date: Fri, 25 May 2018 15:33:49 +0300	[thread overview]
Message-ID: <20180525123348.GA15604@apalos> (raw)
In-Reply-To: <wihbmd4gi6t.fsf@dev-r-vrt-156.mtr.labs.mlnx>

On Fri, May 25, 2018 at 01:09:46PM +0300, Petr Machata wrote:
> Florian Fainelli <f.fainelli@gmail.com> writes:
> 
> > You seem to have approached the bridge changes a little differently from
> > this series:
> >
> > https://lists.linux-foundation.org/pipermail/bridge/2016-November/010112.html
> 
> It pretty much extends the patchset to also send the notifications for
> the CPU port.
> 
> I missed this e-mail yesterday and now I see you already found out for
> yourself how it behaves.
> 
> > Both have the same intent that by targeting the bridge device itself,
> > you can propagate that through switchdev to the switch drivers, and in
> > turn create configurations where for instance, you have:
> >
> > - CPU/management port present in specific VLANs that is a subset or
> > superset of the VLANs configured on front-panel ports
> > - CPU/management port tagged/untagged in specific VLANs which can be a
> > different setting from the front-panel ports
> >
> > One problem we have in DSA at the moment is that we always add the CPU
> > port to the VLANs configured to the front-panel port but we do this with
> > the same attributes as the front panel ports! For instance, if you add
> > Port 0 to VLAN1 untagged, the the CPU port also gets added to that
> > VLAN1, also untagged. As long as there is just one VLAN untagged, this
> > is not much of a problem. Now do this with another VLAN or another port,
> > and the CPU can no longer differentiate the traffic from which VLAN it
> > is coming from, no bueno.
> 
> Yep, with this patchset you should be able to use the CPU port
> notifications to configure things exactly.
> 
> > bridge vlan add vid 2 dev port0 pvid untagged
> > 	-> port0 (e.g: switch port 0) gets programmed
> > 	-> CPU port gets programmed
> > bridge vlan add vid 2 dev br0 self
> > 	-> CPU port gets programmed
> > bridge vlan add vid 2 dev port0
> > 	-> port0 (switch port 0) gets programmed
> >
> > Are these use cases possible with your series? It seems to me like it is
> > if we drop the netif_is_bridge_master() checks and resolve orig_dev as
> > being a hint for the CPU/management port.
> 
> Yeah, that's how it behaves. If you accept the events where
> netif_is_bridge_master(orig_dev), you can tell the CPU port-related
> events from the rest by BRIDGE_VLAN_INFO_BRENTRY.
This also addresses the issue i am having trying to add switchdev functionality
to a driver that needs separate configuration for cpu port.  
https://www.spinics.net/lists/netdev/msg504577.html

Tested it and it works fine

Thanks,
Ilias

  reply	other threads:[~2018-05-25 12:33 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 15:09 [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-24 15:09 ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*() Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-25 12:04   ` [Bridge] " Nikolay Aleksandrov
2018-05-25 12:04     ` Nikolay Aleksandrov
2018-05-25 16:10   ` [Bridge] " Vivien Didelot
2018-05-25 16:10     ` Vivien Didelot
2018-05-25 16:56     ` [Bridge] " Petr Machata
2018-05-25 16:56       ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 3/7] rocker: rocker_main: " Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 4/7] dsa: port: " Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-25 16:11   ` [Bridge] " Vivien Didelot
2018-05-25 16:11     ` Vivien Didelot
2018-05-24 15:10 ` [Bridge] [PATCH net-next 5/7] staging: fsl-dpaa2: ethsw: " Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-25 12:08   ` [Bridge] " Nikolay Aleksandrov
2018-05-25 12:08     ` Nikolay Aleksandrov
2018-05-25 16:17   ` [Bridge] " Vivien Didelot
2018-05-25 16:17     ` Vivien Didelot
2018-05-25 17:00     ` [Bridge] " Petr Machata
2018-05-25 17:00       ` Petr Machata
2018-05-26 14:54       ` [Bridge] " Vivien Didelot
2018-05-26 14:54         ` Vivien Didelot
2018-05-28  8:20         ` [Bridge] " Petr Machata
2018-05-28  8:20           ` Petr Machata
2018-05-24 15:10 ` [Bridge] [PATCH net-next 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare Petr Machata
2018-05-24 15:10   ` Petr Machata
2018-05-24 17:20 ` [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs Florian Fainelli
2018-05-24 17:20   ` Florian Fainelli
2018-05-25  3:40   ` [Bridge] " Florian Fainelli
2018-05-25  3:40     ` Florian Fainelli
2018-05-25 16:31     ` [Bridge] " Vivien Didelot
2018-05-25 16:31       ` Vivien Didelot
2018-05-25 10:09   ` [Bridge] " Petr Machata
2018-05-25 10:09     ` Petr Machata
2018-05-25 12:33     ` Ilias Apalodimas [this message]
2018-05-25 12:33       ` Ilias Apalodimas
2018-05-25  3:41 ` [Bridge] " Florian Fainelli
2018-05-25  3:41   ` 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=20180525123348.GA15604@apalos \
    --to=ilias.apalodimas@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=petrm@mellanox.com \
    --cc=razvan.stefanescu@nxp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.