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 0C74BA034C; Thu, 24 Feb 2022 16:58:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFFC1426FF; Thu, 24 Feb 2022 16:58:19 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 8DCA1411FE; Thu, 24 Feb 2022 16:58:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645718298; x=1677254298; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WXn3rJtF86hCOGKCsPWFxmKNSRGFD8RrF2zsnYVPwKw=; b=l/zus231yOUeO6LE+YIfyRfRD1WgGUKsCWkJKANqK3U/efTz+t0G2Og5 +LO6OTZE03bye7esIMvOBxxdfcfn6MRnerApwzxIPRNZZOp9L34JQ+B8t Ow4b5K3kh8EksjHDmAUdBXj2IcZtIyGvQmOZ4Ug467FETziH+l16E8SKi +G+kH5x+PxE5K+4ut7rgXYrZMKQvOq4gS0SwQBUrci3yIu0ey7+V3Mn5W x7xByy4iEUxWToU+lnA9pYsN3rvwZi3gIdyJqJlMRVmCkY9i0vVa4ovTX 8QvajjhQqkoE7LilDGjIW70QiTYrVCFtm8mTLMnHvXlSsdk/N4MqNfYe8 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="232241709" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="232241709" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 07:58:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="533183112" Received: from silpixa00400636.ir.intel.com ([10.237.213.19]) by orsmga007.jf.intel.com with ESMTP; 24 Feb 2022 07:58:01 -0800 From: Pablo de Lara To: yipeng1.wang@intel.com, byron.marohn@intel.com Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org Subject: [PATCH v2 1/2] test/efd: fix size of constant Date: Thu, 24 Feb 2022 15:57:58 +0000 Message-Id: <20220224155759.819460-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224154801.819320-1-pablo.de.lara.guarch@intel.com> References: <20220224154801.819320-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Constant value 1 has a size of 32 bits, and shifting it more than 32 bits to the left overflows. 1ULL is needed to be able to get a 64-bit value. Coverity ID: 375846 Fixes: 8751a7e9832b ("efd: allow more CPU sockets in table creation") Cc: pablo.de.lara.guarch@intel.com Cc: stable@dpdk.org Signed-off-by: Pablo de Lara --- app/test/test_efd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_efd.c b/app/test/test_efd.c index 7bea674086..fa29e8f97a 100644 --- a/app/test/test_efd.c +++ b/app/test/test_efd.c @@ -107,7 +107,7 @@ static inline uint64_t efd_get_all_sockets_bitmask(void) unsigned int next_lcore = rte_get_main_lcore(); const int val_true = 1, val_false = 0; for (i = 0; i < rte_lcore_count(); i++) { - all_cpu_sockets_bitmask |= 1 << rte_lcore_to_socket_id(next_lcore); + all_cpu_sockets_bitmask |= 1ULL << rte_lcore_to_socket_id(next_lcore); next_lcore = rte_get_next_lcore(next_lcore, val_false, val_true); } -- 2.25.1