]> 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)
commit87bb1ff34e11b477d7b5cc7746ef894f9eaa62f0
treeb3e073e8a904f98021e5a25efc0883f5b42720a3
parent93031dd9330dffbc5ccbdb5c9eecd46b2033794a
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: e21f8f610152 ("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