]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Fix mcam entry resource leak
authorSubbaraya Sundeep <sbhatta@marvell.com>
Wed, 3 Aug 2022 07:54:14 +0000 (13:24 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Aug 2022 01:56:34 +0000 (18:56 -0700)
commit5fe5342fb0606e1fff6f3db8d1651afb50801b69
treeb3e073e8a904f98021e5a25efc0883f5b42720a3
parent56baa41e6a920c5a5c7bdeaf0c4650be769c4a9c
octeontx2-af: Fix mcam entry resource leak

The teardown sequence in FLR handler returns if no NIX LF
is attached to PF/VF because it indicates that graceful
shutdown of resources already happened. But there is a
chance of all allocated MCAM entries not being freed by
PF/VF. Hence free mcam entries even in case of detached LF.

Fixes: 6d6377a5bd01 ("octeontx2-af: Teardown NPA, NIX LF upon receiving FLR")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c