mbox series

[resend,net-next,0/2] Pass the BR_FDB_LOCAL information to switchdev drivers

Message ID 20210414165256.1837753-1-olteanv@gmail.com
Headers show
Series Pass the BR_FDB_LOCAL information to switchdev drivers | expand

Message

Vladimir Oltean April 14, 2021, 4:52 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

Bridge FDB entries with the is_local flag are entries which are
terminated locally and not forwarded. Switchdev drivers might want to be
notified of these addresses so they can trap them. If they don't program
these entries to hardware, there is no guarantee that they will do the
right thing with these entries, and they won't be, let's say, flooded.

Ideally none of the switchdev drivers should ignore these entries, but
having access to the is_local bit is the bare minimum change that should
be done in the bridge layer, before this is even possible.

These 2 changes are extracted from the larger "RX filtering in DSA"
series:
https://patchwork.kernel.org/project/netdevbpf/patch/20210224114350.2791260-8-olteanv@gmail.com/
https://patchwork.kernel.org/project/netdevbpf/patch/20210224114350.2791260-9-olteanv@gmail.com/
and submitted separately, because they touch all switchdev drivers,
while the rest is mostly specific to DSA.

This change is not a functional one, in the sense that everybody still
ignores the local FDB entries, but this will be changed by further
patches at least for DSA.

Tobias Waldekranz (1):
  net: bridge: switchdev: refactor br_switchdev_fdb_notify

Vladimir Oltean (1):
  net: bridge: switchdev: include local flag in FDB notifications

 .../ethernet/freescale/dpaa2/dpaa2-switch.c   |  4 +-
 .../marvell/prestera/prestera_switchdev.c     |  2 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       |  5 ++-
 drivers/net/ethernet/rocker/rocker_main.c     |  4 +-
 drivers/net/ethernet/ti/am65-cpsw-switchdev.c |  4 +-
 drivers/net/ethernet/ti/cpsw_switchdev.c      |  4 +-
 include/net/switchdev.h                       |  1 +
 net/bridge/br_switchdev.c                     | 44 +++++--------------
 net/dsa/slave.c                               |  2 +-
 9 files changed, 26 insertions(+), 44 deletions(-)

Comments

Ido Schimmel April 16, 2021, 3:19 p.m. UTC | #1
On Wed, Apr 14, 2021 at 07:52:55PM +0300, Vladimir Oltean wrote:
> From: Tobias Waldekranz <tobias@waldekranz.com>
> 
> Instead of having to add more and more arguments to
> br_switchdev_fdb_call_notifiers, get rid of it and build the info
> struct directly in br_switchdev_fdb_notify.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Nikolay Aleksandrov April 19, 2021, 8:50 a.m. UTC | #2
On 14/04/2021 19:52, Vladimir Oltean wrote:
> From: Tobias Waldekranz <tobias@waldekranz.com>
> 
> Instead of having to add more and more arguments to
> br_switchdev_fdb_call_notifiers, get rid of it and build the info
> struct directly in br_switchdev_fdb_notify.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  net/bridge/br_switchdev.c | 41 +++++++++++----------------------------
>  1 file changed, 11 insertions(+), 30 deletions(-)
> 

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