Re: [PATCH v2 net] octeontx2-af: npc: Fix CPT channel mask in npc_install_flow
From: Ratheesh Kannoth
Date: Wed Jun 03 2026 - 01:08:57 EST
On 2026-06-02 at 10:28:53, Ratheesh Kannoth (rkannoth@xxxxxxxxxxx) wrote:
> From: Nithin Dabilpuram <ndabilpuram@xxxxxxxxxxx>
>
> Use the CPT-aware NIX channel mask in the npc_install_flow path so that
> when the host PF installs steering rules in kernel for a VF used from
> userspace (e.g. DPDK), MCAM entries see the same channel mask semantics as
> other RX paths.
>
> Fixes: 56bcef528bd8 ("octeontx2-af: Use npc_install_flow API for promisc and broadcast entries")
> Cc: Naveen Mamindlapalli <naveenm@xxxxxxxxxxx>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@xxxxxxxxxxx>
> Signed-off-by: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>
> ---
https://sashiko.dev/#/patchset/20260602045853.1558530-1-rkannoth%40marvell.com
sashiko says:
> - /* 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);
>> req.channel = chan;
>> req.intf = pfvf->nix_rx_intf;
>> req.entry = index;
>This isn't a bug introduced by this patch, but should the channel mask
>also be updated in rvu_npc_install_bcast_match_entry() and
>rvu_switch_disable()?
No. we dont need this in bcast and switch_disable().