Commit cc7eab25 authored by Yinjun Zhang's avatar Yinjun Zhang Committed by Jakub Kicinski

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: e20aa071 ("nfp: fix schedule in atomic context when sync mc address")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
Acked-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarLouis Peens <louis.peens@corigine.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Message-ID: <20230705052818.7122-1-louis.peens@corigine.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fdaff05b
......@@ -53,6 +53,8 @@
#include "crypto/crypto.h"
#include "crypto/fw.h"
static int nfp_net_mc_unsync(struct net_device *netdev, const unsigned char *addr);
/**
* nfp_net_get_fw_version() - Read and parse the FW version
* @fw_ver: Output fw_version structure to read to
......@@ -1084,6 +1086,9 @@ static int nfp_net_netdev_close(struct net_device *netdev)
/* Step 2: Tell NFP
*/
if (nn->cap_w1 & NFP_NET_CFG_CTRL_MCAST_FILTER)
__dev_mc_unsync(netdev, nfp_net_mc_unsync);
nfp_net_clear_config_and_disable(nn);
nfp_port_configure(netdev, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment