diff options
author | Ido Schimmel <idosch@nvidia.com> | 2022-11-08 13:47:07 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-10 06:06:13 +0300 |
commit | 9baedc3c8780256bfc68d318c31d0081cefe92a3 (patch) | |
tree | bcbe08b19b7f5e9cbec33ad2ba37c9fe347086b0 /net/bridge | |
parent | bf9b85562a9a9c5065975b21a091ba2e9784caa5 (diff) | |
download | linux-9baedc3c8780256bfc68d318c31d0081cefe92a3.tar.xz |
bridge: switchdev: Let device drivers determine FDB offload indication
Currently, FDB entries that are notified to the bridge via
'SWITCHDEV_FDB_ADD_TO_BRIDGE' are always marked as offloaded. With MAB
enabled, this will no longer be universally true. Device drivers will
report locked FDB entries to the bridge to let it know that the
corresponding hosts required authorization, but it does not mean that
these entries are necessarily programmed in the underlying hardware.
Solve this by determining the offload indication based of the
'offloaded' bit in the FDB notification.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c index 96e91d69a9a8..145999b8c355 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c @@ -172,7 +172,7 @@ static int br_switchdev_event(struct notifier_block *unused, break; } br_fdb_offloaded_set(br, p, fdb_info->addr, - fdb_info->vid, true); + fdb_info->vid, fdb_info->offloaded); break; case SWITCHDEV_FDB_DEL_TO_BRIDGE: fdb_info = ptr; |