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 B8ED7A04A2 for ; Tue, 12 May 2020 11:37:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8837B1C027; Tue, 12 May 2020 11:37:21 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 8D2251BFCF; Tue, 12 May 2020 11:37:18 +0200 (CEST) IronPort-SDR: wlR2YkII3xXat/5AgS1j19VzyF4roIW7UCGcjRkEBFG09ausuvgWCUqKGv/xTNIZCnp+OnfgbW lHUsv+bNGSMQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 02:37:17 -0700 IronPort-SDR: 9qLhqHMWOaYbcyeOkVF16q1S/VeA0Y+oWzwvSw9i5C/UAdksev7vzBpqkkQVI0uBZkn7G4BeJh 7eGUuzl6CMjw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,383,1583222400"; d="scan'208";a="286589143" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.165]) ([10.67.68.165]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2020 02:37:15 -0700 To: Shougang Wang , dev@dpdk.org Cc: beilei.xing@intel.com, stable@dpdk.org References: <20200424085225.27655-1-shougangx.wang@intel.com> <20200424093605.20519-1-shougangx.wang@intel.com> From: Jeff Guo Message-ID: Date: Tue, 12 May 2020 17:37:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200424093605.20519-1-shougangx.wang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/i40e: fix queue region issue in RSS flow X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" hi, shougang On 4/24/2020 5:36 PM, 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 > --- > v2: > -Update the various name. > --- > drivers/net/i40e/i40e_flow.c | 34 +++++++++++++++++++++++++++++++--- > 1 file changed, 31 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c > index 7e64ae53a..9a306aed6 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4624,6 +4624,33 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > uint16_t i, j, n, tmp, nb_types; > uint32_t index = 0; > uint64_t hf_bit = 1; I am not sure that a null line here or flow the Christmas tree to let it look good?  Other looks good and you could add my Review-by. > + 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; > @@ -4641,9 +4668,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > } > > if (p_info.action_flag) { > - 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;