DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [DPDK] net/i40e: fix RSS hash update problem for X722 VF
@ 2019-07-19 15:44 penghuan
  2019-07-22 13:50 ` [dpdk-dev] [PATCH v2 2/2] " penghuan
  0 siblings, 1 reply; 3+ messages in thread
From: penghuan @ 2019-07-19 15:44 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, beilei.xing, penghuan, stable

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: penghuan <peng.huang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 drivers/net/i40e/i40e_rxtx.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5be32b0..a9825b4 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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);
 
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 34aa6c8..87aa5d6 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -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] |=
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] net/i40e: fix RSS hash update problem for X722 VF
  2019-07-19 15:44 [dpdk-dev] [DPDK] net/i40e: fix RSS hash update problem for X722 VF penghuan
@ 2019-07-22 13:50 ` " penghuan
  2019-07-24 13:00   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: penghuan @ 2019-07-22 13:50 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, beilei.xing, penghuan, stable

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: penghuan <peng.huang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 drivers/net/i40e/i40e_rxtx.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5be32b0..a9825b4 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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);
 
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 34aa6c8..692c3ba 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -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] |=
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix RSS hash update problem for X722 VF
  2019-07-22 13:50 ` [dpdk-dev] [PATCH v2 2/2] " penghuan
@ 2019-07-24 13:00   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-07-24 13:00 UTC (permalink / raw)
  To: Huang, Peng; +Cc: dev, Xing, Beilei, stable



> -----Original Message-----
> From: Huang, Peng
> Sent: Monday, July 22, 2019 9:50 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Huang, Peng
> <peng.huang@intel.com>; stable@dpdk.org
> 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;
> 
> Fixes: a286ebeb0714 ("net/i40e: add dynamic mapping of SW flow types to HW
> pctypes")
> Cc: stable@dpdk.org
> 
> Signed-off-by: penghuan <peng.huang@intel.com>

Correct to 
Signed-off-by: Peng Huang <peng.huang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 15:44 [dpdk-dev] [DPDK] net/i40e: fix RSS hash update problem for X722 VF penghuan
2019-07-22 13:50 ` [dpdk-dev] [PATCH v2 2/2] " penghuan
2019-07-24 13:00   ` Zhang, Qi Z

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox