]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: fix infinite loop in unmapping NPC counter
authorHariprasad Kelam <hkelam@marvell.com>
Thu, 18 Mar 2021 14:15:48 +0000 (19:45 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Mar 2021 21:12:42 +0000 (14:12 -0700)
commitd032498968ab93b17bcd6d6c2579079d1b5fa503
tree5bfe3d1462e19f059817b8b046299dbbe4fc81b3
parentfeb8cb8ea12e1efb3844cec92d44ba1e4cf3e539
octeontx2-af: fix infinite loop in unmapping NPC counter

unmapping npc counter works in a way by traversing all mcam
entries to find which mcam rule is associated with counter.
But loop cursor variable 'entry' is not incremented before
checking next mcam entry which resulting in infinite loop.

This in turn hogs the kworker thread forever and no other
mbox message is processed by AF driver after that.
Fix this by updating entry value before checking next
mcam entry.

Fixes: edc518a52b20 ("octeontx2-af: Map or unmap NPC MCAM entry and counter")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c