Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <davem@davemloft.net>, <linux-kernel@vger.kernel.org>,
	<naveenm@marvell.com>, <netdev@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <sgoutham@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>
Subject: Re: [PATCH net] octeontx2-af: npc: Fix CPT channel mask in npc_install_flow
Date: Tue, 2 Jun 2026 08:24:03 +0530	[thread overview]
Message-ID: <ah5Fy5HDuMOOnV8X@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260601023221.858168-1-rkannoth@marvell.com>

On 2026-06-01 at 08:02:21, Ratheesh Kannoth (rkannoth@marvell.com) wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>

>> -	/* For cn10k the upper two bits of the channel number are
>> -	 * cpt channel number. with masking out these bits in the
>> -	 * mcam entry, same entry used for NIX will allow packets
>> -	 * received from cpt for parsing.
>> -	 */
>> -	if (!is_rvu_otx2(rvu))
>> -		req.chan_mask = NIX_CHAN_CPT_X2P_MASK;
>> -	else
>> -		req.chan_mask = 0xFFFU;
>> -
>> +	req.chan_mask = rvu_get_cpt_chan_mask(rvu);
>This is a pre-existing issue, but while this update correctly applies the
>CPT-aware NIX channel mask here, is it possible that other default NIX RX
>MCAM steering rules were missed?
>For example, in drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c,
>rvu_npc_install_ucast_entry() still hardcodes the channel mask to 0xFFFU:
>rvu_npc_install_ucast_entry() {
>    ...
>    req.channel = chan;
>    req.chan_mask = 0xFFFU;
>    req.intf = pfvf->nix_rx_intf;
>    ...
>}
>Since these are internal requests (req.hdr.pcifunc = 0), they bypass the
>override in rvu_mbox_handler_npc_install_flow(). Does this mean inline
>IPsec packets returning from CPT could fail to match these default L2
>steering rules and get dropped?
>Similar hardcoded 0xFFF(U) values appear to still exist in
>rvu_npc_install_bcast_match_entry() and rvu_switch_disable() in
>drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c.
>>  	req.channel = chan;
>>  	req.intf = pfvf->nix_rx_intf;
>>  	req.entry = index;
>

ACK.
pw-bot: changes-requested

      reply	other threads:[~2026-06-02  2:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  2:32 [PATCH net] octeontx2-af: npc: Fix CPT channel mask in npc_install_flow Ratheesh Kannoth
2026-06-02  2:54 ` Ratheesh Kannoth [this message]

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=ah5Fy5HDuMOOnV8X@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveenm@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox