DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix fail to start testpmd
@ 2017-02-15  2:01 Beilei Xing
  2017-02-15  2:42 ` [dpdk-dev] [PATCH v2] net/i40e: fix allocating hash table on random socket Beilei Xing
  0 siblings, 1 reply; 7+ messages in thread
From: Beilei Xing @ 2017-02-15  2:01 UTC (permalink / raw)
  To: jingjing.wu; +Cc: jianfeng.tan, dev

Testpmd failed to start in another hugetlbfs mount point.
Fix the issue by assigning scocket id during hash parameter
defination.

Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 078259773da9 ("net/i40e: store ethertype filter")

Signed-off-by: Beilei Xing <beilei.xing@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 303027b..be2e580 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 */
-- 
2.5.5

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

* [dpdk-dev] [PATCH v2] net/i40e: fix allocating hash table on random socket
  2017-02-15  2:01 [dpdk-dev] [PATCH] net/i40e: fix fail to start testpmd Beilei Xing
@ 2017-02-15  2:42 ` Beilei Xing
  2017-02-17  8:37   ` [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 Beilei Xing
  0 siblings, 1 reply; 7+ messages in thread
From: Beilei Xing @ 2017-02-15  2:42 UTC (permalink / raw)
  To: jingjing.wu; +Cc: jianfeng.tan, dev

Testpmd failed to start in another hugetlbfs mount point on
i40e, the root cause is that hash table is allocated on a
random socket. Fix the issue by assigning scocket id during
hash parameter defination.

Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 078259773da9 ("net/i40e: store ethertype filter")

Signed-off-by: Beilei Xing <beilei.xing@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 303027b..be2e580 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 */
-- 
2.5.5

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

* [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
  2017-02-15  2:42 ` [dpdk-dev] [PATCH v2] net/i40e: fix allocating hash table on random socket Beilei Xing
@ 2017-02-17  8:37   ` Beilei Xing
  2017-02-20 14:45     ` Ferruh Yigit
  2017-02-20 16:37     ` Ferruh Yigit
  0 siblings, 2 replies; 7+ messages in thread
From: Beilei Xing @ 2017-02-17  8:37 UTC (permalink / raw)
  To: jingjing.wu; +Cc: jianfeng.tan, dev

Testpmd failed to start in another hugetlbfs mount point on
i40e, the root cause is that hash table is always allocated
on socket 0. Fix the issue by assigning scocket id during
hash parameter defination.

Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 078259773da9 ("net/i40e: store ethertype filter")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
v3 changes:
 Update commit log.
v2 changes:
 Update commit log.

 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 303027b..be2e580 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 */
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
  2017-02-17  8:37   ` [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 Beilei Xing
@ 2017-02-20 14:45     ` Ferruh Yigit
  2017-02-20 15:38       ` Ivan Nardi
  2017-02-20 16:37     ` Ferruh Yigit
  1 sibling, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2017-02-20 14:45 UTC (permalink / raw)
  To: Beilei Xing, jingjing.wu; +Cc: jianfeng.tan, dev

On 2/17/2017 8:37 AM, Beilei Xing wrote:
> Testpmd failed to start in another hugetlbfs mount point on
> i40e, 

Hi Beilei,

Can you please describe the failure more. And how to reproduce it.

I prefer initial patch title: "net/i40e: fix fail to start testpmd" but
with more details about when it fails to start.

the root cause is that hash table is always allocated
> on socket 0. Fix the issue by assigning scocket id during
> hash parameter defination.
> 
> Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
> Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
> Fixes: 078259773da9 ("net/i40e: store ethertype filter")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
<...>

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
  2017-02-20 14:45     ` Ferruh Yigit
@ 2017-02-20 15:38       ` Ivan Nardi
  2017-02-20 16:16         ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Nardi @ 2017-02-20 15:38 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Beilei Xing, Wu, Jingjing, jianfeng.tan, dev

Hi
I reported the same issue 2 weeks ago
http://dpdk.org/ml/archives/dev/2017-February/056930.html

You can reproduce it forcing testpmd to allocate memory only from node 1,
for example:

/tmp/testpmd -d /home/micro/lib/librte_pmd_i40e.so -c 0xFFFC000 -w
0000:81:00.0  -w 0000:81:00.1 -n 4 --socket-mem=0,8192 -- -i
--socket-num=1

Ivan


On 20 February 2017 at 15:45, Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 2/17/2017 8:37 AM, Beilei Xing wrote:
> > Testpmd failed to start in another hugetlbfs mount point on
> > i40e,
>
> Hi Beilei,
>
> Can you please describe the failure more. And how to reproduce it.
>
> I prefer initial patch title: "net/i40e: fix fail to start testpmd" but
> with more details about when it fails to start.
>
> the root cause is that hash table is always allocated
> > on socket 0. Fix the issue by assigning scocket id during
> > hash parameter defination.
> >
> > Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
> > Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
> > Fixes: 078259773da9 ("net/i40e: store ethertype filter")
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> <...>
>

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
  2017-02-20 15:38       ` Ivan Nardi
@ 2017-02-20 16:16         ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2017-02-20 16:16 UTC (permalink / raw)
  To: Ivan Nardi; +Cc: Beilei Xing, Wu, Jingjing, jianfeng.tan, dev

On 2/20/2017 3:38 PM, Ivan Nardi wrote:
> Hi
> I reported the same issue 2 weeks ago
> http://dpdk.org/ml/archives/dev/2017-February/056930.html
> 
> You can reproduce it forcing testpmd to allocate memory only from node
> 1, for example:
> 
> /tmp/testpmd -d /home/micro/lib/librte_pmd_i40e.so -c 0xFFFC000 -w 0000:81:00.0  -w 0000:81:00.1 -n 4 --socket-mem=0,8192 -- -i --socket-num=1

Thanks Ivan,

I will update commit log with the information provided.

> 
> Ivan
> 
> 
> On 20 February 2017 at 15:45, Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 2/17/2017 8:37 AM, Beilei Xing wrote:
>     > Testpmd failed to start in another hugetlbfs mount point on
>     > i40e,
> 
>     Hi Beilei,
> 
>     Can you please describe the failure more. And how to reproduce it.
> 
>     I prefer initial patch title: "net/i40e: fix fail to start testpmd" but
>     with more details about when it fails to start.
> 
>     the root cause is that hash table is always allocated
>     > on socket 0. Fix the issue by assigning scocket id during
>     > hash parameter defination.
>     >
>     > Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
>     > Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
>     > Fixes: 078259773da9 ("net/i40e: store ethertype filter")
>     >
>     > Signed-off-by: Beilei Xing <beilei.xing@intel.com <mailto:beilei.xing@intel.com>>
>     <...>
> 
> 

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
  2017-02-17  8:37   ` [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 Beilei Xing
  2017-02-20 14:45     ` Ferruh Yigit
@ 2017-02-20 16:37     ` Ferruh Yigit
  1 sibling, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2017-02-20 16:37 UTC (permalink / raw)
  To: Beilei Xing, jingjing.wu; +Cc: jianfeng.tan, dev, dpdk stable

On 2/17/2017 8:37 AM, Beilei Xing wrote:
> Testpmd failed to start in another hugetlbfs mount point on
> i40e, the root cause is that hash table is always allocated
> on socket 0. Fix the issue by assigning scocket id during
> hash parameter defination.
> 
> Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
> Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
> Fixes: 078259773da9 ("net/i40e: store ethertype filter")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

    net/i40e: fix memory allocation for hash table

    ...
    Cc: stable@dpdk.org

    Reported-by: Ivan Nardi <nardi.ivan@gmail.com>
    Signed-off-by: Beilei Xing <beilei.xing@intel.com>


Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2017-02-20 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15  2:01 [dpdk-dev] [PATCH] net/i40e: fix fail to start testpmd Beilei Xing
2017-02-15  2:42 ` [dpdk-dev] [PATCH v2] net/i40e: fix allocating hash table on random socket Beilei Xing
2017-02-17  8:37   ` [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 Beilei Xing
2017-02-20 14:45     ` Ferruh Yigit
2017-02-20 15:38       ` Ivan Nardi
2017-02-20 16:16         ` Ferruh Yigit
2017-02-20 16:37     ` Ferruh Yigit

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