net/octeontx2: fix port Tx VLAN insertion
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Fri, 16 Aug 2019 04:19:55 +0000 (09:49 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
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")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_vlan.c

index c01089b..2be7671 100644 (file)
@@ -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;