octeontx2-af: Fix loop in free and unmap counter
[ Upstream commit6537e96d74] When the given counter does not belong to the entry then code ends up in infinite loop because the loop cursor, entry is not getting updated further. This patch fixes that by updating entry for every iteration. Fixes:a958dd59f9("octeontx2-af: Map or unmap NPC MCAM entry and counter") Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a67c66c1bb
commit
ee485124b7
1 changed files with 2 additions and 1 deletions
|
|
@ -2081,10 +2081,11 @@ int rvu_mbox_handler_npc_mcam_unmap_counter(struct rvu *rvu,
|
|||
index = find_next_bit(mcam->bmap, mcam->bmap_entries, entry);
|
||||
if (index >= mcam->bmap_entries)
|
||||
break;
|
||||
entry = index + 1;
|
||||
|
||||
if (mcam->entry2cntr_map[index] != req->cntr)
|
||||
continue;
|
||||
|
||||
entry = index + 1;
|
||||
npc_unmap_mcam_entry_and_cntr(rvu, mcam, blkaddr,
|
||||
index, req->cntr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue