On 11/11/24 19:08, Petr Machata wrote: > Currently when FDB entries are added to or deleted from a VXLAN netdevice, > the VXLAN driver emits one notification, including the VXLAN-specific > attributes. The core however always sends a notification as well, a generic > one. Thus two notifications are unnecessarily sent for these operations. A > similar situation comes up with bridge driver, which also emits > notifications on its own: > > # ip link add name vx type vxlan id 1000 dstport 4789 > # bridge monitor fdb & > [1] 1981693 > # bridge fdb add de:ad:be:ef:13:37 dev vx self dst 192.0.2.1 > de:ad:be:ef:13:37 dev vx dst 192.0.2.1 self permanent > de:ad:be:ef:13:37 dev vx self permanent > > In order to prevent this duplicity, add a paremeter to ndo_fdb_add, > bool *notified. The flag is primed to false, and if the callee sends a > notification on its own, it sets it to true, thus informing the core that > it should not generate another notification. > > Signed-off-by: Petr Machata <[email protected]> > Reviewed-by: Amit Cohen <[email protected]> > --- > > Notes: > CC: Simon Horman <[email protected]> > CC: Przemek Kitszel <[email protected]> > CC: [email protected] > CC: [email protected] > CC: Manish Chopra <[email protected]> > CC: [email protected] > CC: Kuniyuki Iwashima <[email protected]> > CC: Andrew Lunn <[email protected]> > CC: Nikolay Aleksandrov <[email protected]> > CC: [email protected] > > drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++- > drivers/net/ethernet/intel/ice/ice_main.c | 4 +++- > drivers/net/ethernet/intel/igb/igb_main.c | 2 +- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- > drivers/net/ethernet/mscc/ocelot_net.c | 2 +- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +- > drivers/net/macvlan.c | 2 +- > drivers/net/vxlan/vxlan_core.c | 5 ++++- > include/linux/netdevice.h | 5 ++++- > net/bridge/br_fdb.c | 12 +++++++----- > net/bridge/br_private.h | 2 +- > net/core/rtnetlink.c | 9 ++++++--- > 12 files changed, 32 insertions(+), 18 deletions(-) >
LGTM, Reviewed-by: Nikolay Aleksandrov <[email protected]>
