From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0070.outbound.protection.outlook.com [104.47.2.70]) by dpdk.org (Postfix) with ESMTP id 05DB61C24C for ; Wed, 4 Apr 2018 21:41:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4RVAcewJjbPjX7apW0kujegXOnCpdrDbOYxEZgcQ614=; b=O0zRWRwV0TkvqKOoKQeCn2xJVsuFS3iMaAUI6dh9AACxG4tG2El4/ZHzAHOOCC0e1rjXpfrzhB0eokOeDvvxAFvfSrPBlcDjiWOqpDJEs+Kv6K6qjK+WYcjphf98dDgqrgFN7pRCz2aDh+vTv3dj1OGJC0nKQjDvyjj00evvNBs= Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com (10.172.215.19) by AM4PR0501MB2275.eurprd05.prod.outlook.com (10.165.82.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Wed, 4 Apr 2018 19:41:44 +0000 Received: from AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::6885:c169:afcb:37e6]) by AM4PR0501MB2657.eurprd05.prod.outlook.com ([fe80::6885:c169:afcb:37e6%7]) with mapi id 15.20.0653.012; Wed, 4 Apr 2018 19:41:44 +0000 From: Matan Azrad To: Pavan Nikhilesh , "jerin.jacob@caviumnetworks.com" , "keith.wiles@intel.com" , Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] eal: add API to align integer to previous power of 2 Thread-Index: AQHTy/4PDze0s6BzekuJxdjllw+CNqPwxeaQgAAJ2wCAAAOT4IAAD++AgAACtMCAAAQCAIAAAYVQgAAEFACAAAwGoA== Date: Wed, 4 Apr 2018 19:41:44 +0000 Message-ID: References: <20180217104934.17291-1-pbhagavatula@caviumnetworks.com> <20180404101606.5156-1-pbhagavatula@caviumnetworks.com> <20180404164207.GA21153@ltp-pvn> <20180404175156.GA5416@ltp-pvn> <20180404181557.GA30549@ltp-pvn> <20180404183559.GA2381@ltp-pvn> In-Reply-To: <20180404183559.GA2381@ltp-pvn> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [85.64.136.190] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR0501MB2275; 7:E1x2rBsTORWSKvLp0JuQ1X2GokwlvcKJoq2zoRttWab7uPf8DQJYor0zaFhMlaaGqoBn2PQZ30zyWnhD5B2Uc3/RDPdCYcyLkddAVCdOAiHPkJHdFuKEdapUfxXecPgZTDR9utju6Cacts3KyH9lFLc7hG9gCAvynw7iEKduYKrzMxyPVgk9ah5QRu5A3sCl3AhEsUAZFbGDdtFtouHgHrzAE8CcPdmiJP7aU5ZsUCVmWumKyWnqo4NyNEqAP0OO x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ed52b66f-1e7c-47c5-165c-08d59a6418a8 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0501MB2275; x-ms-traffictypediagnostic: AM4PR0501MB2275: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM4PR0501MB2275; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2275; x-forefront-prvs: 0632519F33 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(346002)(366004)(376002)(396003)(189003)(199004)(11346002)(2900100001)(446003)(3846002)(26005)(81166006)(81156014)(2501003)(476003)(6116002)(4326008)(478600001)(2201001)(486006)(25786009)(2906002)(102836004)(76176011)(99286004)(86362001)(6506007)(74316002)(305945005)(7736002)(5660300001)(186003)(5250100002)(68736007)(3660700001)(3280700002)(7696005)(6246003)(229853002)(105586002)(33656002)(93886005)(55016002)(9686003)(14454004)(53936002)(97736004)(6436002)(66066001)(8936002)(316002)(106356001)(8676002)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2275; H:AM4PR0501MB2657.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 7TKQnhB3g0KbNixUrszFF1MRqVV+eNJv2GLoxpoEDEmQJS54p2Ld0rQrbtNVNdE7P2nFR5MzghlVJnrppFSRQ5k4ihw/iHl8vm92kAmobrkY11LYufez1N4sjC6WIlXMyCQVPG8zciECge0WbrKdmcFf6A+ER5jjIEhToVu/ZPnwymfsFCwyAHuFNJnHQohJspomYFLApGwKHSj6/lA32WaSyfjxGWeyU+7bumzVghwJOzCP8lnrHyXMUjL2+3iOMQoRTCpkiO0AefxiadTpEqYIqy5kS2K5RMoVsuW2F2NoANcSAqSTbKxprd7xPv6pBFe5BL/mvFZNN8Kg5gTwgamYuMS7pSDbWl0ACenbFdieJA2/8nEiY1UOnTFtihG8Z0/Wr08+gltgWBDKhwziWnJu3rR+C20Ehspa0t9WkPI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed52b66f-1e7c-47c5-165c-08d59a6418a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2018 19:41:44.2931 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2275 Subject: Re: [dpdk-dev] [PATCH v3 1/2] eal: add API to align integer to previous power of 2 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: , X-List-Received-Date: Wed, 04 Apr 2018 19:41:46 -0000 Hi Pavan From: Pavan Nikhilesh, Wednesday, April 4, 2018 9:36 PM > On Wed, Apr 04, 2018 at 06:23:19PM +0000, Matan Azrad wrote: > > Hi Pavan > > > > From: Pavan Nikhilesh, Wednesday, April 4, 2018 9:16 PM > > > Hi Matan, > > > > > > > > > > > Got you. > > > > Looks like you found issue here... > > > > The experimental tag probably should be in a root .h file. > > > > Probably, need a fix patch to move it for a different\new .h file. > > > > > > > > What do you think? > > > > > > > > > > Actually thats just start of the rabbit hole, if we succeed to tag a > > > inline function in rte_common.h as experimental every lib/driver > > > that uses rte_common.h (almost everything) needs to have CFLAGS set > > > to - DALLOW_EXPERIMENTAL_API. > > > > > > > Isn't it relevant only for the libs which are using the new tagged APIs= ? >=20 > Static inline functions in .h files will be added to each and every .c ex= ample > preprocessor output for rte_pci.c which includes rte_common.h: >=20 > # 231 "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" > extern int RTE_BUILD_BUG_ON_detected_error; # 249 > "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" > static inline uint32_t __attribute__((deprecated("Symbol is not yet part = of > stable ABI"), section(".text.experimental"))) rte_combine32ms1b(register > uint32_t x) { x |=3D x >> 1; x |=3D x >> 2; x |=3D x >> 4; x |=3D x >= > 8; x |=3D x >> 16; >=20 > return x; > } > # 271 "/home/pavan/Work/clean/dpdk/build/include/rte_common.h" > static inline uint64_t > rte_combine64ms1b(register uint64_t v) > { > v |=3D v >> 1; > v |=3D v >> 2; > v |=3D v >> 4; > v |=3D v >> 8; > v |=3D v >> 16; > v |=3D v >> 32; >=20 > return v; > } >=20 > Which causes compiler to throw error as DALLOW_EXPERIMENTAL_API is not > added to cflags. >=20 Are you sure? I added the next code and the compilation passed: static inline uint32_t __attribute__((deprecated("Symbol is not yet part of stable ABI"), \ section(".text.experimental"))) rte_combine32ms1b(register uint32_t x) { x |=3D x >> 1; x |=3D x >> 2; x |=3D x >> 4; x |=3D x >> 8; x |=3D x >> 16; return x; } Actually, the combine functions should not be experimental (already used in= the existed code). It also will prevent us to add the cflag in every lib which uses the old al= ign functions.=20 Only the new align functions should be tagged. And then, you need to add the cflag only in the places which use these func= tions. Am I missing something? > > > > > Regards, > > > Pavan.