dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve
@ 2015-01-22 15:05 Cian Ferriter
       [not found] ` <1421939108-28666-1-git-send-email-cian.ferriter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Cian Ferriter @ 2015-01-22 15:05 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Removes the dependency that this memzone reserve has on the
socket currently running on. Following the socket of the master
core will yield more predictable results when calling this
function after initialisation.

Signed-off-by: Cian Ferriter <cian.ferriter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Maryam Tahhan <maryam.tahhan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Reviewed-by: Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_ether/rte_ethdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 mode change 100644 => 100755 lib/librte_ether/rte_ethdev.c

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
old mode 100644
new mode 100755
index ea3a1fb..088bffc
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -184,7 +184,7 @@ rte_eth_dev_data_alloc(void)
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY){
 		mz = rte_memzone_reserve(MZ_RTE_ETH_DEV_DATA,
 				RTE_MAX_ETHPORTS * sizeof(*rte_eth_dev_data),
-				rte_socket_id(), flags);
+				rte_lcore_to_socket_id(rte_get_master_lcore()), flags);
 	} else
 		mz = rte_memzone_lookup(MZ_RTE_ETH_DEV_DATA);
 	if (mz == NULL)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve
@ 2015-01-13  9:22 Cian Ferriter
       [not found] ` <1421140920-9964-1-git-send-email-cian.ferriter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Cian Ferriter @ 2015-01-13  9:22 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Change the socket id that is passed to rte_memzone_reserve from
the socket id of current logical core to the socket id of the
master_lcore.
---
 lib/librte_ether/rte_ethdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 mode change 100644 => 100755 lib/librte_ether/rte_ethdev.c

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
old mode 100644
new mode 100755
index 95f2ceb..835540d
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -184,7 +184,7 @@ rte_eth_dev_data_alloc(void)
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY){
 		mz = rte_memzone_reserve(MZ_RTE_ETH_DEV_DATA,
 				RTE_MAX_ETHPORTS * sizeof(*rte_eth_dev_data),
-				rte_socket_id(), flags);
+				rte_lcore_to_socket_id(rte_get_master_lcore()), flags);
 	} else
 		mz = rte_memzone_lookup(MZ_RTE_ETH_DEV_DATA);
 	if (mz == NULL)
-- 
1.7.4.1

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

end of thread, other threads:[~2015-01-27  9:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 15:05 [PATCH] lib/librte_ether: change socket_id passed to rte_memzone_reserve Cian Ferriter
     [not found] ` <1421939108-28666-1-git-send-email-cian.ferriter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-01-27  9:29   ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2015-01-13  9:22 Cian Ferriter
     [not found] ` <1421140920-9964-1-git-send-email-cian.ferriter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-01-13  9:23   ` Ferriter, Cian
     [not found]     ` <D9B9B7EDAA4D17468E64B453458633E4044E9D21-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-13 13:55       ` Bruce Richardson
2015-01-13 18:05         ` Ferriter, Cian
     [not found]           ` <D9B9B7EDAA4D17468E64B453458633E4044EA5E5-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-14 10:09             ` Bruce Richardson
2015-01-19 18:38               ` Ferriter, Cian
     [not found]                 ` <D9B9B7EDAA4D17468E64B453458633E4044F605A-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-22  9:56                   ` Ferriter, Cian
     [not found]                     ` <D9B9B7EDAA4D17468E64B453458633E4044F6C8E-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-22 11:26                       ` Bruce Richardson
2015-01-13 23:24   ` Stephen Hemminger
2015-01-14 10:13     ` Bruce Richardson

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).