Skip to content

Commit aee5122

Browse files
vvelumuridavem330
authored andcommitted
octeontx2-af: configure npc for cn10k to allow packets from cpt
On CN10K, the higher bits in the channel number represents the CPT channel number. Mask out these higher bits in the npc configuration to allow packets from cpt for parsing. Signed-off-by: Vidya <[email protected]> Signed-off-by: Sunil Goutham <[email protected]> Signed-off-by: Subbaraya Sundeep <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 99b8e54 commit aee5122

File tree

1 file changed

+11
-1
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+11
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,17 @@ void rvu_npc_install_promisc_entry(struct rvu *rvu, u16 pcifunc,
724724
action.index = pfvf->promisc_mce_idx;
725725
}
726726

727-
req.chan_mask = 0xFFFU;
727+
/* For cn10k the upper two bits of the channel number are
728+
* cpt channel number. with masking out these bits in the
729+
* mcam entry, same entry used for NIX will allow packets
730+
* received from cpt for parsing.
731+
*/
732+
if (!is_rvu_otx2(rvu)) {
733+
req.chan_mask = NIX_CHAN_CPT_X2P_MASK;
734+
} else {
735+
req.chan_mask = 0xFFFU;
736+
}
737+
728738
if (chan_cnt > 1) {
729739
if (!is_power_of_2(chan_cnt)) {
730740
dev_err(rvu->dev,

0 commit comments

Comments
 (0)