List patch comments

GET /api/patches/74516/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/74516/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/74516/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 116374, "web_url": "https://patches.dpdk.org/comment/116374/", "msgid": "<6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com", "date": "2020-07-21T06:41:45", "subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "submitter": { "id": 1686, "url": "https://patches.dpdk.org/api/people/1686/?format=api", "name": "Xie, WeiX", "email": "weix.xie@intel.com" }, "content": "Tested-by: Zhang, XiX <xix.zhang@intel.com>\n\nRegards,\nXie Wei\n\n\n-----Original Message-----\nFrom: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang\nSent: Tuesday, July 21, 2020 1:49 PM\nTo: dev@dpdk.org\nCc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>; stable@dpdk.org\nSubject: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table\n\nThe hash look up table(LUT) will not be initializing when starting testpmd with --disable-rss. So that some invalid queue indexes may still in the LUT. When enable RSS by creating RSS rule, some packets will not be into the valid queues.\nThis patch fixes this issue by initializing the LUT when creating an RSS rule.\n\nFixes: feaae285b342 (\"net/i40e: support hash configuration in RSS flow\")\nCc: stable@dpdk.org\n\nSigned-off-by: Shougang Wang <shougangx.wang@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 134 ++++++++++++++++-----------------\n 1 file changed, 63 insertions(+), 71 deletions(-)\n\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 393b5320f..e56543393 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -13070,6 +13070,55 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf *out,\n \treturn 0;\n }\n \n+/* If conf is NULL, function will init hash LUT with default \n+configration*/ static int i40e_rss_set_lut(struct i40e_pf *pf,\n+\t\t struct i40e_rte_flow_rss_conf *conf) {\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n+\tuint32_t lut = 0;\n+\tuint16_t j, num;\n+\tuint32_t i;\n+\n+\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n+\t * It's necessary to calculate the actual PF queues that are configured.\n+\t */\n+\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n+\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n+\telse\n+\t\tnum = pf->dev_data->nb_rx_queues;\n+\n+\tif (conf == NULL)\n+\t\tnum = RTE_MIN(num, I40E_MAX_Q_PER_TC);\n+\telse\n+\t\tnum = RTE_MIN(num, conf->conf.queue_num);\n+\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n+\t\t\tnum);\n+\n+\tif (num == 0) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n+\t\t\tpf->dev_data->port_id);\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\t/* Fill in redirection table */\n+\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n+\t\tif (j == num)\n+\t\t\tj = 0;\n+\t\tif (conf == NULL)\n+\t\t\tlut = (lut << 8) | (j & ((0x1 <<\n+\t\t\t\thw->func_caps.rss_table_entry_width) - 1));\n+\t\telse\n+\t\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n+\t\t\thw->func_caps.rss_table_entry_width) - 1));\n+\t\tif ((i & 3) == 3)\n+\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n+\t}\n+\n+\treturn 0;\n+}\n+\n /* Write HENA register to enable hash */ static int i40e_rss_hash_set(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf *rss_conf) @@ -13318,12 +13367,24 @@ static int i40e_rss_enable_hash(struct i40e_pf *pf,\n \t\tstruct i40e_rte_flow_rss_conf *conf)\n {\n+\tenum rte_eth_rx_mq_mode mq_mode = \n+pf->dev_data->dev_conf.rxmode.mq_mode;\n \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n \tstruct i40e_rte_flow_rss_conf rss_conf;\n+\tint ret;\n \n \tif (!(conf->conf.types & pf->adapter->flow_types_mask))\n \t\treturn -ENOTSUP;\n \n+\t/* If the RSS is disabled before this, the LUT is uninitialized. \n+\t * So it is necessary to initialize it here.\n+\t */\n+\tif (!(mq_mode & ETH_MQ_RX_RSS_FLAG) && !pf->rss_info.conf.queue_num &&\n+\t !pf->adapter->rss_reta_updated) {\n+\t\tret = i40e_rss_set_lut(pf, NULL);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n \tmemset(&rss_conf, 0, sizeof(rss_conf));\n \trte_memcpy(&rss_conf, conf, sizeof(rss_conf));\n \n@@ -13362,39 +13423,7 @@ static int\n i40e_rss_config_queue_region(struct i40e_pf *pf,\n \t\tstruct i40e_rte_flow_rss_conf *conf)\n {\n-\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n-\tuint32_t lut = 0;\n-\tuint16_t j, num;\n-\tuint32_t i;\n-\n-\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n-\t * It's necessary to calculate the actual PF queues that are configured.\n-\t */\n-\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n-\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n-\telse\n-\t\tnum = pf->dev_data->nb_rx_queues;\n-\n-\tnum = RTE_MIN(num, conf->conf.queue_num);\n-\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n-\t\t\tnum);\n-\n-\tif (num == 0) {\n-\t\tPMD_DRV_LOG(ERR,\n-\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n-\t\t\tpf->dev_data->port_id);\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\t/* Fill in redirection table */\n-\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n-\t\tif (j == num)\n-\t\t\tj = 0;\n-\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n-\t\t\thw->func_caps.rss_table_entry_width) - 1));\n-\t\tif ((i & 3) == 3)\n-\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n-\t}\n+\ti40e_rss_set_lut(pf, conf);\n \n \ti40e_rss_mark_invalid_rule(pf, conf);\n \n@@ -13491,46 +13520,9 @@ i40e_rss_disable_hash(struct i40e_pf *pf, static int i40e_rss_clear_queue_region(struct i40e_pf *pf) {\n-\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n-\tuint16_t queue[I40E_MAX_Q_PER_TC];\n-\tuint32_t num_rxq, i;\n-\tuint32_t lut = 0;\n-\tuint16_t j, num;\n-\n-\tnum_rxq = RTE_MIN(pf->dev_data->nb_rx_queues, I40E_MAX_Q_PER_TC);\n \n-\tfor (j = 0; j < num_rxq; j++)\n-\t\tqueue[j] = j;\n-\n-\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n-\t * It's necessary to calculate the actual PF queues that are configured.\n-\t */\n-\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n-\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n-\telse\n-\t\tnum = pf->dev_data->nb_rx_queues;\n-\n-\tnum = RTE_MIN(num, num_rxq);\n-\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n-\t\t\tnum);\n-\n-\tif (num == 0) {\n-\t\tPMD_DRV_LOG(ERR,\n-\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n-\t\t\tpf->dev_data->port_id);\n-\t\treturn -ENOTSUP;\n-\t}\n-\n-\t/* Fill in redirection table */\n-\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n-\t\tif (j == num)\n-\t\t\tj = 0;\n-\t\tlut = (lut << 8) | (queue[j] & ((0x1 <<\n-\t\t\thw->func_caps.rss_table_entry_width) - 1));\n-\t\tif ((i & 3) == 3)\n-\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n-\t}\n+\ti40e_rss_set_lut(pf, NULL);\n \n \trss_info->conf.queue_num = 0;\n \tmemset(&rss_info->conf.queue, 0, sizeof(uint16_t));\n--\n2.17.1", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D363BA0526;\n\tTue, 21 Jul 2020 08:41:56 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 78BA91BFFF;\n\tTue, 21 Jul 2020 08:41:55 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 072CB1BFFE;\n Tue, 21 Jul 2020 08:41:51 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jul 2020 23:41:50 -0700", "from fmsmsx105.amr.corp.intel.com ([10.18.124.203])\n by fmsmga002.fm.intel.com with ESMTP; 20 Jul 2020 23:41:50 -0700", "from fmsmsx114.amr.corp.intel.com (10.18.116.8) by\n FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Mon, 20 Jul 2020 23:41:50 -0700", "from cdsmsx103.ccr.corp.intel.com (172.17.3.37) by\n FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Mon, 20 Jul 2020 23:41:49 -0700", "from cdsmsx102.ccr.corp.intel.com ([169.254.2.201]) by\n CDSMSX103.ccr.corp.intel.com ([169.254.5.225]) with mapi id 14.03.0439.000;\n Tue, 21 Jul 2020 14:41:46 +0800" ], "IronPort-SDR": [ "\n MAu8ZQUkPw2kukxR3j5/TVc3JMMnwCyPsmS/ISs1slU1rpclUC1C8kpfduEbGUskEN9p/ZyF6f\n 4W1E/YKDJJZw==", "\n colI+XRXKPtZNP1hw1B7XGL+dgWTo77lNQklrRzVshzsgiFEPBzNyD2+IPPsYKPZIqaOZaevBu\n 7A1NB1mdqv3Q==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9688\"; a=\"211623482\"", "E=Sophos;i=\"5.75,377,1589266800\"; d=\"scan'208\";a=\"211623482\"", "E=Sophos;i=\"5.75,377,1589266800\"; d=\"scan'208\";a=\"319799674\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "\"Xie, WeiX\" <weix.xie@intel.com>", "To": "\"Wang, ShougangX\" <shougangx.wang@intel.com>,\n \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"Guo, Jia\" <jia.guo@intel.com>,\n \"Wang, ShougangX\" <shougangx.wang@intel.com>, \"stable@dpdk.org\"\n <stable@dpdk.org>", "Thread-Topic": "[dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "Thread-Index": "AQHWXySrAslY/DhCGU2jcPdEARPwAakRlUHA", "Date": "Tue, 21 Jul 2020 06:41:45 +0000", "Message-ID": "\n <6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com>", "References": "<20200715063515.9262-1-shougangx.wang@intel.com>\n <20200721054920.29749-1-shougangx.wang@intel.com>", "In-Reply-To": "<20200721054920.29749-1-shougangx.wang@intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "x-originating-ip": "[172.17.6.105]", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "Subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116468, "web_url": "https://patches.dpdk.org/comment/116468/", "msgid": "<039ED4275CED7440929022BC67E7061154863E7D@SHSMSX103.ccr.corp.intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/039ED4275CED7440929022BC67E7061154863E7D@SHSMSX103.ccr.corp.intel.com", "date": "2020-07-22T05:31:01", "subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "submitter": { "id": 504, "url": "https://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "content": "> -----Original Message-----\n> From: dev <dev-bounces@dpdk.org> On Behalf Of Shougang Wang\n> Sent: Tuesday, July 21, 2020 1:49 PM\n> To: dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang,\n> ShougangX <shougangx.wang@intel.com>; stable@dpdk.org\n> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table\n> \n> The hash look up table(LUT) will not be initializing when starting testpmd with\n> --disable-rss. So that some invalid queue indexes may still in the LUT. When\n> enable RSS by creating RSS rule, some packets will not be into the valid queues.\n> This patch fixes this issue by initializing the LUT when creating an RSS rule.\n\nCould you explain why you only initialize the LUT when creating an RSS rule but not at dev_init or dev_start?\nWhat if user configure LUT table before create a RSS rule? Does that mean the LUT table will be flushed?\n\n> \n> Fixes: feaae285b342 (\"net/i40e: support hash configuration in RSS flow\")\n> Cc: stable@dpdk.org\n> \n> Signed-off-by: Shougang Wang <shougangx.wang@intel.com>\n> ---\n> drivers/net/i40e/i40e_ethdev.c | 134 ++++++++++++++++-----------------\n> 1 file changed, 63 insertions(+), 71 deletions(-)\n> \n> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\n> index 393b5320f..e56543393 100644\n> --- a/drivers/net/i40e/i40e_ethdev.c\n> +++ b/drivers/net/i40e/i40e_ethdev.c\n> @@ -13070,6 +13070,55 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf\n> *out,\n> \treturn 0;\n> }\n> \n> +/* If conf is NULL, function will init hash LUT with default\n> +configration*/ static int i40e_rss_set_lut(struct i40e_pf *pf,\n> +\t\t struct i40e_rte_flow_rss_conf *conf) {\n> +\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> +\tuint32_t lut = 0;\n> +\tuint16_t j, num;\n> +\tuint32_t i;\n> +\n> +\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> +\t * It's necessary to calculate the actual PF queues that are configured.\n> +\t */\n> +\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> +\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> +\telse\n> +\t\tnum = pf->dev_data->nb_rx_queues;\n> +\n> +\tif (conf == NULL)\n> +\t\tnum = RTE_MIN(num, I40E_MAX_Q_PER_TC);\n> +\telse\n> +\t\tnum = RTE_MIN(num, conf->conf.queue_num);\n> +\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> +\t\t\tnum);\n> +\n> +\tif (num == 0) {\n> +\t\tPMD_DRV_LOG(ERR,\n> +\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> +\t\t\tpf->dev_data->port_id);\n> +\t\treturn -ENOTSUP;\n> +\t}\n> +\n> +\t/* Fill in redirection table */\n> +\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> +\t\tif (j == num)\n> +\t\t\tj = 0;\n> +\t\tif (conf == NULL)\n> +\t\t\tlut = (lut << 8) | (j & ((0x1 <<\n> +\t\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> +\t\telse\n> +\t\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> +\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> +\t\tif ((i & 3) == 3)\n> +\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> /* Write HENA register to enable hash */ static int\n> i40e_rss_hash_set(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf *rss_conf)\n> @@ -13318,12 +13367,24 @@ static int i40e_rss_enable_hash(struct i40e_pf\n> *pf,\n> \t\tstruct i40e_rte_flow_rss_conf *conf)\n> {\n> +\tenum rte_eth_rx_mq_mode mq_mode =\n> +pf->dev_data->dev_conf.rxmode.mq_mode;\n> \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> \tstruct i40e_rte_flow_rss_conf rss_conf;\n> +\tint ret;\n> \n> \tif (!(conf->conf.types & pf->adapter->flow_types_mask))\n> \t\treturn -ENOTSUP;\n> \n> +\t/* If the RSS is disabled before this, the LUT is uninitialized.\n> +\t * So it is necessary to initialize it here.\n> +\t */\n> +\tif (!(mq_mode & ETH_MQ_RX_RSS_FLAG)\n> && !pf->rss_info.conf.queue_num &&\n> +\t !pf->adapter->rss_reta_updated) {\n> +\t\tret = i40e_rss_set_lut(pf, NULL);\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\t}\n> +\n> \tmemset(&rss_conf, 0, sizeof(rss_conf));\n> \trte_memcpy(&rss_conf, conf, sizeof(rss_conf));\n> \n> @@ -13362,39 +13423,7 @@ static int\n> i40e_rss_config_queue_region(struct i40e_pf *pf,\n> \t\tstruct i40e_rte_flow_rss_conf *conf)\n> {\n> -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> -\tuint32_t lut = 0;\n> -\tuint16_t j, num;\n> -\tuint32_t i;\n> -\n> -\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> -\t * It's necessary to calculate the actual PF queues that are configured.\n> -\t */\n> -\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> -\telse\n> -\t\tnum = pf->dev_data->nb_rx_queues;\n> -\n> -\tnum = RTE_MIN(num, conf->conf.queue_num);\n> -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> -\t\t\tnum);\n> -\n> -\tif (num == 0) {\n> -\t\tPMD_DRV_LOG(ERR,\n> -\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> -\t\t\tpf->dev_data->port_id);\n> -\t\treturn -ENOTSUP;\n> -\t}\n> -\n> -\t/* Fill in redirection table */\n> -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> -\t\tif (j == num)\n> -\t\t\tj = 0;\n> -\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> -\t\tif ((i & 3) == 3)\n> -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> -\t}\n> +\ti40e_rss_set_lut(pf, conf);\n> \n> \ti40e_rss_mark_invalid_rule(pf, conf);\n> \n> @@ -13491,46 +13520,9 @@ i40e_rss_disable_hash(struct i40e_pf *pf, static\n> int i40e_rss_clear_queue_region(struct i40e_pf *pf) {\n> -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> -\tuint16_t queue[I40E_MAX_Q_PER_TC];\n> -\tuint32_t num_rxq, i;\n> -\tuint32_t lut = 0;\n> -\tuint16_t j, num;\n> -\n> -\tnum_rxq = RTE_MIN(pf->dev_data->nb_rx_queues,\n> I40E_MAX_Q_PER_TC);\n> \n> -\tfor (j = 0; j < num_rxq; j++)\n> -\t\tqueue[j] = j;\n> -\n> -\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> -\t * It's necessary to calculate the actual PF queues that are configured.\n> -\t */\n> -\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> -\telse\n> -\t\tnum = pf->dev_data->nb_rx_queues;\n> -\n> -\tnum = RTE_MIN(num, num_rxq);\n> -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> -\t\t\tnum);\n> -\n> -\tif (num == 0) {\n> -\t\tPMD_DRV_LOG(ERR,\n> -\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> -\t\t\tpf->dev_data->port_id);\n> -\t\treturn -ENOTSUP;\n> -\t}\n> -\n> -\t/* Fill in redirection table */\n> -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> -\t\tif (j == num)\n> -\t\t\tj = 0;\n> -\t\tlut = (lut << 8) | (queue[j] & ((0x1 <<\n> -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> -\t\tif ((i & 3) == 3)\n> -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> -\t}\n> +\ti40e_rss_set_lut(pf, NULL);\n> \n> \trss_info->conf.queue_num = 0;\n> \tmemset(&rss_info->conf.queue, 0, sizeof(uint16_t));\n> --\n> 2.17.1", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AECBFA0526;\n\tWed, 22 Jul 2020 07:31:10 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 547221BFE4;\n\tWed, 22 Jul 2020 07:31:09 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id DA24E1BFD1;\n Wed, 22 Jul 2020 07:31:07 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 22:31:06 -0700", "from fmsmsx602.amr.corp.intel.com ([10.18.126.82])\n by orsmga003.jf.intel.com with ESMTP; 21 Jul 2020 22:31:06 -0700", "from fmsmsx602.amr.corp.intel.com (10.18.126.82) by\n fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.1713.5; Tue, 21 Jul 2020 22:31:05 -0700", "from shsmsx154.ccr.corp.intel.com (10.239.6.54) by\n fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5\n via Frontend Transport; Tue, 21 Jul 2020 22:31:05 -0700", "from shsmsx103.ccr.corp.intel.com ([169.254.4.22]) by\n SHSMSX154.ccr.corp.intel.com ([169.254.7.32]) with mapi id 14.03.0439.000;\n Wed, 22 Jul 2020 13:31:02 +0800" ], "IronPort-SDR": [ "\n gDfOF3ivZwh2VxvSIuFfMLXNpX+oFr2SY4uU8hqonPt+CF+jJqgrZy1ePixIsqIhAo0k48mMvu\n vr2bwQoTO9cQ==", "\n w4ZUkejN/3xyRT5nhY+ytEFC7b4kdeZBaySPnUoVFLVhIB9wC+CX5Jnl5CT111vyZ/jigaT8Rg\n A+DF12Eqjm3g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9689\"; a=\"129841857\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"129841857\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"284107555\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "\"Zhang, Qi Z\" <qi.z.zhang@intel.com>", "To": "\"Wang, ShougangX\" <shougangx.wang@intel.com>,\n \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"Guo, Jia\" <jia.guo@intel.com>,\n \"Wang, ShougangX\" <shougangx.wang@intel.com>, \"stable@dpdk.org\"\n <stable@dpdk.org>", "Thread-Topic": "[dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "Thread-Index": "AQHWXySqA49xOEYFTkiaJTOKcGomf6kTE8og", "Date": "Wed, 22 Jul 2020 05:31:01 +0000", "Message-ID": "\n <039ED4275CED7440929022BC67E7061154863E7D@SHSMSX103.ccr.corp.intel.com>", "References": "<20200715063515.9262-1-shougangx.wang@intel.com>\n <20200721054920.29749-1-shougangx.wang@intel.com>", "In-Reply-To": "<20200721054920.29749-1-shougangx.wang@intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "dlp-product": "dlpe-windows", "dlp-version": "11.2.0.6", "dlp-reaction": "no-action", "x-originating-ip": "[10.239.127.40]", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "Subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116469, "web_url": "https://patches.dpdk.org/comment/116469/", "msgid": "<334f916e-1aad-264f-e073-6e737e78c767@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/334f916e-1aad-264f-e073-6e737e78c767@intel.com", "date": "2020-07-22T05:50:46", "subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "submitter": { "id": 507, "url": "https://patches.dpdk.org/api/people/507/?format=api", "name": "Guo, Jia", "email": "jia.guo@intel.com" }, "content": "hi, shougang\n\nOn 7/21/2020 2:41 PM, Xie, WeiX wrote:\n> Tested-by: Zhang, XiX <xix.zhang@intel.com>\n>\n> Regards,\n> Xie Wei\n>\n>\n> -----Original Message-----\n> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang\n> Sent: Tuesday, July 21, 2020 1:49 PM\n> To: dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>; stable@dpdk.org\n> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table\n>\n> The hash look up table(LUT) will not be initializing when starting testpmd with --disable-rss. So that some invalid queue indexes may still in the LUT. When enable RSS by creating RSS rule, some packets will not be into the valid queues.\n> This patch fixes this issue by initializing the LUT when creating an RSS rule.\n>\n> Fixes: feaae285b342 (\"net/i40e: support hash configuration in RSS flow\")\n> Cc: stable@dpdk.org\n>\n> Signed-off-by: Shougang Wang <shougangx.wang@intel.com>\n> ---\n> drivers/net/i40e/i40e_ethdev.c | 134 ++++++++++++++++-----------------\n> 1 file changed, 63 insertions(+), 71 deletions(-)\n>\n> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 393b5320f..e56543393 100644\n> --- a/drivers/net/i40e/i40e_ethdev.c\n> +++ b/drivers/net/i40e/i40e_ethdev.c\n> @@ -13070,6 +13070,55 @@ i40e_rss_conf_init(struct i40e_rte_flow_rss_conf *out,\n> \treturn 0;\n> }\n> \n> +/* If conf is NULL, function will init hash LUT with default\n> +configration*/\n\n\nPlease fix the checkpatch issue here.\n\n\n> static int i40e_rss_set_lut(struct i40e_pf *pf,\n\n\nIn order to eliminate any confuse with current i40e_set_rss_lut, please \nchange the name, such as \"i40e_rss_lut_init\" or other better naming.\n\n\n> +\t\t struct i40e_rte_flow_rss_conf *conf) {\n> +\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> +\tuint32_t lut = 0;\n> +\tuint16_t j, num;\n> +\tuint32_t i;\n> +\n> +\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> +\t * It's necessary to calculate the actual PF queues that are configured.\n> +\t */\n> +\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n> +\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> +\telse\n> +\t\tnum = pf->dev_data->nb_rx_queues;\n> +\n> +\tif (conf == NULL)\n> +\t\tnum = RTE_MIN(num, I40E_MAX_Q_PER_TC);\n> +\telse\n> +\t\tnum = RTE_MIN(num, conf->conf.queue_num);\n> +\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> +\t\t\tnum);\n\n\nAlignment should match open parenthesis.\n\n\n> +\n> +\tif (num == 0) {\n> +\t\tPMD_DRV_LOG(ERR,\n> +\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> +\t\t\tpf->dev_data->port_id);\n> +\t\treturn -ENOTSUP;\n> +\t}\n> +\n> +\t/* Fill in redirection table */\n> +\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> +\t\tif (j == num)\n> +\t\t\tj = 0;\n> +\t\tif (conf == NULL)\n> +\t\t\tlut = (lut << 8) | (j & ((0x1 <<\n> +\t\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> +\t\telse\n> +\t\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> +\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> +\t\tif ((i & 3) == 3)\n> +\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> /* Write HENA register to enable hash */ static int i40e_rss_hash_set(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf *rss_conf) @@ -13318,12 +13367,24 @@ static int i40e_rss_enable_hash(struct i40e_pf *pf,\n> \t\tstruct i40e_rte_flow_rss_conf *conf)\n> {\n> +\tenum rte_eth_rx_mq_mode mq_mode =\n> +pf->dev_data->dev_conf.rxmode.mq_mode;\n> \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> \tstruct i40e_rte_flow_rss_conf rss_conf;\n> +\tint ret;\n\n\nSuggest set the 0 to ret and return ret at the end of this function, so \nret could be use in all part.\n\n\n> \n> \tif (!(conf->conf.types & pf->adapter->flow_types_mask))\n> \t\treturn -ENOTSUP;\n> \n> +\t/* If the RSS is disabled before this, the LUT is uninitialized.\n> +\t * So it is necessary to initialize it here.\n> +\t */\n> +\tif (!(mq_mode & ETH_MQ_RX_RSS_FLAG) && !pf->rss_info.conf.queue_num &&\n> +\t !pf->adapter->rss_reta_updated) {\n> +\t\tret = i40e_rss_set_lut(pf, NULL);\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\t}\n> +\n> \tmemset(&rss_conf, 0, sizeof(rss_conf));\n> \trte_memcpy(&rss_conf, conf, sizeof(rss_conf));\n> \n> @@ -13362,39 +13423,7 @@ static int\n> i40e_rss_config_queue_region(struct i40e_pf *pf,\n> \t\tstruct i40e_rte_flow_rss_conf *conf)\n> {\n> -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> -\tuint32_t lut = 0;\n> -\tuint16_t j, num;\n> -\tuint32_t i;\n> -\n> -\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> -\t * It's necessary to calculate the actual PF queues that are configured.\n> -\t */\n> -\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n> -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> -\telse\n> -\t\tnum = pf->dev_data->nb_rx_queues;\n> -\n> -\tnum = RTE_MIN(num, conf->conf.queue_num);\n> -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> -\t\t\tnum);\n> -\n> -\tif (num == 0) {\n> -\t\tPMD_DRV_LOG(ERR,\n> -\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> -\t\t\tpf->dev_data->port_id);\n> -\t\treturn -ENOTSUP;\n> -\t}\n> -\n> -\t/* Fill in redirection table */\n> -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> -\t\tif (j == num)\n> -\t\t\tj = 0;\n> -\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> -\t\tif ((i & 3) == 3)\n> -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> -\t}\n> +\ti40e_rss_set_lut(pf, conf);\n> \n> \ti40e_rss_mark_invalid_rule(pf, conf);\n> \n> @@ -13491,46 +13520,9 @@ i40e_rss_disable_hash(struct i40e_pf *pf, static int i40e_rss_clear_queue_region(struct i40e_pf *pf) {\n> -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> -\tuint16_t queue[I40E_MAX_Q_PER_TC];\n> -\tuint32_t num_rxq, i;\n> -\tuint32_t lut = 0;\n> -\tuint16_t j, num;\n> -\n> -\tnum_rxq = RTE_MIN(pf->dev_data->nb_rx_queues, I40E_MAX_Q_PER_TC);\n> \n> -\tfor (j = 0; j < num_rxq; j++)\n> -\t\tqueue[j] = j;\n> -\n> -\t/* If both VMDQ and RSS enabled, not all of PF queues are configured.\n> -\t * It's necessary to calculate the actual PF queues that are configured.\n> -\t */\n> -\tif (pf->dev_data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG)\n> -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> -\telse\n> -\t\tnum = pf->dev_data->nb_rx_queues;\n> -\n> -\tnum = RTE_MIN(num, num_rxq);\n> -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are configured\",\n> -\t\t\tnum);\n> -\n> -\tif (num == 0) {\n> -\t\tPMD_DRV_LOG(ERR,\n> -\t\t\t\"No PF queues are configured to enable RSS for port %u\",\n> -\t\t\tpf->dev_data->port_id);\n> -\t\treturn -ENOTSUP;\n> -\t}\n> -\n> -\t/* Fill in redirection table */\n> -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> -\t\tif (j == num)\n> -\t\t\tj = 0;\n> -\t\tlut = (lut << 8) | (queue[j] & ((0x1 <<\n> -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> -\t\tif ((i & 3) == 3)\n> -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> -\t}\n> +\ti40e_rss_set_lut(pf, NULL);\n\n\nNeed to check return value.\n\n\n> \n> \trss_info->conf.queue_num = 0;\n> \tmemset(&rss_info->conf.queue, 0, sizeof(uint16_t));\n> --\n> 2.17.1\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 019CDA0526;\n\tWed, 22 Jul 2020 07:50:54 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9CE991BFBB;\n\tWed, 22 Jul 2020 07:50:53 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id 2F16C1BFBA;\n Wed, 22 Jul 2020 07:50:50 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 22:50:49 -0700", "from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.153])\n ([10.67.68.153])\n by orsmga003.jf.intel.com with ESMTP; 21 Jul 2020 22:50:47 -0700" ], "IronPort-SDR": [ "\n SGvXY7PkI/d7hdBJPp/mYm+dV01I5yBDEdUcf5b7xfmL3kJ0xCqgGaBNRydktoHkud2nernn7m\n LY4ADzQg+DlQ==", "\n 9e9da1m8YG+lsByGuawj9mJmYZOncYCKoYWDTqu5MOgkuUtjjX9ArkZn6VyWBzsZjlSy4HzDmo\n gD0gvdh3C1NQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9689\"; a=\"149440517\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"149440517\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"284111485\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "To": "\"Xie, WeiX\" <weix.xie@intel.com>,\n \"Wang, ShougangX\" <shougangx.wang@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "Cc": "\"Xing, Beilei\" <beilei.xing@intel.com>,\n \"stable@dpdk.org\" <stable@dpdk.org>", "References": "<20200715063515.9262-1-shougangx.wang@intel.com>\n <20200721054920.29749-1-shougangx.wang@intel.com>\n <6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com>", "From": "Jeff Guo <jia.guo@intel.com>", "Message-ID": "<334f916e-1aad-264f-e073-6e737e78c767@intel.com>", "Date": "Wed, 22 Jul 2020 13:50:46 +0800", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101\n Thunderbird/68.10.0", "MIME-Version": "1.0", "In-Reply-To": "\n <6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com>", "Content-Type": "text/plain; charset=utf-8; format=flowed", "Content-Transfer-Encoding": "7bit", "Content-Language": "en-US", "Subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116470, "web_url": "https://patches.dpdk.org/comment/116470/", "msgid": "<BYAPR11MB3477B09C896A40E914B4579F88790@BYAPR11MB3477.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/BYAPR11MB3477B09C896A40E914B4579F88790@BYAPR11MB3477.namprd11.prod.outlook.com", "date": "2020-07-22T06:20:41", "subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "submitter": { "id": 1418, "url": "https://patches.dpdk.org/api/people/1418/?format=api", "name": "Shougang Wang", "email": "shougangx.wang@intel.com" }, "content": "Hi, Qi\n\n> -----Original Message-----\n> From: Zhang, Qi Z <qi.z.zhang@intel.com>\n> Sent: Wednesday, July 22, 2020 1:31 PM\n> To: Wang, ShougangX <shougangx.wang@intel.com>; dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang,\n> ShougangX <shougangx.wang@intel.com>; stable@dpdk.org\n> Subject: RE: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table\n> \n> \n> \n> > -----Original Message-----\n> > From: dev <dev-bounces@dpdk.org> On Behalf Of Shougang Wang\n> > Sent: Tuesday, July 21, 2020 1:49 PM\n> > To: dev@dpdk.org\n> > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia\n> > <jia.guo@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>;\n> > stable@dpdk.org\n> > Subject: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up\n> > table\n> >\n> > The hash look up table(LUT) will not be initializing when starting\n> > testpmd with --disable-rss. So that some invalid queue indexes may\n> > still in the LUT. When enable RSS by creating RSS rule, some packets will not\n> be into the valid queues.\n> > This patch fixes this issue by initializing the LUT when creating an RSS rule.\n> \n> Could you explain why you only initialize the LUT when creating an RSS rule\n> but not at dev_init or dev_start?\nIt is good to initialize the LUT at dev_start, I will fix it.\n\n> What if user configure LUT table before create a RSS rule? Does that mean\n> the LUT table will be flushed?\nYes.\n\nThanks.\nShougang", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 92384A0526;\n\tWed, 22 Jul 2020 08:20:51 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4A6E21BFBA;\n\tWed, 22 Jul 2020 08:20:50 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id B87B3199BC;\n Wed, 22 Jul 2020 08:20:48 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 23:20:47 -0700", "from orsmsx603.amr.corp.intel.com ([10.22.229.16])\n by fmsmga002.fm.intel.com with ESMTP; 21 Jul 2020 23:20:47 -0700", "from orsmsx603.amr.corp.intel.com (10.22.229.16) by\n ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.1713.5; Tue, 21 Jul 2020 23:20:47 -0700", "from ORSEDG002.ED.cps.intel.com (10.7.248.5) by\n orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5\n via Frontend Transport; Tue, 21 Jul 2020 23:20:47 -0700", "from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.51) by\n edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server\n (TLS) id 14.3.439.0; Tue, 21 Jul 2020 23:20:45 -0700", "from BYAPR11MB3477.namprd11.prod.outlook.com (2603:10b6:a03:7c::28)\n by BYAPR11MB3400.namprd11.prod.outlook.com (2603:10b6:a03:1a::18)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.24; Wed, 22 Jul\n 2020 06:20:41 +0000", "from BYAPR11MB3477.namprd11.prod.outlook.com\n ([fe80::11b9:abd9:39e0:f26a]) by BYAPR11MB3477.namprd11.prod.outlook.com\n ([fe80::11b9:abd9:39e0:f26a%3]) with mapi id 15.20.3195.025; Wed, 22 Jul 2020\n 06:20:41 +0000" ], "IronPort-SDR": [ "\n zQ49Kzv22rT8XIH4HNj5WMSQpiAoTli1v4yilypIxvYjw9uJjKO0g6IAQ8Bvs1KXOlLBYTMvhs\n teBS1LH+EiLw==", "\n sJnQA6OanVu9OnIuac0CVIM+etQIPrNf5NKmChlU6+C+S/OqYZhuZe3YioCd/+XO5lJY0ebI3X\n SXPcgLkTe/cg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9689\"; a=\"129845740\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"129845740\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"320168178\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=RlPvxYifRFYXxUXj9y7zCgmPm0xV7u1fpeP2/0e/5VFL/Juk/7bzcCgO7/I2EljSetwmokjbewZN/v/jBw9m5uzyTl6ozuj0qENqywJe9jeOY9cqzLfqg+xWgKy0ZsynSE1qPFopjt+Q+Eib8pzQfTQMHh0+ssDBc5AxSNtJu4cC2To5UeesBQYqpel1QOc+oxrdcgtW75GKDuMWXaL0pOCcMSTDHSflsA8eb2tOWMY+huC2x8ru1P17VPxrWSYj3Nd2AU4DJE5YLR+sbFGKj23B/tS1Tr2oEmmRuYzrtUcQnzOPw+E388kPZmKJSibQlvYXboA9j9dbSh7j3xUkgQ==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=BtpgWq66QBKDRUjDKs4IE2vKnR2shgcwdGihuAGrUOk=;\n b=Hu6YvoTECHPWkSBng+Afjskc1G6GQ1mO8UonO+ucW9LtOJxY/tzslK+K91loyAVmwICTekVNRnStZxt8ANGofJryeN98zQwShOUIPXNY1r/aKV1AaMWy/su/cU/cxkwPNEB3uM11+rlADdiQ/dHZyCMDkb6V+rLf3UuTc3L3bSa6yBMpZ1v+9MsvOEcCczRQVyQN2fDJVxpMhC3TMbLg94Qzsjwg6JjVfd7FVA5gLHP44LuTnE3q2g5ZM57IZz2WeQs+igikHsTFgGHkai8qF7iRFjhscQW22j6N5PATylMGVu0jjaKNOfm7nfDXqt7uCM6zthZSibZ8Y/DVe8s+Bg==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=BtpgWq66QBKDRUjDKs4IE2vKnR2shgcwdGihuAGrUOk=;\n b=mUUaTILP+Zr0dck6VqmWtgQtmGtGJeZFklhJCHDswHsFHleSbZ8ZkErajlAyHsekR0yZfWwUWOSx3g+tsM+awWAwCL3wTkFfJryBHk3mnHxQpzfJQTsYEW66VVlwtVqmaVvnnoK8NmFS845kzlCl6GfD1M4TNDF4Zi28WTkaucc=", "From": "\"Wang, ShougangX\" <shougangx.wang@intel.com>", "To": "\"Zhang, Qi Z\" <qi.z.zhang@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"Guo, Jia\" <jia.guo@intel.com>,\n \"stable@dpdk.org\" <stable@dpdk.org>, \"Di, ChenxuX\" <chenxux.di@intel.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "Thread-Index": "AQHWXySgbaCuNyO260KHkTx8V6T7nKkTFEiAgAAKb4A=", "Date": "Wed, 22 Jul 2020 06:20:41 +0000", "Message-ID": "\n <BYAPR11MB3477B09C896A40E914B4579F88790@BYAPR11MB3477.namprd11.prod.outlook.com>", "References": "<20200715063515.9262-1-shougangx.wang@intel.com>\n <20200721054920.29749-1-shougangx.wang@intel.com>\n <039ED4275CED7440929022BC67E7061154863E7D@SHSMSX103.ccr.corp.intel.com>", "In-Reply-To": "\n <039ED4275CED7440929022BC67E7061154863E7D@SHSMSX103.ccr.corp.intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.102.204.36]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "381169d8-46dd-499d-664e-08d82e075bfc", "x-ms-traffictypediagnostic": "BYAPR11MB3400:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <BYAPR11MB34003071FAAE90210FF31E3888790@BYAPR11MB3400.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:8882;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n mF3bIVe7yC3FK12dguI2xn66MzTS3+OXGn3LDC3IbLgwv3pvW1isK/9D2O1LU0/pPQyhu/bcjGBTrvyKwUSSDDscHEcA/IQ/Qvg8nNAm9EmWb1Nw0z3JAvgBImAkQMsK1ZivApli5m2y6d7h/YR/9hgb5ZlqpD5crBAvIJM21/KmGBleKJyp7BArIrfB8URUkwF/3e42ZEgQMY/IEDLec1YMSbJxZ+z2oG29+CnCvDe6ZQFqq4tTEtez4IQ5FD9UFnmftGH3hQKjMuXlW7XDk9dN7DiNdxWi1I37Bji0VKzvhtWae9o3TRwihOLdxc52fmh6QAgteqGfQ2IT4F4Zaw==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:BYAPR11MB3477.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(366004)(346002)(376002)(396003)(39860400002)(136003)(71200400001)(2906002)(54906003)(110136005)(450100002)(55016002)(52536014)(107886003)(83380400001)(9686003)(33656002)(4326008)(478600001)(8676002)(7696005)(53546011)(8936002)(316002)(5660300002)(66476007)(66946007)(26005)(76116006)(66556008)(86362001)(6506007)(186003)(64756008)(66446008);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n kVav+iVnHCD74ZpCsE8AUtnEWJRWlhsxsjodHFC0bqD1vmDPV0NgW5bpD79HlTDSSd9x59klm5OtSPE01b2fLC+7nd5X7/zMZrTpUFyFOr1XGDgvY3Dl4cuA6k6Sm/JoZ8dosvLc6aexDyaPTcfTcfqMhtf7zdnAC7HOZb0qEX2rKBgmy8aPSjyCbNihqvpOnPY6dMw82K+6+Y01wX5ww3UDuCPOqk7YveieAZ0Y7+PF7YHyMDKABKoThfWZP1otgpS56Djopn8wmtXOTQEoSBLW1v+LJ4w/qI/jPjvvl9kDj7Rz/kUvI5QKkWbC84qIhBYKxGLouYsDkzPIqRZ4Z0vTSTKyec7ZRgY5r1+jfFm9cBDmGTTKD69S/8yT5YOcxz5mKTbLu7nHtEOUSJrsvMjCoAbFwVWSOHwxdy3mAOQWMrsP6FAvAKMITelaBMJcarswXzq/OVuetSSLei2USYYZshiSWxRA5X8tDBBZoQTpSOyrm8QGz5pKsMcnraJk", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "BYAPR11MB3477.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 381169d8-46dd-499d-664e-08d82e075bfc", "X-MS-Exchange-CrossTenant-originalarrivaltime": "22 Jul 2020 06:20:41.3823 (UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "46c98d88-e344-4ed4-8496-4ed7712e255d", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "\n 7NoNVBsBqGLMmDzMKVBp+xcNrdvagWkCsqFilfYuPTfZiAVwiDwRBZP1kjiRU9knCbjlmqb+ECEJ2oJRLrE33CW9I/sTswVDaJhWj14LIlI=", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BYAPR11MB3400", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 116472, "web_url": "https://patches.dpdk.org/comment/116472/", "msgid": "<BYAPR11MB3477353AB01BE785DCD9F52D88790@BYAPR11MB3477.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/BYAPR11MB3477353AB01BE785DCD9F52D88790@BYAPR11MB3477.namprd11.prod.outlook.com", "date": "2020-07-22T06:39:49", "subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "submitter": { "id": 1418, "url": "https://patches.dpdk.org/api/people/1418/?format=api", "name": "Shougang Wang", "email": "shougangx.wang@intel.com" }, "content": "Hi, Jeff\n\n> -----Original Message-----\n> From: Guo, Jia <jia.guo@intel.com>\n> Sent: Wednesday, July 22, 2020 1:51 PM\n> To: Xie, WeiX <weix.xie@intel.com>; Wang, ShougangX\n> <shougangx.wang@intel.com>; dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; stable@dpdk.org\n> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table\n> \n> hi, shougang\n> \n> On 7/21/2020 2:41 PM, Xie, WeiX wrote:\n> > Tested-by: Zhang, XiX <xix.zhang@intel.com>\n> >\n> > Regards,\n> > Xie Wei\n> >\n> >\n> > -----Original Message-----\n> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shougang Wang\n> > Sent: Tuesday, July 21, 2020 1:49 PM\n> > To: dev@dpdk.org\n> > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia\n> > <jia.guo@intel.com>; Wang, ShougangX <shougangx.wang@intel.com>;\n> > stable@dpdk.org\n> > Subject: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up\n> > table\n> >\n> > The hash look up table(LUT) will not be initializing when starting testpmd\n> with --disable-rss. So that some invalid queue indexes may still in the LUT.\n> When enable RSS by creating RSS rule, some packets will not be into the valid\n> queues.\n> > This patch fixes this issue by initializing the LUT when creating an RSS rule.\n> >\n> > Fixes: feaae285b342 (\"net/i40e: support hash configuration in RSS\n> > flow\")\n> > Cc: stable@dpdk.org\n> >\n> > Signed-off-by: Shougang Wang <shougangx.wang@intel.com>\n> > ---\n> > drivers/net/i40e/i40e_ethdev.c | 134 ++++++++++++++++-----------------\n> > 1 file changed, 63 insertions(+), 71 deletions(-)\n> >\n> > diff --git a/drivers/net/i40e/i40e_ethdev.c\n> > b/drivers/net/i40e/i40e_ethdev.c index 393b5320f..e56543393 100644\n> > --- a/drivers/net/i40e/i40e_ethdev.c\n> > +++ b/drivers/net/i40e/i40e_ethdev.c\n> > @@ -13070,6 +13070,55 @@ i40e_rss_conf_init(struct\n> i40e_rte_flow_rss_conf *out,\n> > \treturn 0;\n> > }\n> >\n> > +/* If conf is NULL, function will init hash LUT with default\n> > +configration*/\n> \n> \n> Please fix the checkpatch issue here.\n> \n> \n> > static int i40e_rss_set_lut(struct i40e_pf *pf,\n> \n> \n> In order to eliminate any confuse with current i40e_set_rss_lut, please\n> change the name, such as \"i40e_rss_lut_init\" or other better naming.\n> \nQi also gave me some comments. I will define i40e_rss_lut_init() to initialize the LUT.\n\n> \n> > +\t\t struct i40e_rte_flow_rss_conf *conf) {\n> > +\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> > +\tuint32_t lut = 0;\n> > +\tuint16_t j, num;\n> > +\tuint32_t i;\n> > +\n> > +\t/* If both VMDQ and RSS enabled, not all of PF queues are\n> configured.\n> > +\t * It's necessary to calculate the actual PF queues that are configured.\n> > +\t */\n> > +\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> > +\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> > +\telse\n> > +\t\tnum = pf->dev_data->nb_rx_queues;\n> > +\n> > +\tif (conf == NULL)\n> > +\t\tnum = RTE_MIN(num, I40E_MAX_Q_PER_TC);\n> > +\telse\n> > +\t\tnum = RTE_MIN(num, conf->conf.queue_num);\n> > +\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are\n> configured\",\n> > +\t\t\tnum);\n> \n> \n> Alignment should match open parenthesis.\n> \n> \n> > +\n> > +\tif (num == 0) {\n> > +\t\tPMD_DRV_LOG(ERR,\n> > +\t\t\t\"No PF queues are configured to enable RSS for\n> port %u\",\n> > +\t\t\tpf->dev_data->port_id);\n> > +\t\treturn -ENOTSUP;\n> > +\t}\n> > +\n> > +\t/* Fill in redirection table */\n> > +\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> > +\t\tif (j == num)\n> > +\t\t\tj = 0;\n> > +\t\tif (conf == NULL)\n> > +\t\t\tlut = (lut << 8) | (j & ((0x1 <<\n> > +\t\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> > +\t\telse\n> > +\t\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> > +\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> > +\t\tif ((i & 3) == 3)\n> > +\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> > +\t}\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > /* Write HENA register to enable hash */ static int\n> i40e_rss_hash_set(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf\n> *rss_conf) @@ -13318,12 +13367,24 @@ static int\n> i40e_rss_enable_hash(struct i40e_pf *pf,\n> > \t\tstruct i40e_rte_flow_rss_conf *conf)\n> > {\n> > +\tenum rte_eth_rx_mq_mode mq_mode =\n> > +pf->dev_data->dev_conf.rxmode.mq_mode;\n> > \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> > \tstruct i40e_rte_flow_rss_conf rss_conf;\n> > +\tint ret;\n> \n> \n> Suggest set the 0 to ret and return ret at the end of this function, so\n> ret could be use in all part.\n> \n> \n> >\n> > \tif (!(conf->conf.types & pf->adapter->flow_types_mask))\n> > \t\treturn -ENOTSUP;\n> >\n> > +\t/* If the RSS is disabled before this, the LUT is uninitialized.\n> > +\t * So it is necessary to initialize it here.\n> > +\t */\n> > +\tif (!(mq_mode & ETH_MQ_RX_RSS_FLAG) && !pf-\n> >rss_info.conf.queue_num &&\n> > +\t !pf->adapter->rss_reta_updated) {\n> > +\t\tret = i40e_rss_set_lut(pf, NULL);\n> > +\t\tif (ret)\n> > +\t\t\treturn ret;\n> > +\t}\n> > +\n> > \tmemset(&rss_conf, 0, sizeof(rss_conf));\n> > \trte_memcpy(&rss_conf, conf, sizeof(rss_conf));\n> >\n> > @@ -13362,39 +13423,7 @@ static int\n> > i40e_rss_config_queue_region(struct i40e_pf *pf,\n> > \t\tstruct i40e_rte_flow_rss_conf *conf)\n> > {\n> > -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> > -\tuint32_t lut = 0;\n> > -\tuint16_t j, num;\n> > -\tuint32_t i;\n> > -\n> > -\t/* If both VMDQ and RSS enabled, not all of PF queues are\n> configured.\n> > -\t * It's necessary to calculate the actual PF queues that are configured.\n> > -\t */\n> > -\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> > -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> > -\telse\n> > -\t\tnum = pf->dev_data->nb_rx_queues;\n> > -\n> > -\tnum = RTE_MIN(num, conf->conf.queue_num);\n> > -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are\n> configured\",\n> > -\t\t\tnum);\n> > -\n> > -\tif (num == 0) {\n> > -\t\tPMD_DRV_LOG(ERR,\n> > -\t\t\t\"No PF queues are configured to enable RSS for\n> port %u\",\n> > -\t\t\tpf->dev_data->port_id);\n> > -\t\treturn -ENOTSUP;\n> > -\t}\n> > -\n> > -\t/* Fill in redirection table */\n> > -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> > -\t\tif (j == num)\n> > -\t\t\tj = 0;\n> > -\t\tlut = (lut << 8) | (conf->conf.queue[j] & ((0x1 <<\n> > -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> > -\t\tif ((i & 3) == 3)\n> > -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> > -\t}\n> > +\ti40e_rss_set_lut(pf, conf);\n> >\n> > \ti40e_rss_mark_invalid_rule(pf, conf);\n> >\n> > @@ -13491,46 +13520,9 @@ i40e_rss_disable_hash(struct i40e_pf *pf,\n> static int i40e_rss_clear_queue_region(struct i40e_pf *pf) {\n> > -\tstruct i40e_hw *hw = I40E_PF_TO_HW(pf);\n> > \tstruct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;\n> > -\tuint16_t queue[I40E_MAX_Q_PER_TC];\n> > -\tuint32_t num_rxq, i;\n> > -\tuint32_t lut = 0;\n> > -\tuint16_t j, num;\n> > -\n> > -\tnum_rxq = RTE_MIN(pf->dev_data->nb_rx_queues,\n> I40E_MAX_Q_PER_TC);\n> >\n> > -\tfor (j = 0; j < num_rxq; j++)\n> > -\t\tqueue[j] = j;\n> > -\n> > -\t/* If both VMDQ and RSS enabled, not all of PF queues are\n> configured.\n> > -\t * It's necessary to calculate the actual PF queues that are configured.\n> > -\t */\n> > -\tif (pf->dev_data->dev_conf.rxmode.mq_mode &\n> ETH_MQ_RX_VMDQ_FLAG)\n> > -\t\tnum = i40e_pf_calc_configured_queues_num(pf);\n> > -\telse\n> > -\t\tnum = pf->dev_data->nb_rx_queues;\n> > -\n> > -\tnum = RTE_MIN(num, num_rxq);\n> > -\tPMD_DRV_LOG(INFO, \"Max of contiguous %u PF queues are\n> configured\",\n> > -\t\t\tnum);\n> > -\n> > -\tif (num == 0) {\n> > -\t\tPMD_DRV_LOG(ERR,\n> > -\t\t\t\"No PF queues are configured to enable RSS for\n> port %u\",\n> > -\t\t\tpf->dev_data->port_id);\n> > -\t\treturn -ENOTSUP;\n> > -\t}\n> > -\n> > -\t/* Fill in redirection table */\n> > -\tfor (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {\n> > -\t\tif (j == num)\n> > -\t\t\tj = 0;\n> > -\t\tlut = (lut << 8) | (queue[j] & ((0x1 <<\n> > -\t\t\thw->func_caps.rss_table_entry_width) - 1));\n> > -\t\tif ((i & 3) == 3)\n> > -\t\t\tI40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);\n> > -\t}\n> > +\ti40e_rss_set_lut(pf, NULL);\n> \n> \n> Need to check return value.\n> \n> \n> >\n> > \trss_info->conf.queue_num = 0;\n> > \tmemset(&rss_info->conf.queue, 0, sizeof(uint16_t));\n> > --\n> > 2.17.1\n> >", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 145C7A0526;\n\tWed, 22 Jul 2020 08:39:57 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AA2B81BFD1;\n\tWed, 22 Jul 2020 08:39:55 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id A595711A2;\n Wed, 22 Jul 2020 08:39:53 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 23:39:52 -0700", "from orsmsx109.amr.corp.intel.com ([10.22.240.7])\n by orsmga002.jf.intel.com with ESMTP; 21 Jul 2020 23:39:52 -0700", "from ORSEDG001.ED.cps.intel.com (10.7.248.4) by\n ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Tue, 21 Jul 2020 23:39:52 -0700", "from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.57) by\n edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server\n (TLS) id 14.3.439.0; Tue, 21 Jul 2020 23:39:52 -0700", "from BYAPR11MB3477.namprd11.prod.outlook.com (2603:10b6:a03:7c::28)\n by BYAPR11MB3607.namprd11.prod.outlook.com (2603:10b6:a03:b2::31)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.23; Wed, 22 Jul\n 2020 06:39:49 +0000", "from BYAPR11MB3477.namprd11.prod.outlook.com\n ([fe80::11b9:abd9:39e0:f26a]) by BYAPR11MB3477.namprd11.prod.outlook.com\n ([fe80::11b9:abd9:39e0:f26a%3]) with mapi id 15.20.3195.025; Wed, 22 Jul 2020\n 06:39:49 +0000" ], "IronPort-SDR": [ "\n sLA0ePa1TPzbocv5pX4yOmc8Jy/hEJuedctZjreWV55UgO7xuBdOc6ki7fPdp5CYBI4MCaUb6G\n jhXRmTub2vUw==", "\n EEp7HrNs0/pE5wtR9kPDzmT8Vlxu8dqt57p2mZF47vQYgrEmIBqBQV359atx9Rc2m1lqEgX5nS\n 9lQ1soUT/htQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9689\"; a=\"168423613\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"168423613\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"301857561\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=fF/Dtl913LjjK1uhMsqtIWl7LoSeUHROpIqC8PPkWv//W+lRu6N3WhBxeAZy0WPn2AjDTQswrpU/tyYqErLEzGjjROMc2wGByyPCO0sLF3SYGytTLfelUiuoIkT+wumamy2o34MiVLoiy81GEhMKzuALhURAKdsig67gduqB494piLuD+VA6V8huBymmGrF75aVEX/9W+17G/BcabIjuON5A0ea76ODxHQFdiFHCIdpm/4p17hU7ATdvGwj4XuybKyzzMokfazJ996czqwxJFwu6CiO5SafWcHQK2ifad+kD72wsQnWrD6gukMn6es2XeXPnYJVXNgsFVd9W5POLjg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tnj3eER8GwTUvaHgdrEf/heK6+ukUzJqqFzG7pnI8m0=;\n b=CgCMS1lP/nYwVeJlF0P4XoqWcCX3r1Fnz9I7+MfKuTanSXsM1wi8ZFKnZ5/vzU3YGBUIo8EOmTQjSmOxSqlfTL+S2lC33XO+rOaz/1HqTdwwyupgCS+BT0bHQkqlncIGKM1uii6cGzd4URSqiJRU6BLZVX9WJSKrIBvQu+ZxOeWZH3omumvMSM+21zMwTMaFv/6ZbWFzhxC8JAA88o5Zj2TvjzmwBKLsDfcu1Jafmi1qurBPcp9FwRWKB8n04T98q2rJLXaN/Wll8mQOb0Nrp6ruxImA04b3amJZcI0t5O148svUNgG5i7DVeGkVgqcUT3zV1zxAlT8roOn7fpxNDQ==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tnj3eER8GwTUvaHgdrEf/heK6+ukUzJqqFzG7pnI8m0=;\n b=NPpJJHPwa7h1fZRIJTVKLL3D20kHUe6p4Y0TlhEdK0WiamxRVwJq7UWtJzKKLdIsv6rnoSX38FGB6XJ+4CRkM1joUXJlFDgYM9sr2u815KDDktZB8hyD+ykFZy/hC8gVA9prQSuuCEGGUOfuRSaDEmuSHqC31UiGF/rMqB3H0AE=", "From": "\"Wang, ShougangX\" <shougangx.wang@intel.com>", "To": "\"Guo, Jia\" <jia.guo@intel.com>, \"Xie, WeiX\" <weix.xie@intel.com>,\n \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"stable@dpdk.org\"\n <stable@dpdk.org>, \"Di, ChenxuX\" <chenxux.di@intel.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "Thread-Index": "AQHWXySgbaCuNyO260KHkTx8V6T7nKkRlbeAgAGEFgCAAAjYwA==", "Date": "Wed, 22 Jul 2020 06:39:49 +0000", "Message-ID": "\n <BYAPR11MB3477353AB01BE785DCD9F52D88790@BYAPR11MB3477.namprd11.prod.outlook.com>", "References": "<20200715063515.9262-1-shougangx.wang@intel.com>\n <20200721054920.29749-1-shougangx.wang@intel.com>\n <6FD6A7610D20924F885A4ECF34E8AC910463D264@CDSMSX102.ccr.corp.intel.com>\n <334f916e-1aad-264f-e073-6e737e78c767@intel.com>", "In-Reply-To": "<334f916e-1aad-264f-e073-6e737e78c767@intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.102.204.36]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "7cb11710-63ea-4712-2175-08d82e0a0857", "x-ms-traffictypediagnostic": "BYAPR11MB3607:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <BYAPR11MB360743016355DC68C96BCEAC88790@BYAPR11MB3607.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:10000;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n YQ83pdherNMrzohZgMKOmjUEa+2Sr39ptnKGf4MuY+p57pXHCcY5dI4Gb5HBluuYWVF+mYy41b50Ny/dSldj0eKdnxetv0T+z261Z+GDUcACdkEcE0pVB+AYL+Uu0Pe3o+yMOQwTEcax5A6/zl6TNkcM9L+OXMoPULhz0SarHcTW1D3seSEpYOx925fNx1j0yvgLeduyBmyZgOtjwLVAh5dPTtQSgdnOHdnGp/2iTKqdL9E+Gn7nnV+strnpUb1wvKpEh1+97Q147ruWtuBA1oxV/ZyxrIXD3UoZymOTM0gN8FnlHAizBJ9va+0VI5QK", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:BYAPR11MB3477.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(66446008)(64756008)(66476007)(54906003)(478600001)(66946007)(316002)(110136005)(450100002)(8936002)(107886003)(71200400001)(76116006)(2906002)(83380400001)(55016002)(66556008)(9686003)(7696005)(33656002)(8676002)(6506007)(86362001)(5660300002)(4326008)(52536014)(186003)(53546011)(26005);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n 3g/VbVwP+pJVFMw7gGkT7xm5wZx2QRB30LNbPkFrQqv2opOOTJfJzTj7ogVueelf7ua7IO5mOhNm8VG2fHVN5EUZKh1x1bYgWDhT9nSL5cn24wSBJnfnI2FMn61mjNK4c+Vr+GJBch3nUhRduloTP/yZ9F1sJY0zv+o9nIFZ4Gi+s/ZJ4JRLKrrxsNvzjvH8xm5REvb+8d2fWifkFFmIZjmHHDvC0NpE8rKEalw3RmRIzKQUXRI8W+6s14p15cJTS+oi9qXtDKZKGRsvCubsjmHNReogRBLoX8+/4J8zzPM6l+tMDdgvMfkjmRsZArSIZ6QPktQcvvvB3yiMXR8UuymXfIxI5Br6rAp8lUENynVFKkpPt+fRfLS8ad8ioB0xCBzU8p4sNS4XD4b/rg7kNIDYoP1k8E+DsQGhE6hCquFGPiJiR3i7YBUc+j6wBe+6nSEgIetMwTXykop/G2bwvk7VA2cQ/yQj8pL65H6OWYloF2hVFpd2oGbruyJYMllm", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "BYAPR11MB3477.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 7cb11710-63ea-4712-2175-08d82e0a0857", "X-MS-Exchange-CrossTenant-originalarrivaltime": "22 Jul 2020 06:39:49.5614 (UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "46c98d88-e344-4ed4-8496-4ed7712e255d", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "\n f0i14L4SY077bT1NVHsxLL5BH1g+ZnHvjc/I1bWOuPZfU95oikBzRAzX2TX1c2BjRn5CYJmIOmSIt3zrymi34rfRztXNxA9Sm4dazyDmOzU=", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BYAPR11MB3607", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH v2] net/i40e: fix incorrect hash look up table", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null } ]