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

rocker: Explicitly mark learned FDB entries as offloaded

Currently, FDB entries that are notified to the bridge driver via
'SWITCHDEV_FDB_ADD_TO_BRIDGE' are always marked as offloaded by the
bridge. 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.

We would like to solve it by having the bridge driver determine the
offload indication based of the 'offloaded' bit in the FDB notification
[1].

Prepare for that change by having rocker explicitly mark learned FDB
entries as offloaded. This is consistent with all the other switchdev
drivers.

[1] https://lore.kernel.org/netdev/20221025100024.1287157-4-idosch@nvidia.com/

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ido Schimmel and committed by
Jakub Kicinski
386b4174 42e51de9

+1
+1
drivers/net/ethernet/rocker/rocker_ofdpa.c
··· 1826 1826 1827 1827 info.addr = lw->addr; 1828 1828 info.vid = lw->vid; 1829 + info.offloaded = !removing; 1829 1830 event = removing ? SWITCHDEV_FDB_DEL_TO_BRIDGE : 1830 1831 SWITCHDEV_FDB_ADD_TO_BRIDGE; 1831 1832