net/i40e: fix RSS hash update for X722 VF
authorPeng Huang <peng.huang@intel.com>
Mon, 22 Jul 2019 13:50:28 +0000 (13:50 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 24 Jul 2019 15:16:29 +0000 (17:16 +0200)
This patch fixes X722 VF problem when received packet don't have
HASH value.
1) Packet classifier types update should support X722 VF, not only
 for X722 PF;
2) MAC type is invalid for X722 VF when set packet classifier type,
so move it after MAC type is set correctly;

Fixes: a286ebeb0714 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")
Cc: stable@dpdk.org
Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/i40e/i40e_rxtx.c

index 5fd34f8..308fb98 100644 (file)
@@ -1486,7 +1486,6 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
                return 0;
        }
        i40e_set_default_ptype_table(eth_dev);
-       i40e_set_default_pctype_table(eth_dev);
        rte_eth_copy_pci_info(eth_dev, pci_dev);
 
        hw->vendor_id = pci_dev->id.vendor_id;
@@ -1504,6 +1503,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
                return -1;
        }
 
+       i40e_set_default_pctype_table(eth_dev);
        rte_eal_alarm_set(I40EVF_ALARM_INTERVAL,
                          i40evf_dev_alarm_handler, eth_dev);
 
index 34aa6c8..692c3ba 100644 (file)
@@ -3168,7 +3168,8 @@ i40e_set_default_pctype_table(struct rte_eth_dev *dev)
        ad->pctypes_tbl[RTE_ETH_FLOW_L2_PAYLOAD] =
                                (1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD);
 
-       if (hw->mac.type == I40E_MAC_X722) {
+       if (hw->mac.type == I40E_MAC_X722 ||
+               hw->mac.type == I40E_MAC_X722_VF) {
                ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
                        (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP);
                ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=