Commit 53da7aec authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Paolo Abeni

octeontx2-pf: Fix resource leakage in VF driver unbind

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: 2da48943 ("octeontx2-pf: devlink params support to set mcam entry count")
Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Link: https://lore.kernel.org/r/20230109061325.21395-1-hkelam@marvell.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 74cf6795
...@@ -758,6 +758,8 @@ static void otx2vf_remove(struct pci_dev *pdev) ...@@ -758,6 +758,8 @@ static void otx2vf_remove(struct pci_dev *pdev)
if (vf->otx2_wq) if (vf->otx2_wq)
destroy_workqueue(vf->otx2_wq); destroy_workqueue(vf->otx2_wq);
otx2_ptp_destroy(vf); otx2_ptp_destroy(vf);
otx2_mcam_flow_del(vf);
otx2_shutdown_tc(vf);
otx2vf_disable_mbox_intr(vf); otx2vf_disable_mbox_intr(vf);
otx2_detach_resources(&vf->mbox); otx2_detach_resources(&vf->mbox);
if (test_bit(CN10K_LMTST, &vf->hw.cap_flag)) if (test_bit(CN10K_LMTST, &vf->hw.cap_flag))
......
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