Message ID | 20210720173557.999534-3-vladimir.oltean@nxp.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 71f4f89a0324459f81656f3f9b20c1c0becaf647 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Fixes for the switchdev FDB fan-out helpers | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 2 maintainers not CCed: jiri@resnulli.us ivecera@redhat.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | fail | Errors and warnings before: 7 this patch: 7 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
netdev/build_allmodconfig_warn | fail | Errors and warnings before: 7 this patch: 7 |
netdev/header_inline | success | Link |
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 82dd4e4e86f5..42e88d3d66a7 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -532,10 +532,10 @@ static int __switchdev_handle_fdb_del_to_device(struct net_device *dev, if (netif_is_bridge_master(lower_dev)) continue; - err = switchdev_handle_fdb_del_to_device(lower_dev, fdb_info, - check_cb, - foreign_dev_check_cb, - del_cb, lag_del_cb); + err = __switchdev_handle_fdb_del_to_device(lower_dev, orig_dev, + fdb_info, check_cb, + foreign_dev_check_cb, + del_cb, lag_del_cb); if (err && err != -EOPNOTSUPP) return err; }
The difference between __switchdev_handle_fdb_del_to_device and switchdev_handle_del_to_device is that the former takes an extra orig_dev argument, while the latter starts with dev == orig_dev. We should recurse into the variant that does not lose the orig_dev along the way. This is relevant when deleting FDB entries pointing towards a bridge (dev changes to the lower interfaces, but orig_dev shouldn't). The addition helper already recurses properly, just the deletion one doesn't. Fixes: 8ca07176ab00 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> --- net/switchdev/switchdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)