From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 501D5A00C5; Sun, 26 Apr 2020 11:23:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2EE1C1BF9E; Sun, 26 Apr 2020 11:23:11 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 0C0331BF72 for ; Sun, 26 Apr 2020 11:23:10 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 726FE580090; Sun, 26 Apr 2020 05:23:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Sun, 26 Apr 2020 05:23:09 -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=fm1; bh= BxqoGUCYiqeZvqNkmMHKTRyS7UVCr2vMWjV6uZnwP4Y=; b=Mywx2tXrHyiqpM2I OD2wHs4CbhLHMzU6lanBrZqzq4D7mJM8WH+O/EGBsX8NyslXuhncCCMRXGcar8Bv oqTF8vmkCEGd3eNmYJvHMV7Gj0vQvbxNmi31A2E1IjM9pjGxbZhwCpqNMErQNg+u fe6b0tp6TsYsOLVS9LCCf0yqYAN2Uxukua3KnsRm2Mju6MfbVkej3uRoY6Mu6VUf g0En206s3YLt5G6LeZhGecYNK5ILhzADntxiRrSSr2zqUXECpVI0Cqr+NQM3+5Ji Tg1iAEThid0Wl8DK9yxctbfwKCathrisM2XRWj66Bs2aHpCDL5LqHeMA9w34XHcp IfUOiQ== 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=fm2; bh=BxqoGUCYiqeZvqNkmMHKTRyS7UVCr2vMWjV6uZnwP 4Y=; b=0OlLoY9TM9ca6gFVtmcntQN78rAsC6CZq0xmgn+ePZ4KVDHAUKoQWhQ5t yTcYsmAIIfno94C5lNcdowYZrgaF3Y+pcSePy+9Wb99ftMcQSbUVI4pfj1cIal3W LAP8KigYMSl/0ZO9alfztDU43OwAhuZbUJxiu9axoY5Bb4pm1E+i/B+BqrTfHNGS bfHAjw+GsCd4BfW2Jslr1UR5gX5WfEjpZSsVXzr2C29jRbZvXNWMiB7fheOfDGx3 Xf11RCz4N+/payHKAhWQr742wcxCzFBpSE4vDH1q4R8ItiAaiyj4qbIdzss93tMY tAH64K3WG7hC3TSXZeNQb51PJisEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheejgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 811DE3065E1F; Sun, 26 Apr 2020 05:23:05 -0400 (EDT) From: Thomas Monjalon To: Joyce Kong Cc: "stephen@networkplumber.org" , "david.marchand@redhat.com" , "mb@smartsharesystems.com" , "jerinj@marvell.com" , "bruce.richardson@intel.com" , "ravi1.kumar@amd.com" , "rmody@marvell.com" , "shshaikh@marvell.com" , "xuanziyang2@huawei.com" , "cloud.wangxiaoyun@huawei.com" , "zhouguoyang@huawei.com" , Honnappa Nagarahalli , Gavin Hu , Phil Yang , "dev@dpdk.org" , nd Date: Sun, 26 Apr 2020 11:23:03 +0200 Message-ID: <3221990.uBEoKPz9u1@thomas> In-Reply-To: References: <20200424032159.992-1-joyce.kong@arm.com> <11850699.hYdu0Ggh8K@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v9 1/6] lib/eal: implement the family of common bit operation APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 26/04/2020 09:18, Joyce Kong: > From: Thomas Monjalon > > 24/04/2020 05:21, Joyce Kong: > > > Bitwise operation APIs are defined and used in a lot of PMDs, which > > > caused a huge code duplication. To reduce duplication, this patch > > > consolidates them into a common API family. > > [...] > > > +rte_get_bit32_relaxed(unsigned int nr, volatile uint32_t *addr) > > > +rte_set_bit32_relaxed(unsigned int nr, volatile uint32_t *addr) > > > +rte_clear_bit32_relaxed(unsigned int nr, volatile uint32_t *addr) > > > +rte_test_and_set_bit32_relaxed(unsigned int nr, volatile uint32_t > > > +*addr) rte_test_and_clear_bit32_relaxed(unsigned int nr, volatile > > > +uint32_t *addr) rte_get_bit64_relaxed(unsigned int nr, volatile > > > +uint64_t *addr) rte_set_bit64_relaxed(unsigned int nr, volatile > > > +uint64_t *addr) rte_clear_bit64_relaxed(unsigned int nr, volatile > > > +uint64_t *addr) rte_test_and_set_bit64_relaxed(unsigned int nr, > > > +volatile uint64_t *addr) rte_test_and_clear_bit64_relaxed(unsigned > > > +int nr, volatile uint64_t *addr) > > > > Sorry, I have one more naming concern with this series. > > I prefer a common namespace for bit operations. > > Would you be OK to prefix all function names with rte_bit_relaxed_? > > > Hi Thomas, > Do you mean to rename the functions as 'rte_bit_relaxed_get_bit32'? > If the example is ok, I will modify as this in v10. Yes, thank you.