From patchwork Tue Apr 28 05:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 69421 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9ACD1A00BE; Tue, 28 Apr 2020 08:11:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 336681D41F; Tue, 28 Apr 2020 08:11:08 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 156E61D381; Tue, 28 Apr 2020 08:11:03 +0200 (CEST) IronPort-SDR: 76unCNWYuj4sFqV7LbTDqp61GVlvZ6FGMEzG0/dIzwM4ZYGS1817sohE0b+rxWtYBjhZemjIHw kWAzyq4e92AQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 23:11:03 -0700 IronPort-SDR: MrGv5hVZnyXfxzvT5RM/h+0Am6SJ4c691GFgyDAdnGw78oMuuNCin7FVGHew5eLu18gmp812M7 YO9FIOj0ZFrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="260990707" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([172.16.182.123]) by orsmga006.jf.intel.com with ESMTP; 27 Apr 2020 23:11:02 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, beilei.xing@intel.com, maxime.leroy@6wind.com, Wei Zhao Date: Tue, 28 Apr 2020 13:48:13 +0800 Message-Id: <20200428054815.3551-2-wei.zhao1@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200428054815.3551-1-wei.zhao1@intel.com> References: <20200427071500.14767-1-wei.zhao1@intel.com> <20200428054815.3551-1-wei.zhao1@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/3] net/i40e: fix FDIR issue for ARP packets 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 can enable FDIR awith ethertype as input set for ARP packet, it will associate this rule, "flow create 0 ingress pattern eth type is 0x0806 / end actions mark id 0x86 / rss / end", with pctype I40E_FILTER_PCTYPE_L2_PAYLOAD for ARP packet rule. I have tried to enable ARP ethertype for FDIR filter, it work well for ARP for FDIR filter, so delete the check. Bugzilla ID: 402 Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR") Cc: stable@dpdk.org Signed-off-by: Wei Zhao --- drivers/net/i40e/i40e_flow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 7e64ae53a..1533d5abb 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -2666,7 +2666,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev, if (next_type == RTE_FLOW_ITEM_TYPE_VLAN || ether_type == RTE_ETHER_TYPE_IPV4 || ether_type == RTE_ETHER_TYPE_IPV6 || - ether_type == RTE_ETHER_TYPE_ARP || ether_type == outer_tpid) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -2711,7 +2710,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev, if (ether_type == RTE_ETHER_TYPE_IPV4 || ether_type == RTE_ETHER_TYPE_IPV6 || - ether_type == RTE_ETHER_TYPE_ARP || ether_type == outer_tpid) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, From patchwork Tue Apr 28 05:48:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 69422 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4967A00BE; Tue, 28 Apr 2020 08:11:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8C0C1D483; Tue, 28 Apr 2020 08:11:09 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B61B81D41F; Tue, 28 Apr 2020 08:11:05 +0200 (CEST) IronPort-SDR: FYzyh36XAkZMdXN6dvG0dMMTT8ju5YH5UclK60+02cMW/Vej2NIj+u3bWvW5SyADh9dFpCjx3s NTkD1k/xiXTw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 23:11:05 -0700 IronPort-SDR: 4oR3nbTQlf32VI8fJ7LWbXyE+wgWMqRgtaynQkr80pciNqYo+aZg0QS5EXmzCPA1fe+eMMjgnj riQTv5NNQcPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="260990713" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([172.16.182.123]) by orsmga006.jf.intel.com with ESMTP; 27 Apr 2020 23:11:03 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, beilei.xing@intel.com, maxime.leroy@6wind.com, Wei Zhao Date: Tue, 28 Apr 2020 13:48:14 +0800 Message-Id: <20200428054815.3551-3-wei.zhao1@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200428054815.3551-1-wei.zhao1@intel.com> References: <20200427071500.14767-1-wei.zhao1@intel.com> <20200428054815.3551-1-wei.zhao1@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/3] doc: input set requirement of each pctype for FDIR 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" Add input set requirement info to i40e doc. Bugzilla ID: 403 Signed-off-by: Wei Zhao --- doc/guides/nics/i40e.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 416b3904e..ad5f51c38 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -747,6 +747,13 @@ Use 16 Bytes RX Descriptor Size As i40e PMD supports both 16 and 32 bytes RX descriptor sizes, and 16 bytes size can provide helps to high performance of small packets. Configuration of ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC`` in config files can be changed to use 16 bytes size RX descriptors. +input set requirement of each pctype for FDIR +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Each pctype packet can only have one specific input set for FDIR, for example if you download 2 rte_flow rules of different input set for one specific pctype, +it is will fail and return the info "Conflict with the first rule's input set", that means the first type of input set conflict with the current one, +this limitaition is required by hardware. + Example of getting best performance with l3fwd example ------------------------------------------------------ From patchwork Tue Apr 28 05:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 69423 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2EA4AA00BE; Tue, 28 Apr 2020 08:11:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03A601D522; Tue, 28 Apr 2020 08:11:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 799271D41F; Tue, 28 Apr 2020 08:11:07 +0200 (CEST) IronPort-SDR: lC0Blth1+0Oj5j7JHGfN/DmrAJX3yRUpXpjloCkitqvkZiPrJiJc+NqUshxSSWuQVDbotlje1X X2dBfMv9Vbzg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 23:11:07 -0700 IronPort-SDR: 6jwHa1rvrqqdAAILDpUHhJL5Qno/nOoD0Uo61NOHsHSejxRvwED4wRCP6I5n+UIQJbXP3itk+w zDNpsbv3g5+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,327,1583222400"; d="scan'208";a="260990721" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([172.16.182.123]) by orsmga006.jf.intel.com with ESMTP; 27 Apr 2020 23:11:05 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, beilei.xing@intel.com, maxime.leroy@6wind.com, Wei Zhao Date: Tue, 28 Apr 2020 13:48:15 +0800 Message-Id: <20200428054815.3551-4-wei.zhao1@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200428054815.3551-1-wei.zhao1@intel.com> References: <20200427071500.14767-1-wei.zhao1@intel.com> <20200428054815.3551-1-wei.zhao1@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/3] net/i40e: remove teardown when flush FDIR filter 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" When we flush FDIR filter, we can not call i40e_fdir_teardown() function as it will free vsi used for FDIR, then the vsi->base_queue will be freed from pf->qp_pool, but vsi->base_queue can only get once when do dev init in i40e_pf_setup(). If we free it, it will never be alloc again. Bugzilla ID: 404 Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically") Cc: stable@dpdk.org Signed-off-by: Wei Zhao --- drivers/net/i40e/i40e_flow.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 1533d5abb..65f877866 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -5145,7 +5145,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev, /* If the last flow is destroyed, disable fdir. */ if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) { - i40e_fdir_teardown(pf); i40e_fdir_rx_proc_enable(dev, 0); } break; @@ -5343,8 +5342,6 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) pf->fdir.inset_flag[pctype] = 0; } - i40e_fdir_teardown(pf); - return ret; }