From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9760A0547; Fri, 10 Sep 2021 18:53:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C9EF4068C; Fri, 10 Sep 2021 18:53:58 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id AC6F14067E for ; Fri, 10 Sep 2021 18:53:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10103"; a="306686238" X-IronPort-AV: E=Sophos;i="5.85,283,1624345200"; d="scan'208";a="306686238" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2021 09:53:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,283,1624345200"; d="scan'208";a="540691164" Received: from silpixa00401162.ir.intel.com ([10.55.128.50]) by FMSMGA003.fm.intel.com with ESMTP; 10 Sep 2021 09:53:54 -0700 From: Pablo de Lara To: yipeng1.wang@intel.com, byron.marohn@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Fri, 10 Sep 2021 16:53:46 +0000 Message-Id: <20210910165346.807715-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] efd: change data type of parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" rte_efd_create() function was using uint8_t for a socket bitmask, for one of its parameters. This limits the maximum of NUMA sockets to be 8. Changing to to uint64_t increases it to 64, which should be more future-proof. Coverity issue: 366390 Fixes: 56b6ef874f8 ("efd: new Elastic Flow Distributor library") Signed-off-by: Pablo de Lara --- This fix requires an API breakage and therefore it is not a good candidate for backporting (besides, it is a very low impact bug). Hence, I am not CC'ing stable. --- lib/efd/rte_efd.c | 2 +- lib/efd/rte_efd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c index 77f46809f8..68a2378e88 100644 --- a/lib/efd/rte_efd.c +++ b/lib/efd/rte_efd.c @@ -495,7 +495,7 @@ efd_search_hash(struct rte_efd_table * const table, struct rte_efd_table * rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, - uint8_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket) + uint64_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket) { struct rte_efd_table *table = NULL; uint8_t *key_array = NULL; diff --git a/lib/efd/rte_efd.h b/lib/efd/rte_efd.h index c2be4c09ae..d3d7befd0c 100644 --- a/lib/efd/rte_efd.h +++ b/lib/efd/rte_efd.h @@ -139,7 +139,7 @@ typedef uint16_t efd_hashfunc_t; */ struct rte_efd_table * rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, - uint8_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket); + uint64_t online_cpu_socket_bitmask, uint8_t offline_cpu_socket); /** * Releases the resources from an EFD table -- 2.25.1