All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Sai Krishna <saikrishnag@marvell.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, leon@kernel.org,
	sgoutham@marvell.com, gakula@marvell.com, lcherian@marvell.com,
	jerinj@marvell.com, hkelam@marvell.com, sbhatta@marvell.com,
	Ratheesh Kannoth <rkannoth@marvell.com>
Subject: Re: [net PATCH v3 02/10] octeontx2-af: Fix start and end bit for scan config
Date: Wed, 19 Apr 2023 12:35:26 +0200	[thread overview]
Message-ID: <ZD/D7j+LPRIbP80J@corigine.com> (raw)
In-Reply-To: <20230419062018.286136-3-saikrishnag@marvell.com>

On Wed, Apr 19, 2023 at 11:50:10AM +0530, Sai Krishna wrote:
> From: Ratheesh Kannoth <rkannoth@marvell.com>
> 
> Fix the NPC nibble start and end positions in the bit
> map. 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: b747923afff8 ("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>

I think it would be nice to explain why, and what effect this has.

Also, TBH, I'm unsure why the start needs to be one bit prior.

> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> index 006beb5cf98d..27603078689a 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
> @@ -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++;
>  	}
> -- 
> 2.25.1
> 

  reply	other threads:[~2023-04-19 10:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19  6:20 [net PATCH v3 00/10] octeontx2: Miscellaneous fixes Sai Krishna
2023-04-19  6:20 ` [net PATCH v3 01/10] octeontx2-af: Secure APR table update with the lock Sai Krishna
2023-04-19  6:20 ` [net PATCH v3 02/10] octeontx2-af: Fix start and end bit for scan config Sai Krishna
2023-04-19 10:35   ` Simon Horman [this message]
2023-04-20  7:32     ` Sai Krishna Gajula
2023-04-19  6:20 ` [net PATCH v3 03/10] octeontx2-af: Fix depth of cam and mem table Sai Krishna
2023-04-19  9:54   ` Simon Horman
2023-04-20  7:40     ` Sai Krishna Gajula
2023-04-19  6:20 ` [net PATCH v3 04/10] octeontx2-pf: Increase the size of dmac filter flows Sai Krishna
2023-04-19 10:38   ` Simon Horman
2023-04-19  6:20 ` [net PATCH v3 05/10] octeontx2-af: Add validation for lmac type Sai Krishna
2023-04-19  6:20 ` [net PATCH v3 06/10] octeontx2-af: Update correct mask to filter IPv4 fragments Sai Krishna
2023-04-19  6:20 ` [net PATCH v3 07/10] octeontx2-af: Update/Fix NPC field hash extract feature Sai Krishna
2023-04-19 11:05   ` Simon Horman
2023-04-19  6:20 ` [net PATCH v3 08/10] octeontx2-af: Fix issues with NPC field hash extract Sai Krishna
2023-04-19 11:06   ` Simon Horman
2023-04-19  6:20 ` [net PATCH v3 09/10] octeontx2-af: Skip PFs if not enabled Sai Krishna
2023-04-19 10:51   ` Simon Horman
2023-04-20  7:29     ` Sai Krishna Gajula
2023-04-19  6:20 ` [net PATCH v3 10/10] octeontx2-pf: Disable packet I/O for graceful exit Sai Krishna
2023-04-19 11:03   ` Simon Horman
2023-04-20  7:21     ` Sai Krishna Gajula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZD/D7j+LPRIbP80J@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=saikrishnag@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.