Skip to contentSkip to conversation

net/octeontx2: fix port Tx VLAN insertion

PATCH Applied Nithin Dabilpuram 2 participants 3 messages Aug 16, 2019 – Sep 23, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/octeontx2: fix port Tx VLAN insertion

This patch fixes configuration for port Tx vlan insertion feature. As per latest Tx KEX profile, pf_func should be at KW[0](47:32) and not KW[1](63:48).

Fixes 168c59cfe42b ("net/octeontx2: add flow MCAM utility functions")
---
 drivers/net/octeontx2/otx2_vlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/octeontx2/otx2_vlan.c +3 -3
index c01089b..2be7671 100644
@@ -468,9 +468,9 @@ nix_vlan_handle_default_tx_entry(struct rte_eth_dev *eth_dev,
 		pf_func = (dev->pf_func & 0xff) << 8;
 		pf_func |= (dev->pf_func >> 8) & 0xff;
 
-		/* PF Func extracted to KW1[63:48] */
-		entry.kw[1] = (uint64_t)pf_func << 48;
-		entry.kw_mask[1] = (BIT_ULL(16) - 1) << 48;
+		/* PF Func extracted to KW1[47:32] */
+		entry.kw[0] = (uint64_t)pf_func << 32;
+		entry.kw_mask[0] = (BIT_ULL(16) - 1) << 32;
 
 		nix_set_tx_vlan_action(&entry, type, vtag_index);
 		vlan->def_tx_mcam_ent = entry;
Signature · 1 line
2.8.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Nithin Dabilpuram

This patch fixes configuration for port Tx vlan insertion feature. As per latest Tx KEX profile, pf_func should be at KW[0](47:32) and not KW[1](63:48).

Fixes 168c59cfe42b ("net/octeontx2: add flow MCAM utility functions")
Quoted 2 lines
Quoted 24 lines
---
 drivers/net/octeontx2/otx2_vlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/octeontx2/otx2_vlan.c +3 -4
index c01089b..2be7671 100644
@@ -468,9 +468,9 @@ nix_vlan_handle_default_tx_entry(struct rte_eth_dev *eth_dev,
                pf_func = (dev->pf_func & 0xff) << 8;
                pf_func |= (dev->pf_func >> 8) & 0xff;
 
-               /* PF Func extracted to KW1[63:48] */
-               entry.kw[1] = (uint64_t)pf_func << 48;
-               entry.kw_mask[1] = (BIT_ULL(16) - 1) << 48;
+               /* PF Func extracted to KW1[47:32] */
+               entry.kw[0] = (uint64_t)pf_func << 32;
+               entry.kw_mask[0] = (BIT_ULL(16) - 1) << 32;
 
                nix_set_tx_vlan_action(&entry, type, vtag_index);
                vlan->def_tx_mcam_ent = entry;
--

2.8.4

Applied
#2 lore raw
Quoted 11 lines · Jerin Jacob
Quoted 7 lines · Nithin Dabilpuram

This patch fixes configuration for port Tx vlan insertion feature. As per latest Tx KEX profile, pf_func should be at KW[0](47:32) and not KW[1](63:48).

Fixes 168c59cfe42b ("net/octeontx2: add flow MCAM utility functions")
Quoted 6 lines
Quoted 2 lines

Applied to dpdk-next-net-mrvl/master. Thanks

Quoted 26 lines
Quoted 26 lines

---
 drivers/net/octeontx2/otx2_vlan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/octeontx2/otx2_vlan.c +3 -4
index c01089b..2be7671 100644
@@ -468,9 +468,9 @@ nix_vlan_handle_default_tx_entry(struct rte_eth_dev *eth_dev,
                pf_func = (dev->pf_func & 0xff) << 8;
                pf_func |= (dev->pf_func >> 8) & 0xff;
 
-               /* PF Func extracted to KW1[63:48] */
-               entry.kw[1] = (uint64_t)pf_func << 48;
-               entry.kw_mask[1] = (BIT_ULL(16) - 1) << 48;
+               /* PF Func extracted to KW1[47:32] */
+               entry.kw[0] = (uint64_t)pf_func << 32;
+               entry.kw_mask[0] = (BIT_ULL(16) - 1) << 32;
 
                nix_set_tx_vlan_action(&entry, type, vtag_index);
                vlan->def_tx_mcam_ent = entry;
--

2.8.4