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 86C3DA0C41; Thu, 16 Sep 2021 10:55:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74B9B4069E; Thu, 16 Sep 2021 10:55:08 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 1B2794003F for ; Thu, 16 Sep 2021 10:55:07 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 856465C01DA; Thu, 16 Sep 2021 04:55:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 16 Sep 2021 04:55:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= gkodAd+wPUFa5RetMAQtyTddahE7hSSQREvvzFfwnPk=; b=Q4xEFI24HPWURi9M jdWRELmdSStnld69rwL7JOhsy000v16rSGZfH1tStOR0poyhyrs4OjkiEvV2rOxH z3pClx+FYC1xubE3TThtDS13Bh0QSjKkHt8QgpfERoZSpHmfWvi05EiZrwCwt8B4 crQCvx2hIcIplt5ShAC3SCPYeX/jFb4DbeQBhTf/OqCuP5HYGq3fVV7QvxWZ3IxW bzju7UiKBevv1x1gry3qZGdURUj3UokwqB7hPKQN1FlZYp8eCZxdnvHXM/2wY4ES uzb701jUAzb+UMHJ0FFuHaTkbXJeFgSJvZGtNUbAyVn4+xZZWBn6UivB5xSo0w// 8dPGEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=gkodAd+wPUFa5RetMAQtyTddahE7hSSQREvvzFfwn Pk=; b=REqdSU6bXvoLRoFphX/dn4J7Z6+Sa1OQdrJ6GsXNr9xZ+ru/p0hcTQMcw yxOUGQ+NFgc5/1Rg2ktllSuH+4SNcV9h4aW+sV7X/52Kjy7+yJfN0ZO3bR2sRAtL N7Zjem1POp4KSE75uviZDQ/aciWofY2roq4ozHHWpSG+div37Jcr/O7QR4YVyV+V J2G4XP0DRf/87m/nGPbc7PLCVFbpqjSnJpZtxEDVMZnfgi13t2V+UPF17EK5x25k Evjybpo3ltL4hgKWIRAIDVlgQz5Vz+G7Hg0XtbYcvor1h53nzog+IYZCnBvy7Rrk 6fcY2HrT0fSNcmzAdsm5czG7MUNXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 04:55:05 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko , Cristian Dumitrescu Cc: dev@dpdk.org, Ferruh Yigit , Ori Kam Date: Thu, 16 Sep 2021 10:55:04 +0200 Message-ID: <6302489.YdC8p3pGMF@thomas> In-Reply-To: References: <20210915210444.3126008-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: replace bit shifts with macros 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" 16/09/2021 08:52, Andrew Rybchenko: > On 9/16/21 12:04 AM, Thomas Monjalon wrote: > > The macros RTE_BIT32 and RTE_BIT64 are used to replace bit shifts. > > The macro UINT64C is also used to replace remaining occurrences of ULL. > > > > Only bit shifts of ETH_RSS_LEVEL_* are kept for aesthetic reason. > > > > Signed-off-by: Thomas Monjalon > > Good cleanup, many thanks. > > > diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h > > index dc246dd7af..babc9968d0 100644 > > --- a/lib/ethdev/rte_mtr.h > > +++ b/lib/ethdev/rte_mtr.h > > @@ -60,28 +60,28 @@ extern "C" { > > */ > > enum rte_mtr_stats_type { > > /** Number of packets passed as green by the policer. */ > > - RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0, > > + RTE_MTR_STATS_N_PKTS_GREEN = RTE_BIT64(0), > > I think it is a bad idea to initialize enum members to > uint64_t value. Yes probably. The targets are 64-bit wide so there is an inconsistency in the API I think.