DPDK patches and discussions
 help / color / mirror / Atom feed
From: penghuan <peng.huang@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, beilei.xing@intel.com,
	penghuan <peng.huang@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix RSS hash update problem for X722 VF
Date: Mon, 22 Jul 2019 13:50:28 +0000	[thread overview]
Message-ID: <1563803428-101418-1-git-send-email-peng.huang@intel.com> (raw)
In-Reply-To: <1563551049-25638-1-git-send-email-peng.huang@intel.com>

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


  reply	other threads:[~2019-07-22  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 15:44 [dpdk-dev] [DPDK] " penghuan
2019-07-22 13:50 ` penghuan [this message]
2019-07-24 13:00   ` [dpdk-dev] [PATCH v2 2/2] " Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1563803428-101418-1-git-send-email-peng.huang@intel.com \
    --to=peng.huang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).