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 F2DB8A053A; Thu, 23 Jan 2020 16:56:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E3FC2956; Thu, 23 Jan 2020 16:56:42 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20079.outbound.protection.outlook.com [40.107.2.79]) by dpdk.org (Postfix) with ESMTP id 8CE7927D for ; Thu, 23 Jan 2020 16:56:40 +0100 (CET) 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=35xNFzu0G3Hp1O2Sm/cEWS8EKgVoRQLPUkzN2U+5h+s=; b=b4Zt0Mn6ywzK4SOsysqdU4u7j4G+UsZygn0Tu5ZpGF7SfUXgVtqvd/lmON5G0y//aGj0Pnr65eJTi7czC0wxqQUzgZ6LjVcUcaoKZ5tPTFGkBsrQvVMOken8MFcJXQwERCJBfSPjfjoGJutyjUSMue37bZ+WT0sxgafWYOtRSds= Received: from AM6PR08CA0047.eurprd08.prod.outlook.com (2603:10a6:20b:c0::35) by AM0PR08MB4116.eurprd08.prod.outlook.com (2603:10a6:208:131::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.20; Thu, 23 Jan 2020 15:56:38 +0000 Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::209) by AM6PR08CA0047.outlook.office365.com (2603:10a6:20b:c0::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19 via Frontend Transport; Thu, 23 Jan 2020 15:56:38 +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 DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Thu, 23 Jan 2020 15:56:38 +0000 Received: ("Tessian outbound 4f3bc9719026:v40"); Thu, 23 Jan 2020 15:56:38 +0000 X-CR-MTA-TID: 64aa7808 Received: from 99e90dec7bc7.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0D6BB00F-CCD7-43F5-9EB9-043256A343C7.1; Thu, 23 Jan 2020 15:56:33 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 99e90dec7bc7.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 23 Jan 2020 15:56:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhMC+nfMOy7XQla/DwInH1ZIZuzIiUr55lECiesiGZN1dzvAZ6NEbNXMXLl1b1ACUMGOJA/h8YacHhM5Bh+IqeXS4HcBUb0OKH5WoXkynaeRAZN7zDmydDk337T7kymZTsQ2b9R0gslleyRIXAK4907Ix5N5aIBesAvAsR7pwhdXLVp46dMyVKKOs1JJDYLrqtLW61Wi2jMOoVYk6DYXjlvTgPFbpfNh6p8zczvE6fZNE+NHHe3B2vc8DV00njnJQR+eEP3AH10Y1vE0lZMc42P277bJ662wW5cZViUezZvzx2k67t99u6cFhFcdIni6YRirnaaOzWYLMcwAiiNinA== 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=35xNFzu0G3Hp1O2Sm/cEWS8EKgVoRQLPUkzN2U+5h+s=; b=c7b1me0QpZgYeT+xFhb/tQEA5ULTfgx0Z8OGo6EE9R3+2ERltjS57tfNYmPSyLFhNGNeQNgJP5A1I06WrO49I4bW8ByS90UneMkgnJzD9zdm6TAC2lATD57w+JXx3S7Vr+umM5QOM6flebDmX7RwDhfqJt0+1wx236jzs0UfJYjbJycZuh4OloUN4FeJI2lqBFynT1A6EJ7W1eYdR2Zmwg7ui5EFEnU/iy2JEssLkldx196iX4hjoAJzISamRfVYxCEZAuOHw2rqGLuf2wWcV0dPfUYA2n0X24EKrqxCOkbeqKmZCF93aOvsi4mIYQAfilJv8Xy6XlEylfye2aUSQA== 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=35xNFzu0G3Hp1O2Sm/cEWS8EKgVoRQLPUkzN2U+5h+s=; b=b4Zt0Mn6ywzK4SOsysqdU4u7j4G+UsZygn0Tu5ZpGF7SfUXgVtqvd/lmON5G0y//aGj0Pnr65eJTi7czC0wxqQUzgZ6LjVcUcaoKZ5tPTFGkBsrQvVMOken8MFcJXQwERCJBfSPjfjoGJutyjUSMue37bZ+WT0sxgafWYOtRSds= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB4688.eurprd08.prod.outlook.com (10.255.112.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.24; Thu, 23 Jan 2020 15:56:31 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2%7]) with mapi id 15.20.2644.027; Thu, 23 Jan 2020 15:56:31 +0000 From: Honnappa Nagarahalli To: "thomas@monjalon.net" , "dev@dpdk.org" CC: David Marchand , Olivier Matz , Dharmik Thakkar , Gavin Hu , Ruifeng Wang , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH] ring: fix namespace prefix of inline functions Thread-Index: AQHV0cd0B+eRYX0rZUWx65+oYZCnQ6f4Zy/Q Date: Thu, 23 Jan 2020 15:56:31 +0000 Message-ID: References: <20200123083022.3791956-1-thomas@monjalon.net> In-Reply-To: <20200123083022.3791956-1-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 510802ad-0655-4e15-8d61-3e96e1c5387e.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4f2d887d-fc0b-4652-1e7d-08d7a01cd4d3 X-MS-TrafficTypeDiagnostic: VE1PR08MB4688:|VE1PR08MB4688:|AM0PR08MB4116: 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:1850;OLM:1850; x-forefront-prvs: 029174C036 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(136003)(396003)(366004)(346002)(199004)(189003)(54906003)(86362001)(478600001)(81156014)(81166006)(8676002)(71200400001)(110136005)(2906002)(52536014)(8936002)(9686003)(186003)(26005)(55016002)(4326008)(33656002)(66446008)(316002)(66556008)(76116006)(7696005)(64756008)(66946007)(66476007)(6506007)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4688; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; 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: x1R5JGdTOAUna/h5524ziHE+fnnctFwuaKlqXyE8cUsGO7/GHDcHkgVCmE/460T4Sh1HMhRIGnifjonzjdmkqNdddEgYkqMqp3oJEqt9EgwRmt0JLf3jIFDdxKOn7DOyMkfPs6sV3GaKSEHHR1cDlTeCKLZUIpwXx/VF0LGWRCr4L45uR6aC/4szq/WpGR2F2zTlkxEbyi4pw/+G0SeEXrn3+GUMFtWYlZJxQjuFpuiacsPnaHAlicvfRwJ911N+HDwzEozHYzKFQN0JFXS21iJTDKh6JVHpeClt2BFHgdidP+ueGkLF8VW4MeAmzHZwkrObYhxji5ySgnytFX84qPhZrc5p6uAWk6toW0xnNlYdL82uqs4uuD7RcbMb3gkzS0fit1GHz30kGMd83nETrKJ38Dom3r61RLI4SqvxajLLuVW6CTLwfTnVy/7+Lgdf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4688 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(136003)(346002)(39860400002)(189003)(199004)(55016002)(8936002)(186003)(70586007)(5660300002)(52536014)(4326008)(70206006)(356004)(26826003)(478600001)(7696005)(336012)(9686003)(26005)(8676002)(316002)(33656002)(81156014)(81166006)(6506007)(110136005)(2906002)(86362001)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB4116; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: b35bc7f8-1abb-4a1a-96f2-08d7a01cd0cb X-Forefront-PRVS: 029174C036 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QJl58DdpFUyAwrbzMzf0TBiUu9MvQ+YpyxbnPII0oivYmIdWMUChv1tdl5t6EuLWPiR4NSU5G+hZNFKDR03RoO7eS7viohlYlhP1hBcg1/S/C+72UXY59JucA5Qk4TwahXLXvXIs2yW/gO6q9ov63MgxHBmDMhGgoEqTxvmMlFpnej7V90ew6SDH0YnClPjKA3YE3ibAJnOYm/E4mcs32vclkapUMl63JPqTbJqtDtt0HG4j+hLfijcUDoctJi11/tkJ0TAsHRF0gFIcrJCyq3IRk8eNrLLMqzfhs6MipxjzqL1TF/gC0KMqyvHzusNvLCH3PKXe04rDBieB+DMrecT4DyQBECw6l+rx5LMy1YbUuYWwa4DfEdMeNp69yuO817KuP6IZJCcRD9clOxyp2KcI0CE/pYl/TWhOPhDZAsWD9dvXvbNld6s+AsClWgM/ X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2020 15:56:38.5778 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f2d887d-fc0b-4652-1e7d-08d7a01cd4d3 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: AM0PR08MB4116 Subject: Re: [dpdk-dev] [PATCH] ring: fix namespace prefix of inline functions 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" >=20 > When adding custom element size feature, some internal inline functions w= ere > added in a public header without rte_ prefix. > It is fixed by adding __rte_ring_. >=20 > Fixes: cc4b218790f6 ("ring: support configurable element size") >=20 > Reported-by: David Marchand > Signed-off-by: Thomas Monjalon Looks good. Acked-by: Honnappa Nagarahalli > --- > lib/librte_ring/rte_ring_elem.h | 42 +++++++++++++++++---------------- > 1 file changed, 22 insertions(+), 20 deletions(-) >=20 > diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_e= lem.h > index 15d79bf2ac..7fdfe01e0b 100644 > --- a/lib/librte_ring/rte_ring_elem.h > +++ b/lib/librte_ring/rte_ring_elem.h > @@ -110,8 +110,8 @@ struct rte_ring *rte_ring_create_elem(const char > *name, unsigned int esize, > unsigned int count, int socket_id, unsigned int flags); >=20 > static __rte_always_inline void > -enqueue_elems_32(struct rte_ring *r, const uint32_t size, uint32_t idx, > - const void *obj_table, uint32_t n) > +__rte_ring_enqueue_elems_32(struct rte_ring *r, const uint32_t size, > + uint32_t idx, const void *obj_table, uint32_t n) > { > unsigned int i; > uint32_t *ring =3D (uint32_t *)&r[1]; > @@ -153,7 +153,7 @@ enqueue_elems_32(struct rte_ring *r, const uint32_t > size, uint32_t idx, } >=20 > static __rte_always_inline void > -enqueue_elems_64(struct rte_ring *r, uint32_t prod_head, > +__rte_ring_enqueue_elems_64(struct rte_ring *r, uint32_t prod_head, > const void *obj_table, uint32_t n) > { > unsigned int i; > @@ -186,7 +186,7 @@ enqueue_elems_64(struct rte_ring *r, uint32_t > prod_head, } >=20 > static __rte_always_inline void > -enqueue_elems_128(struct rte_ring *r, uint32_t prod_head, > +__rte_ring_enqueue_elems_128(struct rte_ring *r, uint32_t prod_head, > const void *obj_table, uint32_t n) > { > unsigned int i; > @@ -219,16 +219,16 @@ enqueue_elems_128(struct rte_ring *r, uint32_t > prod_head, > * single and multi producer enqueue functions. > */ > static __rte_always_inline void > -enqueue_elems(struct rte_ring *r, uint32_t prod_head, const void *obj_ta= ble, > - uint32_t esize, uint32_t num) > +__rte_ring_enqueue_elems(struct rte_ring *r, uint32_t prod_head, > + const void *obj_table, uint32_t esize, uint32_t num) > { > /* 8B and 16B copies implemented individually to retain > * the current performance. > */ > if (esize =3D=3D 8) > - enqueue_elems_64(r, prod_head, obj_table, num); > + __rte_ring_enqueue_elems_64(r, prod_head, obj_table, num); > else if (esize =3D=3D 16) > - enqueue_elems_128(r, prod_head, obj_table, num); > + __rte_ring_enqueue_elems_128(r, prod_head, obj_table, > num); > else { > uint32_t idx, scale, nr_idx, nr_num, nr_size; >=20 > @@ -238,13 +238,14 @@ enqueue_elems(struct rte_ring *r, uint32_t > prod_head, const void *obj_table, > idx =3D prod_head & r->mask; > nr_idx =3D idx * scale; > nr_size =3D r->size * scale; > - enqueue_elems_32(r, nr_size, nr_idx, obj_table, nr_num); > + __rte_ring_enqueue_elems_32(r, nr_size, nr_idx, > + obj_table, nr_num); > } > } >=20 > static __rte_always_inline void > -dequeue_elems_32(struct rte_ring *r, const uint32_t size, uint32_t idx, > - void *obj_table, uint32_t n) > +__rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size, > + uint32_t idx, void *obj_table, uint32_t n) > { > unsigned int i; > uint32_t *ring =3D (uint32_t *)&r[1]; > @@ -286,7 +287,7 @@ dequeue_elems_32(struct rte_ring *r, const uint32_t > size, uint32_t idx, } >=20 > static __rte_always_inline void > -dequeue_elems_64(struct rte_ring *r, uint32_t prod_head, > +__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head, > void *obj_table, uint32_t n) > { > unsigned int i; > @@ -319,7 +320,7 @@ dequeue_elems_64(struct rte_ring *r, uint32_t > prod_head, } >=20 > static __rte_always_inline void > -dequeue_elems_128(struct rte_ring *r, uint32_t prod_head, > +__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head, > void *obj_table, uint32_t n) > { > unsigned int i; > @@ -348,16 +349,16 @@ dequeue_elems_128(struct rte_ring *r, uint32_t > prod_head, > * single and multi producer enqueue functions. > */ > static __rte_always_inline void > -dequeue_elems(struct rte_ring *r, uint32_t cons_head, void *obj_table, > - uint32_t esize, uint32_t num) > +__rte_ring_dequeue_elems(struct rte_ring *r, uint32_t cons_head, > + void *obj_table, uint32_t esize, uint32_t num) > { > /* 8B and 16B copies implemented individually to retain > * the current performance. > */ > if (esize =3D=3D 8) > - dequeue_elems_64(r, cons_head, obj_table, num); > + __rte_ring_dequeue_elems_64(r, cons_head, obj_table, num); > else if (esize =3D=3D 16) > - dequeue_elems_128(r, cons_head, obj_table, num); > + __rte_ring_dequeue_elems_128(r, cons_head, obj_table, > num); > else { > uint32_t idx, scale, nr_idx, nr_num, nr_size; >=20 > @@ -367,7 +368,8 @@ dequeue_elems(struct rte_ring *r, uint32_t > cons_head, void *obj_table, > idx =3D cons_head & r->mask; > nr_idx =3D idx * scale; > nr_size =3D r->size * scale; > - dequeue_elems_32(r, nr_size, nr_idx, obj_table, nr_num); > + __rte_ring_dequeue_elems_32(r, nr_size, nr_idx, > + obj_table, nr_num); > } > } >=20 > @@ -424,7 +426,7 @@ __rte_ring_do_enqueue_elem(struct rte_ring *r, > const void *obj_table, > if (n =3D=3D 0) > goto end; >=20 > - enqueue_elems(r, prod_head, obj_table, esize, n); > + __rte_ring_enqueue_elems(r, prod_head, obj_table, esize, n); >=20 > update_tail(&r->prod, prod_head, prod_next, is_sp, 1); > end: > @@ -471,7 +473,7 @@ __rte_ring_do_dequeue_elem(struct rte_ring *r, void > *obj_table, > if (n =3D=3D 0) > goto end; >=20 > - dequeue_elems(r, cons_head, obj_table, esize, n); > + __rte_ring_dequeue_elems(r, cons_head, obj_table, esize, n); >=20 > update_tail(&r->cons, cons_head, cons_next, is_sc, 0); >=20 > -- > 2.24.1