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 2436FA0351 for ; Thu, 24 Feb 2022 16:48:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13475426ED; Thu, 24 Feb 2022 16:48:13 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 0357E40040; Thu, 24 Feb 2022 16:48:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645717691; x=1677253691; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WXn3rJtF86hCOGKCsPWFxmKNSRGFD8RrF2zsnYVPwKw=; b=euSzPd8J/WjoA3SiALqFJN/bcIvQMCjCQ+imV0d/hZrBht5/H0LG4S/Q ieqmBkqsW0+SW3poMPr+Mx80o6JsCzMzIsealUG0ZNZ6+YGXyeOwsyInT Tz3mfpACMFwaQXMBAsaHIBLGlI+WwGq+VRQEQU4lQY8v+J8Olc4+U7Ze/ cjn5U8KdVc8cknmiqxjPcuOZY7q5SVGWUR6GFCvCoDiX3l8J6vTPNID7X mCJPVY4TVR7a61+SZStoKRnlhszbBGtcpFoNkuIQ+7Lw3+N//eRDzgxgo dedUe6e8QCz2rkzZ7dxtdMQ2TdaTZ5DDX6hbpyoRaC+XcbXvCqeQAO9gd w==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="315485317" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="315485317" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 07:48:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="508912363" Received: from silpixa00400636.ir.intel.com ([10.237.213.19]) by orsmga006.jf.intel.com with ESMTP; 24 Feb 2022 07:48:03 -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 1/2] test/efd: fix size of constant Date: Thu, 24 Feb 2022 15:48:00 +0000 Message-Id: <20220224154801.819320-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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