summaryrefslogtreecommitdiff
path: root/drivers/net/octeontx2/otx2_vlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/octeontx2/otx2_vlan.c')
-rw-r--r--drivers/net/octeontx2/otx2_vlan.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2_vlan.c
index 2be7671..322a565 100644
--- a/drivers/net/octeontx2/otx2_vlan.c
+++ b/drivers/net/octeontx2/otx2_vlan.c
@@ -300,8 +300,11 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev,
/* Adds vlan_id & LB CTAG flag to MCAM KW */
if (flags & VLAN_ID_MATCH) {
- entry.kw[kwi] |= NPC_LT_LB_CTAG << mkex->lb_lt_offset;
- entry.kw_mask[kwi] |= 0xFULL << mkex->lb_lt_offset;
+ entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ)
+ << mkex->lb_lt_offset;
+ entry.kw_mask[kwi] |=
+ (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ))
+ << mkex->lb_lt_offset;
mcam_data = ((uint32_t)vlan_id << 16);
mcam_mask = (BIT_ULL(16) - 1) << 16;
@@ -313,15 +316,16 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev,
/* Adds LB STAG flag to MCAM KW */
if (flags & QINQ_F_MATCH) {
- entry.kw[kwi] |= NPC_LT_LB_STAG << mkex->lb_lt_offset;
+ entry.kw[kwi] |= NPC_LT_LB_STAG_QINQ << mkex->lb_lt_offset;
entry.kw_mask[kwi] |= 0xFULL << mkex->lb_lt_offset;
}
/* Adds LB CTAG & LB STAG flags to MCAM KW */
if (flags & VTAG_F_MATCH) {
- entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG)
+ entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ)
<< mkex->lb_lt_offset;
- entry.kw_mask[kwi] |= (NPC_LT_LB_CTAG & NPC_LT_LB_STAG)
+ entry.kw_mask[kwi] |=
+ (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ))
<< mkex->lb_lt_offset;
}