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 8C651A00C5; Sun, 26 Apr 2020 09:18:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E3F6C1BF91; Sun, 26 Apr 2020 09:18:49 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70058.outbound.protection.outlook.com [40.107.7.58]) by dpdk.org (Postfix) with ESMTP id 5AF441BF8A for ; Sun, 26 Apr 2020 09:18:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/j/qGsbWN1/++6N+OLlrA+HsKMPX9NlYAf4PnYrUd6M=; b=t12cuFmRczyG43UzB1dh8gzcjFj7zdBCOJCujDEOZSbalQbPB38Y9j+4dav9xsil+xc44WCb+xSxUi0Ithn9flkgn84pXot2YmKRn2apIoAsaOWeGVWlLLo8GnVt4Xqwdq9ImjsGoTwNKRPPOAZKMoo75MNEf8Zcoxalvok77cs= Received: from DB6PR07CA0080.eurprd07.prod.outlook.com (2603:10a6:6:2b::18) by AM6PR08MB3575.eurprd08.prod.outlook.com (2603:10a6:20b:48::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Sun, 26 Apr 2020 07:18:46 +0000 Received: from DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2b:cafe::aa) by DB6PR07CA0080.outlook.office365.com (2603:10a6:6:2b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.10 via Frontend Transport; Sun, 26 Apr 2020 07:18:46 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT038.mail.protection.outlook.com (10.152.21.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.19 via Frontend Transport; Sun, 26 Apr 2020 07:18:46 +0000 Received: ("Tessian outbound ff098c684b24:v54"); Sun, 26 Apr 2020 07:18:46 +0000 X-CR-MTA-TID: 64aa7808 Received: from 8fbdd4db79d2.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 769B45AD-05D4-4350-ADCA-D0282EBBBBC5.1; Sun, 26 Apr 2020 07:18:41 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8fbdd4db79d2.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 26 Apr 2020 07:18:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hbp/8HW6t+K8fhdrptFYOmdYbSmLcs+vLLBNA0gx5RLYfLqgJ+IHTSpA/br+EpDG/eOv0aJIQHRWy+GGdp/LRmDQwD11KVmiDSktBaEodXGMPgHNFS+EmGjavbPizFCCWqvt1Fe6NmqQ8L7zRrITl1sMNQchDWPEUeMFd671WA7oEvQrIlsqrbv7AEYe1fJf6FRt2SgfRV0A+w1CaL3QBhp41HASr3kLwQzERJWIJ2c4YQeo68jv7cDTxGTd+DBZp9fWoUDTJA1XJotRhyv6L/EdIZeHBg6nG2eMXBiiUkYWEWS2I7dYeF7HhSSKWfKMUAM/zA9m5pWu49YNRB1pug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/j/qGsbWN1/++6N+OLlrA+HsKMPX9NlYAf4PnYrUd6M=; b=CIZViQv7GWZdofS82z3BqN0AcFAXmYO/KjCqUYUr7bHgx3H+JYBV/Mmhfn7S0LrpEOUK8uNmOE0T9USkzFwhWUncZ5tnPWMH5o8sw8b5Ygrudwb6Zd6BHrOMmfG/tMhVXpkrTwd2SF4bwvyFVTL3A0QjszYQ7Wh3x0HS9e9hd2poeBfsFRDIj6ATZebtBZ+IF71o4ApdS4tBhCjO4XNnUigYypE9qgg63GfZsXIvz/S+tLfB1W6AAgONorybB4SIK4Erd4bqUgKThN+VOFRTb1sRB5USXCCNqv2kqVWGEOfNu0P6VIWowDXoAx+CLkWTdoldd2JxphWgskuLF33DpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/j/qGsbWN1/++6N+OLlrA+HsKMPX9NlYAf4PnYrUd6M=; b=t12cuFmRczyG43UzB1dh8gzcjFj7zdBCOJCujDEOZSbalQbPB38Y9j+4dav9xsil+xc44WCb+xSxUi0Ithn9flkgn84pXot2YmKRn2apIoAsaOWeGVWlLLo8GnVt4Xqwdq9ImjsGoTwNKRPPOAZKMoo75MNEf8Zcoxalvok77cs= Received: from DB7PR08MB3307.eurprd08.prod.outlook.com (2603:10a6:5:1b::32) by DB7PR08MB3034.eurprd08.prod.outlook.com (2603:10a6:5:24::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Sun, 26 Apr 2020 07:18:38 +0000 Received: from DB7PR08MB3307.eurprd08.prod.outlook.com ([fe80::dc88:50dc:97a2:69bd]) by DB7PR08MB3307.eurprd08.prod.outlook.com ([fe80::dc88:50dc:97a2:69bd%7]) with mapi id 15.20.2937.020; Sun, 26 Apr 2020 07:18:38 +0000 From: Joyce Kong To: "thomas@monjalon.net" 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 Thread-Topic: [dpdk-dev] [PATCH v9 1/6] lib/eal: implement the family of common bit operation APIs Thread-Index: AQHWGzwQ2Oi1YGMr+0aIyj/TcYCpi6iK/gPA Date: Sun, 26 Apr 2020 07:18:37 +0000 Message-ID: References: <20200424032159.992-1-joyce.kong@arm.com> <20200424032159.992-2-joyce.kong@arm.com> <11850699.hYdu0Ggh8K@thomas> In-Reply-To: <11850699.hYdu0Ggh8K@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 9d611aae-d98a-47b5-9fe1-ee95cceba973.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Joyce.Kong@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1d38a7de-c0b4-4c6d-4bc5-08d7e9b20f0b x-ms-traffictypediagnostic: DB7PR08MB3034:|DB7PR08MB3034:|AM6PR08MB3575: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:4941;OLM:4941; x-forefront-prvs: 03853D523D X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR08MB3307.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(396003)(39850400004)(55236004)(2906002)(33656002)(6916009)(9686003)(4326008)(26005)(5660300002)(55016002)(64756008)(6506007)(53546011)(186003)(54906003)(66946007)(66476007)(86362001)(81156014)(7696005)(66556008)(76116006)(316002)(71200400001)(66446008)(7416002)(478600001)(52536014)(8676002)(8936002); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: IyJJ6l+2PMfDlVMFCVVEZgec6LG+PiCsnW9Yzge5kDe5IU665RpJ4rv56yJ0NZt1gg8giFjvwKiH8RiURxjj6h+EykySynM4altybPezWKAATg0i0LlezggCzxv8lVs/zYIShsydGcoer568bkb0jn3suAZSi08QQpy1hmJCjYAhNFqxsh5NuHImAQbvlY7ejrza1WC/uYfR6ipnC7KB10Pg89B9OkhPGZxcWvEgMGagNgoFsXpjG6k6Tr8/rpZ1IbA9pva6CIQ4FL32OsvungXxefmQqm3gSzSZtaOxRbTgb7qD53B98RsrJnHMdQUxXevieDtBWxExrCi7vigR97Nem9Vc16o2yK95Zz14rLRdIRPNReBEjz5Md0u5c6rr8YHdGOWGeT1DhMQrIn0A5R092XyxBRuSInnaqF33a1QRQ2ohTWW8X5FKFN8WrWK1 x-ms-exchange-antispam-messagedata: BrhvFDt+cSBH8oJBoIgBTcLVuyI4dHc0Egb+N2PgC32LNz3vlAO8LxEzMsQynX2h+UJsXXT/X02REOo59qaRGeNj7fL1bEyGctQmhoVGGWy2jM/x8fqMNcW93V/tR3S9n8B2wkyns7pe5sgbKgSDCcOfsHBF44DvFet2pImToFBtJyCauqLCRR8KBqkgztKQm+DNrNuKaJSxCON6Ox+ZF8tK3aEo4mn3OKPjEPTFZtNMzSXudEidTKurjmBK44yHxYm/+EhWrRB/fsVnvjMby8OQ9GKNXOxvK2BTV99ZRvE6vcmaE15+87ryXlpXx5BU14xPRDnETrdD2fTRkaKDPghreCN/CKVU7zWBr9OdaC6Jt6MjANHQ7DasrsuTPO2eHi7lFgx05IoADRWeqtEj+vwVe6HqC/hyM7MDg35GSA7F+wzJixzNQIB2EY1POaVxGw5O5XIDhuUXGGr0ttIBCb1XYL9naSUnlr+5iXC++PkMHW4Mp/3tyt2TdfEe+hB1FgIwlbvqGveylhJfCTuoMQo9r71LQP0S5thOMdvIA/aw+dBU14v7KjQDyUbKR6krSWMJIdKJIajQjKf2/YNx5OPLBxS8naqKLWb8WNAnZec8OrOm5zBq4FMd9Vln1KUp/0eJJ+m5YlpFKa/4x5+mVFgc6a9VB1pZadfX9cQH107ngk/Puo3mfiEw+9THuaG0uDmVCG2azuM1OVVtot8omksDkdutfaXzRSlND7fCGAblV07lIY5rDDrP3X+IARlJfcMazni02Mto7y6wKzmXInPAyR2yU4XzIeV1YZQevU0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3034 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Joyce.Kong@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(39860400002)(376002)(396003)(46966005)(70586007)(55016002)(336012)(7696005)(82310400002)(186003)(82740400003)(47076004)(356005)(8676002)(9686003)(81156014)(81166007)(2906002)(8936002)(26005)(86362001)(54906003)(52536014)(4326008)(5660300002)(6862004)(53546011)(478600001)(6506007)(70206006)(33656002)(316002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 02ffda92-7412-470e-60f7-08d7e9b20a46 X-Forefront-PRVS: 03853D523D X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ilS156YCxvO6TBXHomD82Do3gf41wiHNOLHwmhrVMn0S5fjZ2l5aah2G8iCvif5P5w6l9nVxAgvExVXSDB3rtLMEDuUnYLi8a2FQIBrhRE4kNyYWEvQUp56hOIZUT2AJ8d5dZj2a02lee3VwuBMVL3JbMknfCTTtm1adnB6rqr3yeW9Dn4paRqh8iwWhrim6aG+eepAmCNy4E7fWGdQJh5S19gweYPOl7GiVniA11tH8OFpQBaQtxlheoaNqg1ibFxUW+mLwZXjOu1Sg0b15aEd7wAqknuV8XiJdIdFDEr4yPwNjNVQxYkJCCU8deQO0/S2xvEaRxtaiKg+c+RswhmQkfQIohk+w/+iviRtGQeqEnZG9fI4jVBc0Z9FaCKRTUwOskK4iiaGXNSCshbeYGkbeRVkBs4To+OiM9XglPNjiuwywCF/C4kCI67jN9su6MdoSrUE002nNWOWMYPDow8wiP0C7uysQVxTFaxUCtyYtciL5MuUfemRreGZtdG4CnOSVGlIh7Tzt3FZjgAiNFg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2020 07:18:46.2003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d38a7de-c0b4-4c6d-4bc5-08d7e9b20f0b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3575 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Sunday, April 26, 2020 3:59 AM > 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 > > Subject: Re: [dpdk-dev] [PATCH v9 1/6] lib/eal: implement the family of > common bit operation APIs >=20 > 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) >=20 > 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_? >=20 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. Thanks, Joyce