Skip to contentSkip to conversation

octeontx2-af: Fix start and end bit for scan config

PATCH In review Ratheesh Kannoth 2 participants 2 messages Mar 2, 2023

Subsystems (3)
lore
Share & tools
lore

Ratheesh Kannoth

author maintainer
#0 lore raw

PATCH 1/1 octeontx2-af: Fix start and end bit for scan config

for_each_set_bit_from() needs start bit as one bit prior and end bit as one bit post position in the bit map

Fixes 812103edf670 (octeontx2-af: Exact match scan from kex profile)
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +2 -3
index 006beb5cf98d..27603078689a 100644
@@ -593,9 +593,8 @@ static int npc_scan_kex(struct rvu *rvu, int blkaddr, u8 intf)
 	 * exact match code.
 	 */
 	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) {
+	bitnr = NPC_EXACT_NIBBLE_START - 1;
+	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++;
 	}
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 4 lines · On Thu, 2 Mar 2023 09:40:18 +0530 Ratheesh Kannoth wrote:

for_each_set_bit_from() needs start bit as one bit prior and end bit as one bit post position in the bit map

Fixes 812103edf670 (octeontx2-af: Exact match scan from kex profile)

You're still missing quotation marks. Preferred form is:

Fixes 812103edf670 ("octeontx2-af: Exact match scan from kex profile")

You're also missing a change log.

More importantly please read the rules:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html

Take a couple of days to think about checking your patches before posting them, and how spamming patches hurts the project.

Repost this next week.