From patchwork Fri Feb 17 08:37:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 20504 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id AB8BD2A5D; Fri, 17 Feb 2017 09:40:07 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4A0283B5 for ; Fri, 17 Feb 2017 09:40:04 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2017 00:40:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,171,1484035200"; d="scan'208";a="47582292" Received: from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31]) by orsmga002.jf.intel.com with ESMTP; 17 Feb 2017 00:39:03 -0800 From: Beilei Xing To: jingjing.wu@intel.com Cc: jianfeng.tan@intel.com, dev@dpdk.org Date: Fri, 17 Feb 2017 16:37:56 +0800 Message-Id: <1487320676-54579-1-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1487126547-29902-1-git-send-email-beilei.xing@intel.com> References: <1487126547-29902-1-git-send-email-beilei.xing@intel.com> Subject: [dpdk-dev] [PATCH v3] net/i40e: fix allocating hash table on socket 0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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 --- 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 */