Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ido Schimmel and committed by
Jakub Kicinski
9baedc3c bf9b8556

+1 -1
+1 -1
net/bridge/br.c
··· 172 172 break; 173 173 } 174 174 br_fdb_offloaded_set(br, p, fdb_info->addr, 175 - fdb_info->vid, true); 175 + fdb_info->vid, fdb_info->offloaded); 176 176 break; 177 177 case SWITCHDEV_FDB_DEL_TO_BRIDGE: 178 178 fdb_info = ptr;