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 16488A0C41; Thu, 16 Sep 2021 08:52:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 873CE4003F; Thu, 16 Sep 2021 08:52:49 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C0D084003C for ; Thu, 16 Sep 2021 08:52:47 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 44E497F514; Thu, 16 Sep 2021 09:52:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 44E497F514 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1631775167; bh=dgfmd/eNOXsZ5wXHyOS344Q9lWv0lKXbq0HPFQlLon4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=Eph16wvqivEwdoJPlag6Rn3LfuD+A91a1Xwsfanl92Rn0eL+0Sm2pM0ETCxnb6PfE JypshqBM2flkh7nzbCgt443P/JcGwPWWmFSLe/MWyDQv7V9rxx6WRl4MKpoE00pNzd 09LZQ5YhEaRQap/mTjIaOrNK2yHpYMPJM/WK99qE= To: Thomas Monjalon , dev@dpdk.org Cc: Ferruh Yigit , Ori Kam , Cristian Dumitrescu References: <20210915210444.3126008-1-thomas@monjalon.net> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Thu, 16 Sep 2021 09:52:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210915210444.3126008-1-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" 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.