linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers
@ 2022-02-16 16:47 Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY Vladimir Oltean
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

As discussed here:
https://patchwork.kernel.org/project/netdevbpf/patch/20220214233111.1586715-2-vladimir.oltean@nxp.com/#24738869

no switchdev driver makes use of VLAN port objects that lack the
BRIDGE_VLAN_INFO_BRENTRY flag. Notifying them in the first place rather
seems like an omission of commit 9c86ce2c1ae3 ("net: bridge: Notify
about bridge VLANs").

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag") that was just merged, the bridge no
longer notifies switchdev upon creation of these VLANs, so we can remove
the checks from drivers.

Vladimir Oltean (5):
  mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  net: ti: am65-cpsw-nuss: remove guards against
    !BRIDGE_VLAN_INFO_BRENTRY
  net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY

 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c  |  4 +---
 .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c |  3 +--
 .../ethernet/microchip/lan966x/lan966x_switchdev.c   | 12 ------------
 .../net/ethernet/microchip/sparx5/sparx5_switchdev.c | 10 ++++------
 drivers/net/ethernet/ti/am65-cpsw-switchdev.c        |  4 ----
 drivers/net/ethernet/ti/cpsw_switchdev.c             |  4 ----
 6 files changed, 6 insertions(+), 31 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
@ 2022-02-16 16:47 ` Vladimir Oltean
  2022-02-16 21:31   ` Ido Schimmel
  2022-02-16 16:47 ` [PATCH net-next 2/5] net: lan966x: " Vladimir Oltean
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c      | 4 +---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
index f9671cc53002..5459490c7790 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
@@ -269,9 +269,7 @@ mlxsw_sp_span_entry_bridge_8021q(const struct net_device *br_dev,
 
 	if (!vid && WARN_ON(br_vlan_get_pvid(br_dev, &vid)))
 		return NULL;
-	if (!vid ||
-	    br_vlan_get_info(br_dev, vid, &vinfo) ||
-	    !(vinfo.flags & BRIDGE_VLAN_INFO_BRENTRY))
+	if (!vid || br_vlan_get_info(br_dev, vid, &vinfo))
 		return NULL;
 
 	edev = br_fdb_find_port(br_dev, dmac, vid);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index bffdb41fc4ed..3bf12092a8a2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1234,8 +1234,7 @@ static int mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port,
 	if (netif_is_bridge_master(orig_dev)) {
 		int err = 0;
 
-		if ((vlan->flags & BRIDGE_VLAN_INFO_BRENTRY) &&
-		    br_vlan_enabled(orig_dev))
+		if (br_vlan_enabled(orig_dev))
 			err = mlxsw_sp_br_ban_rif_pvid_change(mlxsw_sp,
 							      orig_dev, vlan);
 		if (!err)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 2/5] net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY Vladimir Oltean
@ 2022-02-16 16:47 ` Vladimir Oltean
  2022-02-16 22:54   ` Horatiu Vultur
  2022-02-16 16:47 ` [PATCH net-next 3/5] net: sparx5: " Vladimir Oltean
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 .../ethernet/microchip/lan966x/lan966x_switchdev.c   | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
index 9fce865287e7..85099a51d4c7 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
@@ -463,18 +463,6 @@ static int lan966x_handle_port_vlan_add(struct lan966x_port *port,
 	const struct switchdev_obj_port_vlan *v = SWITCHDEV_OBJ_PORT_VLAN(obj);
 	struct lan966x *lan966x = port->lan966x;
 
-	/* When adding a port to a vlan, we get a callback for the port but
-	 * also for the bridge. When get the callback for the bridge just bail
-	 * out. Then when the bridge is added to the vlan, then we get a
-	 * callback here but in this case the flags has set:
-	 * BRIDGE_VLAN_INFO_BRENTRY. In this case it means that the CPU
-	 * port is added to the vlan, so the broadcast frames and unicast frames
-	 * with dmac of the bridge should be foward to CPU.
-	 */
-	if (netif_is_bridge_master(obj->orig_dev) &&
-	    !(v->flags & BRIDGE_VLAN_INFO_BRENTRY))
-		return 0;
-
 	if (!netif_is_bridge_master(obj->orig_dev))
 		lan966x_vlan_port_add_vlan(port, v->vid,
 					   v->flags & BRIDGE_VLAN_INFO_PVID,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 3/5] net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 2/5] net: lan966x: " Vladimir Oltean
@ 2022-02-16 16:47 ` Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 4/5] net: ti: am65-cpsw-nuss: " Vladimir Oltean
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 .../net/ethernet/microchip/sparx5/sparx5_switchdev.c   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
index 649ca609884a..f5271c3ec133 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
@@ -369,13 +369,11 @@ static int sparx5_handle_port_vlan_add(struct net_device *dev,
 	struct sparx5_port *port = netdev_priv(dev);
 
 	if (netif_is_bridge_master(dev)) {
-		if (v->flags & BRIDGE_VLAN_INFO_BRENTRY) {
-			struct sparx5 *sparx5 =
-				container_of(nb, struct sparx5,
-					     switchdev_blocking_nb);
+		struct sparx5 *sparx5 =
+			container_of(nb, struct sparx5,
+				     switchdev_blocking_nb);
 
-			sparx5_sync_bridge_dev_addr(dev, sparx5, v->vid, true);
-		}
+		sparx5_sync_bridge_dev_addr(dev, sparx5, v->vid, true);
 		return 0;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 4/5] net: ti: am65-cpsw-nuss: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
                   ` (2 preceding siblings ...)
  2022-02-16 16:47 ` [PATCH net-next 3/5] net: sparx5: " Vladimir Oltean
@ 2022-02-16 16:47 ` Vladimir Oltean
  2022-02-16 16:47 ` [PATCH net-next 5/5] net: ti: cpsw: " Vladimir Oltean
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/ti/am65-cpsw-switchdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-switchdev.c b/drivers/net/ethernet/ti/am65-cpsw-switchdev.c
index 599708a3e81d..d4c56da98a6a 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-switchdev.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-switchdev.c
@@ -237,15 +237,11 @@ static int am65_cpsw_port_vlans_add(struct am65_cpsw_port *port,
 {
 	bool untag = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
 	struct net_device *orig_dev = vlan->obj.orig_dev;
-	bool cpu_port = netif_is_bridge_master(orig_dev);
 	bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
 
 	netdev_dbg(port->ndev, "VID add: %s: vid:%u flags:%X\n",
 		   port->ndev->name, vlan->vid, vlan->flags);
 
-	if (cpu_port && !(vlan->flags & BRIDGE_VLAN_INFO_BRENTRY))
-		return 0;
-
 	return am65_cpsw_port_vlan_add(port, untag, pvid, vlan->vid, orig_dev);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH net-next 5/5] net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
                   ` (3 preceding siblings ...)
  2022-02-16 16:47 ` [PATCH net-next 4/5] net: ti: am65-cpsw-nuss: " Vladimir Oltean
@ 2022-02-16 16:47 ` Vladimir Oltean
  2022-02-16 20:25 ` [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Nikolay Aleksandrov
  2022-02-17 14:30 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 16:47 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/ti/cpsw_switchdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw_switchdev.c b/drivers/net/ethernet/ti/cpsw_switchdev.c
index a7d97d429e06..ce85f7610273 100644
--- a/drivers/net/ethernet/ti/cpsw_switchdev.c
+++ b/drivers/net/ethernet/ti/cpsw_switchdev.c
@@ -252,15 +252,11 @@ static int cpsw_port_vlans_add(struct cpsw_priv *priv,
 {
 	bool untag = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
 	struct net_device *orig_dev = vlan->obj.orig_dev;
-	bool cpu_port = netif_is_bridge_master(orig_dev);
 	bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
 
 	dev_dbg(priv->dev, "VID add: %s: vid:%u flags:%X\n",
 		priv->ndev->name, vlan->vid, vlan->flags);
 
-	if (cpu_port && !(vlan->flags & BRIDGE_VLAN_INFO_BRENTRY))
-		return 0;
-
 	return cpsw_port_vlan_add(priv, untag, pvid, vlan->vid, orig_dev);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
                   ` (4 preceding siblings ...)
  2022-02-16 16:47 ` [PATCH net-next 5/5] net: ti: cpsw: " Vladimir Oltean
@ 2022-02-16 20:25 ` Nikolay Aleksandrov
  2022-02-16 20:42   ` Vladimir Oltean
  2022-02-17 14:30 ` patchwork-bot+netdevbpf
  6 siblings, 1 reply; 11+ messages in thread
From: Nikolay Aleksandrov @ 2022-02-16 20:25 UTC (permalink / raw)
  To: Vladimir Oltean, netdev
  Cc: David S. Miller, Jakub Kicinski, Ido Schimmel, Petr Machata,
	Horatiu Vultur, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

On 16/02/2022 18:47, Vladimir Oltean wrote:
> As discussed here:
> https://patchwork.kernel.org/project/netdevbpf/patch/20220214233111.1586715-2-vladimir.oltean@nxp.com/#24738869
> 
> no switchdev driver makes use of VLAN port objects that lack the
> BRIDGE_VLAN_INFO_BRENTRY flag. Notifying them in the first place rather
> seems like an omission of commit 9c86ce2c1ae3 ("net: bridge: Notify
> about bridge VLANs").
> 
> Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
> master VLANs without BRENTRY flag") that was just merged, the bridge no
> longer notifies switchdev upon creation of these VLANs, so we can remove
> the checks from drivers.
> 
> Vladimir Oltean (5):
>   mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
>   net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
>   net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
>   net: ti: am65-cpsw-nuss: remove guards against
>     !BRIDGE_VLAN_INFO_BRENTRY
>   net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
> 
>  drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c  |  4 +---
>  .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c |  3 +--
>  .../ethernet/microchip/lan966x/lan966x_switchdev.c   | 12 ------------
>  .../net/ethernet/microchip/sparx5/sparx5_switchdev.c | 10 ++++------
>  drivers/net/ethernet/ti/am65-cpsw-switchdev.c        |  4 ----
>  drivers/net/ethernet/ti/cpsw_switchdev.c             |  4 ----
>  6 files changed, 6 insertions(+), 31 deletions(-)

Notifications for placeholders shouldn't have been sent in the first place.
Noone outside the bridge should access a vlan without brentry flag.

For the set:

Reviewed-by: Nikolay Aleksandrov <nikolay@nvidia.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers
  2022-02-16 20:25 ` [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Nikolay Aleksandrov
@ 2022-02-16 20:42   ` Vladimir Oltean
  0 siblings, 0 replies; 11+ messages in thread
From: Vladimir Oltean @ 2022-02-16 20:42 UTC (permalink / raw)
  To: Nikolay Aleksandrov
  Cc: netdev, David S. Miller, Jakub Kicinski, Ido Schimmel,
	Petr Machata, Horatiu Vultur, UNGLinuxDriver, Lars Povlsen,
	Steen Hegelund, Grygorii Strashko, Karsten Graul, linux-omap

On Wed, Feb 16, 2022 at 10:25:45PM +0200, Nikolay Aleksandrov wrote:
> On 16/02/2022 18:47, Vladimir Oltean wrote:
> > As discussed here:
> > https://patchwork.kernel.org/project/netdevbpf/patch/20220214233111.1586715-2-vladimir.oltean@nxp.com/#24738869
> > 
> > no switchdev driver makes use of VLAN port objects that lack the
> > BRIDGE_VLAN_INFO_BRENTRY flag. Notifying them in the first place rather
> > seems like an omission of commit 9c86ce2c1ae3 ("net: bridge: Notify
> > about bridge VLANs").
> > 
> > Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
> > master VLANs without BRENTRY flag") that was just merged, the bridge no
> > longer notifies switchdev upon creation of these VLANs, so we can remove
> > the checks from drivers.
> > 
> > Vladimir Oltean (5):
> >   mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
> >   net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
> >   net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
> >   net: ti: am65-cpsw-nuss: remove guards against
> >     !BRIDGE_VLAN_INFO_BRENTRY
> >   net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
> > 
> >  drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c  |  4 +---
> >  .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c |  3 +--
> >  .../ethernet/microchip/lan966x/lan966x_switchdev.c   | 12 ------------
> >  .../net/ethernet/microchip/sparx5/sparx5_switchdev.c | 10 ++++------
> >  drivers/net/ethernet/ti/am65-cpsw-switchdev.c        |  4 ----
> >  drivers/net/ethernet/ti/cpsw_switchdev.c             |  4 ----
> >  6 files changed, 6 insertions(+), 31 deletions(-)
> 
> Notifications for placeholders shouldn't have been sent in the first place.
> Noone outside the bridge should access a vlan without brentry flag.
> 
> For the set:
> 
> Reviewed-by: Nikolay Aleksandrov <nikolay@nvidia.com>

Thanks for reviewing, I didn't copy you because I didn't want to spam
your inbox even more...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 ` [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY Vladimir Oltean
@ 2022-02-16 21:31   ` Ido Schimmel
  0 siblings, 0 replies; 11+ messages in thread
From: Ido Schimmel @ 2022-02-16 21:31 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, David S. Miller, Jakub Kicinski, Ido Schimmel,
	Petr Machata, Horatiu Vultur, UNGLinuxDriver, Lars Povlsen,
	Steen Hegelund, Grygorii Strashko, Karsten Graul, linux-omap

On Wed, Feb 16, 2022 at 06:47:48PM +0200, Vladimir Oltean wrote:
> Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
> master VLANs without BRENTRY flag"), the bridge no longer emits
> switchdev notifiers for VLANs that don't have the
> BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
> Remove them.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 2/5] net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
  2022-02-16 16:47 ` [PATCH net-next 2/5] net: lan966x: " Vladimir Oltean
@ 2022-02-16 22:54   ` Horatiu Vultur
  0 siblings, 0 replies; 11+ messages in thread
From: Horatiu Vultur @ 2022-02-16 22:54 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, David S. Miller, Jakub Kicinski, Ido Schimmel,
	Petr Machata, UNGLinuxDriver, Lars Povlsen, Steen Hegelund,
	Grygorii Strashko, Karsten Graul, linux-omap

The 02/16/2022 18:47, Vladimir Oltean wrote:
> 
> Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
> master VLANs without BRENTRY flag"), the bridge no longer emits
> switchdev notifiers for VLANs that don't have the
> BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
> Remove them.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>

> ---
>  .../ethernet/microchip/lan966x/lan966x_switchdev.c   | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
> index 9fce865287e7..85099a51d4c7 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
> @@ -463,18 +463,6 @@ static int lan966x_handle_port_vlan_add(struct lan966x_port *port,
>         const struct switchdev_obj_port_vlan *v = SWITCHDEV_OBJ_PORT_VLAN(obj);
>         struct lan966x *lan966x = port->lan966x;
> 
> -       /* When adding a port to a vlan, we get a callback for the port but
> -        * also for the bridge. When get the callback for the bridge just bail
> -        * out. Then when the bridge is added to the vlan, then we get a
> -        * callback here but in this case the flags has set:
> -        * BRIDGE_VLAN_INFO_BRENTRY. In this case it means that the CPU
> -        * port is added to the vlan, so the broadcast frames and unicast frames
> -        * with dmac of the bridge should be foward to CPU.
> -        */
> -       if (netif_is_bridge_master(obj->orig_dev) &&
> -           !(v->flags & BRIDGE_VLAN_INFO_BRENTRY))
> -               return 0;
> -
>         if (!netif_is_bridge_master(obj->orig_dev))
>                 lan966x_vlan_port_add_vlan(port, v->vid,
>                                            v->flags & BRIDGE_VLAN_INFO_PVID,
> --
> 2.25.1
> 

-- 
/Horatiu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers
  2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
                   ` (5 preceding siblings ...)
  2022-02-16 20:25 ` [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Nikolay Aleksandrov
@ 2022-02-17 14:30 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-17 14:30 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, davem, kuba, idosch, petrm, horatiu.vultur,
	UNGLinuxDriver, lars.povlsen, Steen.Hegelund, grygorii.strashko,
	kgraul, linux-omap

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 16 Feb 2022 18:47:47 +0200 you wrote:
> As discussed here:
> https://patchwork.kernel.org/project/netdevbpf/patch/20220214233111.1586715-2-vladimir.oltean@nxp.com/#24738869
> 
> no switchdev driver makes use of VLAN port objects that lack the
> BRIDGE_VLAN_INFO_BRENTRY flag. Notifying them in the first place rather
> seems like an omission of commit 9c86ce2c1ae3 ("net: bridge: Notify
> about bridge VLANs").
> 
> [...]

Here is the summary with links:
  - [net-next,1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
    https://git.kernel.org/netdev/net-next/c/ddaff5047003
  - [net-next,2/5] net: lan966x: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
    https://git.kernel.org/netdev/net-next/c/ba43b547515e
  - [net-next,3/5] net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
    https://git.kernel.org/netdev/net-next/c/318994d3e2ab
  - [net-next,4/5] net: ti: am65-cpsw-nuss: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
    https://git.kernel.org/netdev/net-next/c/1d21c327281a
  - [net-next,5/5] net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
    https://git.kernel.org/netdev/net-next/c/5edb65eac10f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-17 14:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 16:47 [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Vladimir Oltean
2022-02-16 16:47 ` [PATCH net-next 1/5] mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY Vladimir Oltean
2022-02-16 21:31   ` Ido Schimmel
2022-02-16 16:47 ` [PATCH net-next 2/5] net: lan966x: " Vladimir Oltean
2022-02-16 22:54   ` Horatiu Vultur
2022-02-16 16:47 ` [PATCH net-next 3/5] net: sparx5: " Vladimir Oltean
2022-02-16 16:47 ` [PATCH net-next 4/5] net: ti: am65-cpsw-nuss: " Vladimir Oltean
2022-02-16 16:47 ` [PATCH net-next 5/5] net: ti: cpsw: " Vladimir Oltean
2022-02-16 20:25 ` [PATCH net-next 0/5] Remove BRENTRY checks from switchdev drivers Nikolay Aleksandrov
2022-02-16 20:42   ` Vladimir Oltean
2022-02-17 14:30 ` patchwork-bot+netdevbpf

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).