DPDK patches and discussions
 help / color / mirror / Atom feed
From: Beilei Xing <beilei.xing@intel.com>
To: jingjing.wu@intel.com
Cc: jianfeng.tan@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0
Date: Fri, 17 Feb 2017 16:37:56 +0800	[thread overview]
Message-ID: <1487320676-54579-1-git-send-email-beilei.xing@intel.com> (raw)
In-Reply-To: <1487126547-29902-1-git-send-email-beilei.xing@intel.com>

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

  reply	other threads:[~2017-02-17  8:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Beilei Xing [this message]
2017-02-20 14:45     ` [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 Ferruh Yigit
2017-02-20 15:38       ` Ivan Nardi
2017-02-20 16:16         ` Ferruh Yigit
2017-02-20 16:37     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487320676-54579-1-git-send-email-beilei.xing@intel.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=jingjing.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).