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 D8B25A00E6 for ; Fri, 12 Jul 2019 13:06:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9347D2AB; Fri, 12 Jul 2019 13:06:34 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130078.outbound.protection.outlook.com [40.107.13.78]) by dpdk.org (Postfix) with ESMTP id DE9EF2AB; Fri, 12 Jul 2019 13:06:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A9vb32jiewv9OUJXQcZxFJM7x0LCZX/jO+KrxEeFZOrvcMaZKls/PcrkqXbyUm7qr0ss4YdF3RvslnvlM+Wz8F+1DReO9aIrhbQGE+UaafwDr9FDdeN+y1cgJeLumsoqzTtN1ujV11DTRjQMdAfr0eRImQngHf3ZSvAsC5VXEzKTRJNVQqefOuSr9Y7ubYDxaq+zMM2W1yWBnJXJyvHlcMrRv2Toko44oas7QkyeMiN5aWAHHiwIs0jYj1CLpZFTTaZk6aVs6XI6j91TXH1UIA9+wJfwvdP1kfBGxlvvbXK1fH4D9EId7XSgES1i/vIyeZN2YzzyASRxeZQhB63BEw== 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=/1wzjqniaD48YEEeWUxgCXtetKjfWQp5DPXYw36d60o=; b=NSO5TDi/zMKT7rmN48KmhApXYhckQp6P0tyH26rltNtEo1jVitGQjskoVQRNPUEmU+tcfFZKCXCbNLEXHwheOhTaww/xFIh+KW1KOLb3m2JSR4uNmzuOvgUIh215MwkZKLCb81F5mmmfE9Yg3mDAhdoAghgfzVx80s0dn2ViBC8goghkh8cKUH4rc/G/8f32bHrq14HCs2jhpZ+C9yT8KMe14rIGaPFUrrENPHdu+IXz0lCyifKWo6Blq9M1BONvXpDIoDPHIFh4Dq6TxULU6Tbu9p8X2IvqqA0VYz954L9Y6Ynd3HR87L2XmSM3PrgVXvRQd2vzlP9ogWIEH3yY2A== 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=/1wzjqniaD48YEEeWUxgCXtetKjfWQp5DPXYw36d60o=; b=Vly5dtOvSf96OET/WjaNeRc0DNJxuD+c9QGpB8rJ2k5I+DGXuVjWlcCKdYj3pHCvHkKEQ2RSf+fwzAulPVqhpjFGbXIb70c4ksfGZSFHYgLWwDQ6h+LpFaFlxa9H+D7+qavjaSj3afy234O2smsKm0SaHqKDk5O/ZhVisN/U2uU= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB4303.eurprd08.prod.outlook.com (20.179.25.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Fri, 12 Jul 2019 11:06:28 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::5c6f:a70a:a1d7:5d65]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::5c6f:a70a:a1d7:5d65%5]) with mapi id 15.20.2052.020; Fri, 12 Jul 2019 11:06:28 +0000 From: "Gavin Hu (Arm Technology China)" To: Olivier Matz CC: "thomas@monjalon.net" , "dev@dpdk.org" , nd , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Nipun.gupta@nxp.com" , Honnappa Nagarahalli , "i.maximets@samsung.com" , "stable@dpdk.org" , "Ruifeng Wang (Arm Technology China)" Thread-Topic: [dpdk-dev] [PATCH v7 1/2] ring: add reset API to flush the ring when not in use Thread-Index: AQHU2t/X3hxWBTBOakC52QaVFHDc4Ka7N7AZgAw7AzCAAAbpgIAADIpQ Date: Fri, 12 Jul 2019 11:06:28 +0000 Message-ID: References: <20181212062404.30243-1-gavin.hu@arm.com> <1552620686-10347-2-git-send-email-gavin.hu@arm.com> <20190329141755.ziopuvhepdi372aa@platinum> <2965897.HCpMyYeHc3@xps> <20190712095339.kfuqskwok5r5j4nv@platinum> In-Reply-To: <20190712095339.kfuqskwok5r5j4nv@platinum> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3e19f6e5-d626-448e-92e6-07ae33975dbb.0 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 35383f81-ca4b-4d17-641b-08d706b8fd3c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB4303; x-ms-traffictypediagnostic: VI1PR08MB4303: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-microsoft-antispam-prvs: nodisclaimer: True x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 00963989E5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(346002)(366004)(376002)(396003)(13464003)(189003)(199004)(6246003)(55016002)(476003)(64756008)(66946007)(76116006)(305945005)(66556008)(2906002)(66476007)(52536014)(66446008)(74316002)(68736007)(3846002)(7736002)(6916009)(71200400001)(71190400001)(478600001)(446003)(6116002)(4326008)(229853002)(11346002)(6436002)(9686003)(86362001)(486006)(25786009)(186003)(33656002)(102836004)(54906003)(99286004)(256004)(76176011)(53546011)(6506007)(66066001)(7696005)(5660300002)(81166006)(81156014)(8676002)(8936002)(316002)(14454004)(55236004)(26005)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4303; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LoRFgLhTSp1wX2UB6Q6ENDTWhY6RnGMNIuPnYaYphKR7/aLX4MYRV4keIVd2IExE9vkQDRoctWj5RwAv+s16loNrAN6MJUqEoRthjDNXZPQkCrVedkK6R6jHLhxCJ6vKP7hdJz3ZMv9yLrceuj8VfT9a05LL91v0+dvGZYAC0YdE6JafYlXqwnfbBEbSJzOhA3q1XkpVtAcPgFM9DnYE8XzXJUOawguZ2U4IWkphFTCtfYT1BTX1neRUjGksT5c9M9pUoqqZUA1hRkPjZ6K+Kh1GAlfCtezABp1PTr7iEPQkB1ZD/M3vgn3HVvjSH7jJhDePLzAztex4bsWOVB/XaXL+rqQm470FGsQa8Ywoxxa9QhQjYlAws5HsZCeeEeO6SZ4lnbDfkuhTitzKRvBCrRnyLmKa2ZS85VjFHYUwIiw= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35383f81-ca4b-4d17-641b-08d706b8fd3c X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2019 11:06:28.5628 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Gavin.Hu@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4303 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v7 1/2] ring: add reset API to flush the ring when not in use X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Olivier, > -----Original Message----- > From: Olivier Matz > Sent: Friday, July 12, 2019 5:54 PM > To: Gavin Hu (Arm Technology China) > Cc: thomas@monjalon.net; dev@dpdk.org; nd ; > jerinj@marvell.com; hemant.agrawal@nxp.com; Nipun.gupta@nxp.com; > Honnappa Nagarahalli ; > i.maximets@samsung.com; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v7 1/2] ring: add reset API to flush the r= ing > when not in use >=20 > Hi Gavin, >=20 > On Fri, Jul 12, 2019 at 09:32:39AM +0000, Gavin Hu (Arm Technology China) > wrote: > > Hi Olivier and Thomas, > > > > > -----Original Message----- > > > From: Thomas Monjalon > > > Sent: Thursday, July 4, 2019 10:42 PM > > > To: Gavin Hu (Arm Technology China) > > > Cc: dev@dpdk.org; Olivier Matz ; nd > > > ; jerinj@marvell.com; hemant.agrawal@nxp.com; > > > Nipun.gupta@nxp.com; Honnappa Nagarahalli > > > ; i.maximets@samsung.com; > > > stable@dpdk.org > > > Subject: Re: [dpdk-dev] [PATCH v7 1/2] ring: add reset API to flush t= he ring > > > when not in use > > > > > > 29/03/2019 15:17, Olivier Matz: > > > > Hi, > > > > > > > > On Fri, Mar 15, 2019 at 11:31:25AM +0800, Gavin Hu wrote: > > > > > Currently, the flush is done by dequeuing the ring in a while loo= p. It is > > > > > much simpler to flush the queue by resetting the head and tail in= dices. > > > > > > > > > > Fixes: af75078fece3 ("first public release") > > > > > Cc: stable@dpdk.org > > > > > > > > > > Signed-off-by: Gavin Hu > > > > > Reviewed-by: Ruifeng Wang > > > > > Reviewed-by: Honnappa Nagarahalli > > > > > --- > > > > > --- a/lib/librte_ring/rte_ring_version.map > > > > > +++ b/lib/librte_ring/rte_ring_version.map > > > > > @@ -17,3 +17,10 @@ DPDK_2.2 { > > > > > rte_ring_free; > > > > > > > > > > } DPDK_2.0; > > > > > + > > > > > +EXPERIMENTAL { > > > > > + global: > > > > > + > > > > > + rte_ring_reset; > > > > > + > > > > > +}; > > > > > > > > To me, a static inline function does not need to be added in > > > > rte_ring_version.map (or is it due to a check script checking the > > > > __rte_experimental tag ?). I found at least one commit where it > > > > is not the case: > > > > c277b34c1b3b ("mbuf: add function returning buffer address") > > > > > > > > There are 2 options: > > > > 1- remove the rte_ring_version.map part of the patch. > > > > 2- change the static inline function into a standard function. > > > > > > > > I would prefer 2-, because it allows to keep an api/abi compat > > > > layer in the future. > > > > > > There are no news about this patch. > > > I classify it as changes requested. > > > > > Sorry for missed your comments for long time, I just submitted v8. > > I took the first option as it is in the data path and to keep consisten= t to its > neighboring functions. >=20 > Could you give a little more context about why you need to reset > the ring in the data path? I see that it is used in rte_hash_reset(), > but in my thinking, this was more used at init/exit. Sorry=1B$B!$=1B(Bliterally it is in the control path, but I was impressed i= t will impact the=20 Data path performance when discussing this patch with Honnappa.=20 >=20 > Thanks, > Olivier