Skip to contentSkip to conversation

i40e: fix base driver allocation when on numa != 0

PATCH Applied David Marchand 3 participants 3 messages Sep 3, 2015 – Sep 9, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: fix base driver allocation when on numa != 0

Seen by code review.

If dpdk is run with memory only available on socket 0, then i40e pmd refuses to initialize ports as this pmd requires some memory on socket 0. Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on the caller socket.

---
 drivers/net/i40e/i40e_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/i40e/i40e_ethdev.c +4 -3
index 40b0526..2dd9fdc 100644
@@ -2099,10 +2099,11 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
 	id++;
 	snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, id);
 #ifdef RTE_LIBRTE_XEN_DOM0
-	mz = rte_memzone_reserve_bounded(z_name, size, 0, 0, alignment,
-							RTE_PGSIZE_2M);
+	mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0,
+					 alignment, RTE_PGSIZE_2M);
 #else
-	mz = rte_memzone_reserve_aligned(z_name, size, 0, 0, alignment);
+	mz = rte_memzone_reserve_aligned(z_name, size, SOCKET_ID_ANY, 0,
+					 alignment);
 #endif
 	if (!mz)
 		return I40E_ERR_NO_MEMORY;
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: David Marchand [mailto:[email protected]]
Sent: Thursday, September 3, 2015 9:24 PM
To: [email protected]
Cc: Zhang, Helin
Subject: [PATCH] i40e: fix base driver allocation when on numa != 0

Quoted 8 lines

Seen by code review.

If dpdk is run with memory only available on socket 0, then i40e pmd refuses to initialize ports as this pmd requires some memory on socket 0.
Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on the caller socket.