From: Hariprasad Kelam Date: Mon, 9 Jan 2023 06:13:25 +0000 (+0530) Subject: octeontx2-pf: Fix resource leakage in VF driver unbind X-Git-Tag: baikal/aarch64/sdk6.1~754 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e4cbb770a78515cb6bfe0193fa9784fac0c785c3;p=kernel.git octeontx2-pf: Fix resource leakage in VF driver unbind [ Upstream commit 53da7aec32982f5ee775b69dce06d63992ce4af3 ] resources allocated like mcam entries to support the Ntuple feature and hash tables for the tc feature are not getting freed in driver unbind. This patch fixes the issue. Fixes: 6d21166a46b1 ("octeontx2-pf: devlink params support to set mcam entry count") Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Link: https://lore.kernel.org/r/20230109061325.21395-1-hkelam@marvell.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index 86653bb8e403a..7f8ffbf79cf74 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -758,6 +758,8 @@ static void otx2vf_remove(struct pci_dev *pdev) if (vf->otx2_wq) destroy_workqueue(vf->otx2_wq); otx2_ptp_destroy(vf); + otx2_mcam_flow_del(vf); + otx2_shutdown_tc(vf); otx2vf_disable_mbox_intr(vf); otx2_detach_resources(&vf->mbox); if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))