From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4280C1B48B for ; Fri, 23 Nov 2018 02:54:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Nov 2018 17:54:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,267,1539673200"; d="scan'208";a="106953387" Received: from dpdk-xiaoyunl.sh.intel.com ([10.67.111.140]) by fmsmga002.fm.intel.com with ESMTP; 22 Nov 2018 17:54:28 -0800 From: Xiaoyun Li To: qi.z.zhang@intel.com Cc: dev@dpdk.org, Xiaoyun Li Date: Fri, 23 Nov 2018 09:35:54 +0800 Message-Id: <1542936954-39421-1-git-send-email-xiaoyun.li@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/i40e: adjust the RSS table 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: , X-List-Received-Date: Fri, 23 Nov 2018 01:54:30 -0000 When starting the device, the RSS table is set. For 8 queues, the RSS hash table would be like | 3,2,1,0,7,6,5,4 | 3,2,1,0,7,6,5,4 |... This patch adjusts this table to set entries sequentially. Then for 8 queues, the RSS table would be like | 0,1,2,3,4,5,6,7 | 0,1,2,3,4,5,6,7 |... Signed-off-by: Xiaoyun Li --- drivers/net/i40e/i40e_ethdev.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 790ecc3..031eba0 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -8468,6 +8468,7 @@ i40e_pf_config_rss(struct i40e_pf *pf) { struct i40e_hw *hw = I40E_PF_TO_HW(pf); struct rte_eth_rss_conf rss_conf; + uint32_t size = hw->func_caps.rss_table_size; uint32_t i, lut = 0; uint16_t j, num; @@ -8489,13 +8490,17 @@ i40e_pf_config_rss(struct i40e_pf *pf) return -ENOTSUP; } - for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) { - if (j == num) - j = 0; + for (i = size - 1, j = (size - 1) % num;; i--, j--) { lut = (lut << 8) | (j & ((0x1 << - hw->func_caps.rss_table_entry_width) - 1)); - if ((i & 3) == 3) + hw->func_caps.rss_table_entry_width) - 1)); + + if (j == 0) + j = num; + + if ((i & 3) == 0) I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut); + if (i == 0) + break; } rss_conf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf; -- 2.7.4