DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0
@ 2015-09-03 13:23 David Marchand
  2015-09-06  1:33 ` Zhang, Helin
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2015-09-03 13:23 UTC (permalink / raw)
  To: dev

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.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 drivers/net/i40e/i40e_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 40b0526..2dd9fdc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0
  2015-09-03 13:23 [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0 David Marchand
@ 2015-09-06  1:33 ` Zhang, Helin
  2015-09-09 13:22   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Helin @ 2015-09-06  1:33 UTC (permalink / raw)
  To: David Marchand, dev



> -----Original Message-----
> From: David Marchand [mailto:david.marchand@6wind.com]
> Sent: Thursday, September 3, 2015 9:24 PM
> To: dev@dpdk.org
> Cc: Zhang, Helin
> Subject: [PATCH] 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.
> 
> Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0
  2015-09-06  1:33 ` Zhang, Helin
@ 2015-09-09 13:22   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-09-09 13:22 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

> > 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.
> > 
> > Signed-off-by: David Marchand <david.marchand@6wind.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-09 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 13:23 [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0 David Marchand
2015-09-06  1:33 ` Zhang, Helin
2015-09-09 13:22   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).