From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8BC4AA0093; Mon, 18 May 2020 02:59:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 197401D559; Mon, 18 May 2020 02:59:22 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7A4771D558; Mon, 18 May 2020 02:59:20 +0200 (CEST) IronPort-SDR: OqjuQEGCOR1nVQYY1lvHFBR2Rt0hA93hgJ+tynUFIG+eSWF+tlXBa3ilOoSTFhluMs+ugz4jRu QOh1AlZWDzRA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2020 17:59:19 -0700 IronPort-SDR: khb2neGp6KYXscKKX+hU5qc2nKtRIVKoZ3bMl5pGXY52pCgt3WVr1Gcnl72sHrX3+u2qam5lD7 3qNOuKd3y+vg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,405,1583222400"; d="scan'208";a="465591794" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.116.183]) by fmsmga006.fm.intel.com with ESMTP; 17 May 2020 17:59:18 -0700 Date: Mon, 18 May 2020 08:50:52 +0800 From: Ye Xiaolong To: Shougang Wang Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20200518005052.GG1064@intel.com> References: <20200424085225.27655-1-shougangx.wang@intel.com> <20200515073231.19158-1-shougangx.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200515073231.19158-1-shougangx.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: fix queue region issue in RSS flow 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" On 05/15, Shougang Wang wrote: >This patch fixes the issue that the queue region does not >take effect due to incorrectly setting the flow type. > >Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") >Cc: stable@dpdk.org > >Signed-off-by: Shougang Wang >Reviewed-by: Jeff Guo >Tested-by: Hailin Xu >Tested-by: Lunyuan Cui >--- >v4: >-rebased on dpdk-next-net-intel >--- > drivers/net/i40e/i40e_flow.c | 35 ++++++++++++++++++++++++++++++++--- > 1 file changed, 32 insertions(+), 3 deletions(-) > >diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c >index f5f2f0d5d..1b2c86fa9 100644 >--- a/drivers/net/i40e/i40e_flow.c >+++ b/drivers/net/i40e/i40e_flow.c >@@ -4623,6 +4623,34 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > uint32_t index = 0; > uint64_t hf_bit = 1; > >+ static const struct { >+ uint64_t rss_type; >+ enum i40e_filter_pctype pctype; >+ } pctype_match_table[] = { >+ {ETH_RSS_FRAG_IPV4, >+ I40E_FILTER_PCTYPE_FRAG_IPV4}, >+ {ETH_RSS_NONFRAG_IPV4_TCP, >+ I40E_FILTER_PCTYPE_NONF_IPV4_TCP}, >+ {ETH_RSS_NONFRAG_IPV4_UDP, >+ I40E_FILTER_PCTYPE_NONF_IPV4_UDP}, >+ {ETH_RSS_NONFRAG_IPV4_SCTP, >+ I40E_FILTER_PCTYPE_NONF_IPV4_SCTP}, >+ {ETH_RSS_NONFRAG_IPV4_OTHER, >+ I40E_FILTER_PCTYPE_NONF_IPV4_OTHER}, >+ {ETH_RSS_FRAG_IPV6, >+ I40E_FILTER_PCTYPE_FRAG_IPV6}, >+ {ETH_RSS_NONFRAG_IPV6_TCP, >+ I40E_FILTER_PCTYPE_NONF_IPV6_TCP}, >+ {ETH_RSS_NONFRAG_IPV6_UDP, >+ I40E_FILTER_PCTYPE_NONF_IPV6_UDP}, >+ {ETH_RSS_NONFRAG_IPV6_SCTP, >+ I40E_FILTER_PCTYPE_NONF_IPV6_SCTP}, >+ {ETH_RSS_NONFRAG_IPV6_OTHER, >+ I40E_FILTER_PCTYPE_NONF_IPV6_OTHER}, >+ {ETH_RSS_L2_PAYLOAD, >+ I40E_FILTER_PCTYPE_L2_PAYLOAD}, >+ }; >+ > NEXT_ITEM_OF_ACTION(act, actions, index); > rss = act->conf; > >@@ -4639,9 +4667,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > } > > if (p_info.action_flag && rss->queue_num) { >- for (n = 0; n < 64; n++) { >- if (rss->types & (hf_bit << n)) { >- conf_info->region[0].hw_flowtype[0] = n; >+ for (j = 0; j < RTE_DIM(pctype_match_table); j++) { >+ if (rss->types & pctype_match_table[j].rss_type) { >+ conf_info->region[0].hw_flowtype[0] = >+ (uint8_t)pctype_match_table[j].pctype; > conf_info->region[0].flowtype_num = 1; > conf_info->queue_region_number = 1; > break; >-- >2.17.1 > Applied to dpdk-next-net-intel, Thanks.