DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] enic: fix allocation when not using first numa node
@ 2015-09-11  8:02 David Marchand
  2015-09-11  8:02 ` [dpdk-dev] [PATCH 2/2] enic: fix hash creation " David Marchand
  2015-09-11  8:28 ` [dpdk-dev] [PATCH 1/2] enic: fix allocation " Sujith Sankar (ssujith)
  0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2015-09-11  8:02 UTC (permalink / raw)
  To: dev

Seen by code review.

If dpdk is run with memory only available on socket != 0, then enic 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/enic/enic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 3b8719f..46a90bd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -539,7 +539,7 @@ enic_alloc_consistent(__rte_unused void *priv, size_t size,
 	*dma_handle = 0;
 
 	rz = rte_memzone_reserve_aligned((const char *)name,
-		size, 0, 0, ENIC_ALIGN);
+					 size, SOCKET_ID_ANY, 0, ENIC_ALIGN);
 	if (!rz) {
 		pr_err("%s : Failed to allocate memory requested for %s",
 			__func__, name);
-- 
1.9.1

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

* [dpdk-dev] [PATCH 2/2] enic: fix hash creation when not using first numa node
  2015-09-11  8:02 [dpdk-dev] [PATCH 1/2] enic: fix allocation when not using first numa node David Marchand
@ 2015-09-11  8:02 ` David Marchand
  2015-09-11  8:29   ` Sujith Sankar (ssujith)
  2015-09-11  8:28 ` [dpdk-dev] [PATCH 1/2] enic: fix allocation " Sujith Sankar (ssujith)
  1 sibling, 1 reply; 5+ messages in thread
From: David Marchand @ 2015-09-11  8:02 UTC (permalink / raw)
  To: dev

If dpdk is run with memory only available on socket != 0, then hash
creation will fail and flow director feature won't be available.
Fix this by asking for allocation on caller socket.

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 drivers/net/enic/enic_clsf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index 656b25b..e7416ce 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -61,7 +61,6 @@
 #define DEFAULT_HASH_FUNC       rte_jhash
 #endif
 
-#define SOCKET_0                0
 #define ENICPMD_CLSF_HASH_ENTRIES       ENICPMD_FDIR_MAX
 
 void enic_fdir_stats_get(struct enic *enic, struct rte_eth_fdir_stats *stats)
@@ -247,7 +246,7 @@ int enic_clsf_init(struct enic *enic)
 		.key_len = sizeof(struct rte_eth_fdir_filter),
 		.hash_func = DEFAULT_HASH_FUNC,
 		.hash_func_init_val = 0,
-		.socket_id = SOCKET_0,
+		.socket_id = SOCKET_ID_ANY,
 	};
 
 	enic->fdir.hash = rte_hash_create(&hash_params);
-- 
1.9.1

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

* Re: [dpdk-dev] [PATCH 1/2] enic: fix allocation when not using first numa node
  2015-09-11  8:02 [dpdk-dev] [PATCH 1/2] enic: fix allocation when not using first numa node David Marchand
  2015-09-11  8:02 ` [dpdk-dev] [PATCH 2/2] enic: fix hash creation " David Marchand
@ 2015-09-11  8:28 ` Sujith Sankar (ssujith)
  1 sibling, 0 replies; 5+ messages in thread
From: Sujith Sankar (ssujith) @ 2015-09-11  8:28 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: John Daley (johndale)



On 11/09/15 1:32 pm, "David Marchand" <david.marchand@6wind.com> wrote:

>Seen by code review.
>
>If dpdk is run with memory only available on socket != 0, then enic 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/enic/enic_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
>index 3b8719f..46a90bd 100644
>--- a/drivers/net/enic/enic_main.c
>+++ b/drivers/net/enic/enic_main.c
>@@ -539,7 +539,7 @@ enic_alloc_consistent(__rte_unused void *priv, size_t
>size,
> 	*dma_handle = 0;
> 
> 	rz = rte_memzone_reserve_aligned((const char *)name,
>-		size, 0, 0, ENIC_ALIGN);
>+					 size, SOCKET_ID_ANY, 0, ENIC_ALIGN);
> 	if (!rz) {
> 		pr_err("%s : Failed to allocate memory requested for %s",
> 			__func__, name);
>--

Acked by: Sujith Sankar <ssujith@cisco.com>

> 
>1.9.1
>

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

* Re: [dpdk-dev] [PATCH 2/2] enic: fix hash creation when not using first numa node
  2015-09-11  8:02 ` [dpdk-dev] [PATCH 2/2] enic: fix hash creation " David Marchand
@ 2015-09-11  8:29   ` Sujith Sankar (ssujith)
  2015-10-20 19:34     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Sujith Sankar (ssujith) @ 2015-09-11  8:29 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: John Daley (johndale)


On 11/09/15 1:32 pm, "David Marchand" <david.marchand@6wind.com> wrote:

>If dpdk is run with memory only available on socket != 0, then hash
>creation will fail and flow director feature won't be available.
>Fix this by asking for allocation on caller socket.
>
>Signed-off-by: David Marchand <david.marchand@6wind.com>
>---
> drivers/net/enic/enic_clsf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
>index 656b25b..e7416ce 100644
>--- a/drivers/net/enic/enic_clsf.c
>+++ b/drivers/net/enic/enic_clsf.c
>@@ -61,7 +61,6 @@
> #define DEFAULT_HASH_FUNC       rte_jhash
> #endif
> 
>-#define SOCKET_0                0
> #define ENICPMD_CLSF_HASH_ENTRIES       ENICPMD_FDIR_MAX
> 
> void enic_fdir_stats_get(struct enic *enic, struct rte_eth_fdir_stats
>*stats)
>@@ -247,7 +246,7 @@ int enic_clsf_init(struct enic *enic)
> 		.key_len = sizeof(struct rte_eth_fdir_filter),
> 		.hash_func = DEFAULT_HASH_FUNC,
> 		.hash_func_init_val = 0,
>-		.socket_id = SOCKET_0,
>+		.socket_id = SOCKET_ID_ANY,
> 	};
> 
> 	enic->fdir.hash = rte_hash_create(&hash_params);
>--

Acked by: Sujith Sankar <ssujith@cisco.com>


> 
>1.9.1
>

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

* Re: [dpdk-dev] [PATCH 2/2] enic: fix hash creation when not using first numa node
  2015-09-11  8:29   ` Sujith Sankar (ssujith)
@ 2015-10-20 19:34     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2015-10-20 19:34 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, John Daley (johndale)

> >If dpdk is run with memory only available on socket != 0, then hash
> >creation will fail and flow director feature won't be available.
> >Fix this by asking for allocation on caller socket.
> >
> >Signed-off-by: David Marchand <david.marchand@6wind.com>
> 
> Acked by: Sujith Sankar <ssujith@cisco.com>

Series applied, thanks.

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

end of thread, other threads:[~2015-10-20 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11  8:02 [dpdk-dev] [PATCH 1/2] enic: fix allocation when not using first numa node David Marchand
2015-09-11  8:02 ` [dpdk-dev] [PATCH 2/2] enic: fix hash creation " David Marchand
2015-09-11  8:29   ` Sujith Sankar (ssujith)
2015-10-20 19:34     ` Thomas Monjalon
2015-09-11  8:28 ` [dpdk-dev] [PATCH 1/2] enic: fix allocation " Sujith Sankar (ssujith)

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