Skip to content

Commit cc7eab2

Browse files
Yinjun Zhangkuba-moo
authored andcommitted
nfp: clean mc addresses in application firmware when closing port
When moving devices from one namespace to another, mc addresses are cleaned in software while not removed from application firmware. Thus the mc addresses are remained and will cause resource leak. Now use `__dev_mc_unsync` to clean mc addresses when closing port. Fixes: e20aa07 ("nfp: fix schedule in atomic context when sync mc address") Cc: [email protected] Signed-off-by: Yinjun Zhang <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: Louis Peens <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Message-ID: <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fdaff05 commit cc7eab2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
#include "crypto/crypto.h"
5454
#include "crypto/fw.h"
5555

56+
static int nfp_net_mc_unsync(struct net_device *netdev, const unsigned char *addr);
57+
5658
/**
5759
* nfp_net_get_fw_version() - Read and parse the FW version
5860
* @fw_ver: Output fw_version structure to read to
@@ -1084,6 +1086,9 @@ static int nfp_net_netdev_close(struct net_device *netdev)
10841086

10851087
/* Step 2: Tell NFP
10861088
*/
1089+
if (nn->cap_w1 & NFP_NET_CFG_CTRL_MCAST_FILTER)
1090+
__dev_mc_unsync(netdev, nfp_net_mc_unsync);
1091+
10871092
nfp_net_clear_config_and_disable(nn);
10881093
nfp_port_configure(netdev, false);
10891094

0 commit comments

Comments
 (0)