[dpdk-stable] patch 'net/i40e: fix memory allocation for hash table' has been queued to stable release 17.02.1

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu May 25 11:47:44 CEST 2017


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 <beilei.xing at intel.com>
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 <nardi.ivan at gmail.com>
Signed-off-by: Beilei Xing <beilei.xing at intel.com>
---
 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



More information about the stable mailing list