From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B11299173 for ; Thu, 25 May 2017 11:50:19 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2017 02:50:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,390,1491289200"; d="scan'208";a="91624063" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 25 May 2017 02:50:18 -0700 From: Yuanhan Liu To: Beilei Xing Cc: Yuanhan Liu , Ivan Nardi , dpdk stable Date: Thu, 25 May 2017 17:47:44 +0800 Message-Id: <1495705809-21416-12-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1495705809-21416-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/i40e: fix memory allocation for hash table' has been queued to stable release 17.02.1 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: , X-List-Received-Date: Thu, 25 May 2017 09:50:20 -0000 Hi, FYI, your patch has been queued to stable release 17.02.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/28/17. So please shout if anyone has objections. Thanks. --yliu --- >>From e84541fbf4e260546b800e4081ab6c1e38151bb3 Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Fri, 17 Feb 2017 16:37:56 +0800 Subject: [PATCH] net/i40e: fix memory allocation for hash table [ upstream commit d27a8fd01f596932f081e2b75383afe9d35543b7 ] Testpmd failed to start in another hugetlbfs mount point on i40e, the root cause is that hash table is always allocated on socket 0. Issue can be reproduced by forcing testpmd to allocate memory only from node 1: testpmd --socket-mem=0,8192 -- -i --socket-num=1 EAL: PCI device 0000:81:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 net_i40e PMD: eth_i40e_dev_init(): FW 4.40 API 1.4 NVM 04.05.03 eetrack 80001cd8 RING: Cannot reserve memory HASH: memory allocation failed PMD: i40e_init_ethtype_filter_list(): Failed to create ethertype hash table! EAL: Error - exiting with code: 1 Cause: Requested device 0000:81:00.0 cannot be used Fix the issue by assigning socket id during hash parameter definition. Fixes: 5c53c82c8174 ("net/i40e: store flow director filter") Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter") Fixes: 078259773da9 ("net/i40e: store ethertype filter") Reported-by: Ivan Nardi Signed-off-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index d4b2a76..508fcc8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -899,6 +899,8 @@ i40e_init_ethtype_filter_list(struct rte_eth_dev *dev) .entries = I40E_MAX_ETHERTYPE_FILTER_NUM, .key_len = sizeof(struct i40e_ethertype_filter_input), .hash_func = rte_hash_crc, + .hash_func_init_val = 0, + .socket_id = rte_socket_id(), }; /* Initialize ethertype filter rule list and hash */ @@ -942,6 +944,8 @@ i40e_init_tunnel_filter_list(struct rte_eth_dev *dev) .entries = I40E_MAX_TUNNEL_FILTER_NUM, .key_len = sizeof(struct i40e_tunnel_filter_input), .hash_func = rte_hash_crc, + .hash_func_init_val = 0, + .socket_id = rte_socket_id(), }; /* Initialize tunnel filter rule list and hash */ @@ -985,6 +989,8 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev) .entries = I40E_MAX_FDIR_FILTER_NUM, .key_len = sizeof(struct rte_eth_fdir_input), .hash_func = rte_hash_crc, + .hash_func_init_val = 0, + .socket_id = rte_socket_id(), }; /* Initialize flow director filter rule list and hash */ -- 1.9.0