mbox series

[net-next,0/5] Remove BRENTRY checks from switchdev drivers

Message ID 20220216164752.2794456-1-vladimir.oltean@nxp.com (mailing list archive)
Headers show
Series Remove BRENTRY checks from switchdev drivers | expand

Message

Vladimir Oltean Feb. 16, 2022, 4:47 p.m. UTC
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(-)

Comments

Nikolay Aleksandrov Feb. 16, 2022, 8:25 p.m. UTC | #1
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>
Vladimir Oltean Feb. 16, 2022, 8:42 p.m. UTC | #2
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...
patchwork-bot+netdevbpf@kernel.org Feb. 17, 2022, 2:30 p.m. UTC | #3
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!