From patchwork Fri Jul 19 15:44:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Peng" X-Patchwork-Id: 56763 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A1EA4D27; Fri, 19 Jul 2019 11:06:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A6B582BA8; Fri, 19 Jul 2019 11:06:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2019 02:06:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,281,1559545200"; d="scan'208";a="319912183" Received: from #worker1.sh.intel.com ([10.67.119.72]) by orsmga004.jf.intel.com with ESMTP; 19 Jul 2019 02:06:17 -0700 From: penghuan To: qi.z.zhang@intel.com Cc: dev@dpdk.org, beilei.xing@intel.com, penghuan , stable@dpdk.org Date: Fri, 19 Jul 2019 15:44:09 +0000 Message-Id: <1563551049-25638-1-git-send-email-peng.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [DPDK] net/i40e: fix RSS hash update problem for X722 VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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] |= From patchwork Mon Jul 22 13:50:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Peng" X-Patchwork-Id: 56822 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 116511B9A6; Mon, 22 Jul 2019 09:13:05 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B374D1B95D; Mon, 22 Jul 2019 09:13:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 00:13:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,294,1559545200"; d="scan'208";a="174148559" Received: from #worker1.sh.intel.com ([10.67.117.62]) by orsmga006.jf.intel.com with ESMTP; 22 Jul 2019 00:12:59 -0700 From: penghuan To: qi.z.zhang@intel.com Cc: dev@dpdk.org, beilei.xing@intel.com, penghuan , stable@dpdk.org Date: Mon, 22 Jul 2019 13:50:28 +0000 Message-Id: <1563803428-101418-1-git-send-email-peng.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1563551049-25638-1-git-send-email-peng.huang@intel.com> References: <1563551049-25638-1-git-send-email-peng.huang@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix RSS hash update problem for X722 VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Peng Huang Acked-by: Qi Zhang --- 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] |=