From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-07-20 17:40:25
Hi,
There are already two fixes for the newly added helpers to multiply a
switchdev FDB add/del event times the number of lower interfaces of a
bridge. These are:
(1) the shim definition of switchdev_handle_fdb_del_to_device() is
broken, as reported by the kernel test robot.
(2) while checking where switchdev_handle_fdb_del_to_device() is called
from, I realized it is called once from where it shouldn't, aka from
__switchdev_handle_fdb_del_to_device(). That shouldn't happen,
instead that function should recurse into itself directly.
Vladimir Oltean (2):
net: switchdev: remove stray semicolon in
switchdev_handle_fdb_del_to_device shim
net: switchdev: recurse into __switchdev_handle_fdb_del_to_device
include/net/switchdev.h | 2 +-
net/switchdev/switchdev.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--
2.25.1
From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-07-20 17:39:18
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(-)
From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-07-20 17:40:25
With the semicolon at the end, the compiler sees the shim function as a
declaration and not as a definition, and warns:
'switchdev_handle_fdb_del_to_device' declared 'static' but never defined
Reported-by: kernel test robot <redacted>
Fixes: 8ca07176ab00 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
include/net/switchdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Hi Vladimir,
On 20/07/2021 19:35, Vladimir Oltean wrote:
With the semicolon at the end, the compiler sees the shim function as a
declaration and not as a definition, and warns:
'switchdev_handle_fdb_del_to_device' declared 'static' but never defined
Thank you for the patch!
My CI also reported the same issue and I confirm it removes the warning.
Tested-by: Matthieu Baerts <redacted>
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Tue, 20 Jul 2021 20:35:55 +0300 you wrote:
Hi,
There are already two fixes for the newly added helpers to multiply a
switchdev FDB add/del event times the number of lower interfaces of a
bridge. These are:
(1) the shim definition of switchdev_handle_fdb_del_to_device() is
broken, as reported by the kernel test robot.
(2) while checking where switchdev_handle_fdb_del_to_device() is called
from, I realized it is called once from where it shouldn't, aka from
__switchdev_handle_fdb_del_to_device(). That shouldn't happen,
instead that function should recurse into itself directly.
[...]