octeontx2-af: Fix start and end bit for scan config
[ Upstream commit c60a6b90e7890453f09e0d2163d6acadabe3415b ]
In the current driver, NPC exact match feature was not getting
enabled as configured bit was not read properly.
for_each_set_bit_from() need end bit as one bit post
position in the bit map to read NPC exact nibble enable
bits properly. This patch fixes the same.
Fixes: b747923aff
("octeontx2-af: Exact match support")
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Sai Krishna <saikrishnag@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
e92399f527
commit
1c98271e0c
@ -553,8 +553,7 @@ static int npc_scan_kex(struct rvu *rvu, int blkaddr, u8 intf)
|
||||
*/
|
||||
masked_cfg = cfg & NPC_EXACT_NIBBLE;
|
||||
bitnr = NPC_EXACT_NIBBLE_START;
|
||||
for_each_set_bit_from(bitnr, (unsigned long *)&masked_cfg,
|
||||
NPC_EXACT_NIBBLE_START) {
|
||||
for_each_set_bit_from(bitnr, (unsigned long *)&masked_cfg, NPC_EXACT_NIBBLE_END + 1) {
|
||||
npc_scan_exact_result(mcam, bitnr, key_nibble, intf);
|
||||
key_nibble++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user