From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] service: fix shifts to operate on 64 bit integers Date: Mon, 31 Jul 2017 22:12:47 +0200 Message-ID: <2283012.f371VpG1HL@xps> References: <1501516707-87024-1-git-send-email-harry.van.haaren@intel.com> <1501519135-122347-1-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, gaetan.rivet@6wind.com To: Harry van Haaren Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 912D49955 for ; Mon, 31 Jul 2017 22:12:49 +0200 (CEST) In-Reply-To: <1501519135-122347-1-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 31/07/2017 18:38, Harry van Haaren: > This commit fixes shifts to an integer (1 << shift) which > is assumed to be a 32-bit integer. In this case, the shift is > variable and expected to be valid for 64-bit integers. Given that > the expectation to work with 64 bits exists, we must ensure that > the (1 << shift) one in that formula is actually a uin64_t. > > The UINT64_C() macro portably adds the correct suffix to a constant, > informing the compiler that the value is to be assigned 64 bits. > > The issue would only manifests when there were greater than 31 > services registered. > > Fixes: 21698354c832 ("service: introduce service cores concept") > > Signed-off-by: Harry van Haaren Applied, thanks