Skip to contentSkip to conversation

net/i40e: fix RSS hash update problem for X722 VF

dpdk-dev Applied penghuan 2 participants 3 messages Jul 19, 2019 – Jul 24, 2019 Network drivers

lore
Share & tools
lore

penghuan

author
#0 lore raw

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")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 drivers/net/i40e/i40e_rxtx.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
index 5be32b0..a9825b4 100644
@@ -1480,7 +1480,6 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *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;
@@ -1498,6 +1497,7 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
 		return -1;
 	}
 
+	i40e_set_default_pctype_table(eth_dev);
 	rte_eal_alarm_set(I40EVF_ALARM_INTERVAL,
 			  i40evf_dev_alarm_handler, eth_dev);
 
drivers/net/i40e/i40e_rxtx.c +2 -1
index 34aa6c8..87aa5d6 100644
@@ -3168,7 +3168,8 @@ void __attribute__((cold))
 	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] |=
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH v2 2/2 net/i40e: fix RSS hash update problem for X722 VF

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")
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 drivers/net/i40e/i40e_rxtx.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/i40e/i40e_ethdev_vf.c +1 -1
index 5be32b0..a9825b4 100644
@@ -1480,7 +1480,6 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *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;
@@ -1498,6 +1497,7 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
 		return -1;
 	}
 
+	i40e_set_default_pctype_table(eth_dev);
 	rte_eal_alarm_set(I40EVF_ALARM_INTERVAL,
 			  i40evf_dev_alarm_handler, eth_dev);
 
drivers/net/i40e/i40e_rxtx.c +2 -1
index 34aa6c8..692c3ba 100644
@@ -3168,7 +3168,8 @@ void __attribute__((cold))
 	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] |=
Signature · 1 line
1.8.3.1
Acked-by on v2 2/2 Applied
#2 lore raw
Quoted 16 lines

-----Original Message-----
From: Huang, Peng
Sent: Monday, July 22, 2019 9:50 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>; Huang, Peng <[email protected]>; [email protected]
Subject: [PATCH v2 2/2] net/i40e: fix RSS hash update problem for X722 VF

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;

Quoted 5 lines
Fixes a286ebeb0714 ("net/i40e: add dynamic mapping of SW flow types to HW

pctypes")
Cc: [email protected]

Correct to

Applied to dpdk-next-net-intel.

Thanks
Qi