From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130048.outbound.protection.outlook.com [40.107.13.48]) by dpdk.org (Postfix) with ESMTP id E47752C17 for ; Thu, 7 Mar 2019 11:44:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=72gFCFgT451mT+23vexF5dwhIA7QqKFCIek2n0Uw9dY=; b=VHUAUT761Rvheg3XPdp6PPbSAoX1MR3HQfDw6W4gBCoB8weQ30pSQTAih0TS8qHRkXFquB6quGO+8sZ0bRbP4OvUaMPX/x6LzI8PyXa0WdujX2xwBp1Y4UJoAe35p0AGmJ8kfRxLTQiqFi8NAP4ss1yhZE+6g3PFh0HMuuDc5sM= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB2688.eurprd08.prod.outlook.com (10.175.245.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Thu, 7 Mar 2019 10:44:44 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::707a:b455:dcb2:9d40]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::707a:b455:dcb2:9d40%2]) with mapi id 15.20.1665.021; Thu, 7 Mar 2019 10:44:44 +0000 From: "Gavin Hu (Arm Technology China)" To: Ilya Maximets , "dev@dpdk.org" CC: nd , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Nipun.gupta@nxp.com" , Honnappa Nagarahalli , "olivier.matz@6wind.com" , "bruce.richardson@intel.com" , "konstantin.ananyev@intel.com" , "chaozhu@linux.vnet.ibm.com" Thread-Topic: [PATCH v2] ring: enforce reading the tails before ring operations Thread-Index: AQHU1LF27vtsQ2Xy+0iZsAZL3+5RW6X/3LWAgAAItaCAAAb/gIAADMAQ Date: Thu, 7 Mar 2019 10:44:44 +0000 Message-ID: References: <1551841661-42892-1-git-send-email-gavin.hu@arm.com> <1551941137-33250-1-git-send-email-gavin.hu@arm.com> <3cdf6747-21f3-d77e-0935-d73b5cc617f6@samsung.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 4fc4c2e5-cb02-4a5b-271f-08d6a2e9e981 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB2688; x-ms-traffictypediagnostic: VI1PR08MB2688: x-ms-exchange-purlcount: 1 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-exchange-diagnostics: 1; VI1PR08MB2688; 20:Lwe1KZJp6Xu3dFCEoTL9OTVYmX/05mjIkTVjgyjP3x4caA971/7djrrKvTxB36QF9lSQtA/nXtE42qbODIB66cMDFz703J8NojGTZ/RLOItflvGKrxpXpdRaky1f5INbDAwt2H+dLVDtjDc6tsku99I8D4FgfvxVGH5DzCGHooQ= x-microsoft-antispam-prvs: x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(136003)(346002)(376002)(39860400002)(189003)(199004)(13464003)(2906002)(476003)(71190400001)(446003)(25786009)(55016002)(76176011)(9686003)(5660300002)(11346002)(186003)(33656002)(486006)(71200400001)(8936002)(8676002)(81166006)(81156014)(86362001)(93886005)(68736007)(99286004)(3846002)(305945005)(229853002)(7736002)(6116002)(2501003)(74316002)(4326008)(97736004)(6506007)(14444005)(26005)(478600001)(256004)(110136005)(966005)(6436002)(52536013)(53936002)(102836004)(54906003)(7696005)(55236004)(53546011)(105586002)(7416002)(72206003)(6306002)(14454004)(66066001)(106356001)(6246003)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2688; 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: Zt0HeEON2GE005w8IFyH1YuThEVOOT59lkPx0n5lhjGqHl621zzaAar1vR1RqdnjoLyTo2QCHlC28eXMMgHdXh+LmdjalGZkn4pwPW3dh2eGrTXW8Y17t4oXb4jJbBWqD8dsT2Fe4R0lcCBsjZZtd0kGf4MMzRFk0MnAb6sHEa5WOk4abmKuQdxoD7bNakd8kzcf/y06V3XNJVsRn5kT9IAFBkgAPOwEGdvgMDuLn5ITytHWnXJxR5uqCTme08ChbZA2j/cfg1r6PEwe/T6I13KRycUXgDpbkko5tI/6WVCrfxwuRyMmjDtAlyudlf3ho2JyhG92OsGhpc2FD+289tkjhgVZReHYJoOdi5UZxRenq7TP+EHBI8kvkfGFqQVAhfJTlAJK0NOo0xMtB4JDQJZqLDFP1d9vWdJJQnFMzu8= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc4c2e5-cb02-4a5b-271f-08d6a2e9e981 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2019 10:44:44.6778 (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-Transport-CrossTenantHeadersStamped: VI1PR08MB2688 Subject: Re: [dpdk-dev] [PATCH v2] ring: enforce reading the tails before ring operations 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: Thu, 07 Mar 2019 10:44:47 -0000 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSWx5YSBNYXhpbWV0cyA8 aS5tYXhpbWV0c0BzYW1zdW5nLmNvbT4NCj4gU2VudDogVGh1cnNkYXksIE1hcmNoIDcsIDIwMTkg NTo0OCBQTQ0KPiBUbzogR2F2aW4gSHUgKEFybSBUZWNobm9sb2d5IENoaW5hKSA8R2F2aW4uSHVA YXJtLmNvbT47IGRldkBkcGRrLm9yZw0KPiBDYzogbmQgPG5kQGFybS5jb20+OyB0aG9tYXNAbW9u amFsb24ubmV0OyBqZXJpbmpAbWFydmVsbC5jb207DQo+IGhlbWFudC5hZ3Jhd2FsQG54cC5jb207 IE5pcHVuLmd1cHRhQG54cC5jb207IEhvbm5hcHBhIE5hZ2FyYWhhbGxpDQo+IDxIb25uYXBwYS5O YWdhcmFoYWxsaUBhcm0uY29tPjsgb2xpdmllci5tYXR6QDZ3aW5kLmNvbQ0KPiBTdWJqZWN0OiBS ZTogW1BBVENIIHYyXSByaW5nOiBlbmZvcmNlIHJlYWRpbmcgdGhlIHRhaWxzIGJlZm9yZSByaW5n DQo+IG9wZXJhdGlvbnMNCj4gDQo+IE9uIDA3LjAzLjIwMTkgMTI6MjcsIEdhdmluIEh1IChBcm0g VGVjaG5vbG9neSBDaGluYSkgd3JvdGU6DQo+ID4NCj4gPg0KPiA+PiAtLS0tLU9yaWdpbmFsIE1l c3NhZ2UtLS0tLQ0KPiA+PiBGcm9tOiBJbHlhIE1heGltZXRzIDxpLm1heGltZXRzQHNhbXN1bmcu Y29tPg0KPiA+PiBTZW50OiBUaHVyc2RheSwgTWFyY2ggNywgMjAxOSA0OjUyIFBNDQo+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