From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130040.outbound.protection.outlook.com [40.107.13.40]) by dpdk.org (Postfix) with ESMTP id 8D527201 for ; Thu, 7 Mar 2019 10:27:48 +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=2dp5Wobkh7Fm5llLcjONkz+B5gsRnU+nt7zWMQTrZ7E=; b=ZCkmTl1O03mZ8vjR50R1SOtugU36Z6x9ERL1sw+K9bRofisfY3nmtF2RRmCCrH0sGJZTJPmckhllRzswn3wx0QtXboGAUfIH47aoZQvU786yRz00ygsCmQHrTL6Pnh8OAoFe/KrEQgVOPIin88FbsGkri2mVdmvCKkoi/yPilkc= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB4589.eurprd08.prod.outlook.com (20.178.13.84) 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 09:27:46 +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 09:27:46 +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" Thread-Topic: [PATCH v2] ring: enforce reading the tails before ring operations Thread-Index: AQHU1LF27vtsQ2Xy+0iZsAZL3+5RW6X/3LWAgAAItaA= Date: Thu, 7 Mar 2019 09:27:46 +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: <3cdf6747-21f3-d77e-0935-d73b5cc617f6@samsung.com> 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: 1bf76779-770d-4b07-659f-08d6a2df28c5 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:VI1PR08MB4589; x-ms-traffictypediagnostic: VI1PR08MB4589: x-ms-exchange-purlcount: 1 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-exchange-diagnostics: 1; VI1PR08MB4589; 20:SMOnor544UnCvH+Jjr0sFiT5PsW9UirCGnKkrJLgUtziX9TAezFK7oJMEb+5pVhvSfrNkMM18BwioS4fLK6RKtsOrb7hekH829XLDmNkSFrCcpVRv65xMFYlNOFQuuiiAtCYF8FVRyzJmVU70d/j/aSLNNlm+xyU5IKkh9FSppw= x-microsoft-antispam-prvs: x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(39860400002)(136003)(376002)(13464003)(189003)(199004)(8936002)(76176011)(256004)(68736007)(6116002)(186003)(54906003)(72206003)(3846002)(478600001)(316002)(66066001)(6506007)(102836004)(81156014)(81166006)(105586002)(53936002)(14454004)(106356001)(55236004)(97736004)(966005)(6246003)(8676002)(5660300002)(86362001)(110136005)(53546011)(52536013)(446003)(33656002)(229853002)(486006)(55016002)(476003)(93886005)(11346002)(7696005)(26005)(99286004)(6306002)(9686003)(2906002)(71190400001)(2501003)(25786009)(305945005)(7736002)(74316002)(4326008)(6436002)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB4589; 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: QGVXMpRnJ1dFQs0jnHaetBpnykVIDJI9XGX6n3H0gPcRvFXxbhLADWa9qujgG6klYwFQMn9GXmmDbebcbZ0IPxhmMqOH3idkJBeLdf1V9O/EZFW46Ig/v2M5XFqvxxRQn7v9T0zvstareZjcAuYq8JGSZkxVQjoKTbYMkz73C6zqMNCZekHb7mRB2ZF3EjH6vOH+/iewg8pOIGQZhHJ5FMH6ZPekZQ3sf+QZndWw06fRaLbnSTi2ZSM6qqIr6VHZedbKdRr7fE0yi44KvwUBz/rINTG6yFpnvWG5VDrjAS3qPT/C+WfgVACfgFjtf1SqhzfVAuHXSOY84VTrvoTC+PJXwcU8VaOqGuzTNY21raTqSosfIaRB1C8cZF/vO4qAJal15eBAwBmBLKutNmLJJh99p+0cwTp91+t5ExvFsmA= 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: 1bf76779-770d-4b07-659f-08d6a2df28c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2019 09:27:46.3825 (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: VI1PR08MB4589 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 09:27:48 -0000 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogSWx5YSBNYXhpbWV0cyA8 aS5tYXhpbWV0c0BzYW1zdW5nLmNvbT4NCj4gU2VudDogVGh1cnNkYXksIE1hcmNoIDcsIDIwMTkg NDo1MiBQTQ0KPiBUbzogR2F2aW4gSHUgKEFybSBUZWNobm9sb2d5IENoaW5hKSA8R2F2aW4uSHVA YXJtLmNvbT47DQo+IGRldkBkcGRrLm9yZw0KPiBDYzogbmQgPG5kQGFybS5jb20+OyB0aG9tYXNA bW9uamFsb24ubmV0OyBqZXJpbmpAbWFydmVsbC5jb207DQo+IGhlbWFudC5hZ3Jhd2FsQG54cC5j b207IE5pcHVuLmd1cHRhQG54cC5jb207IEhvbm5hcHBhIE5hZ2FyYWhhbGxpDQo+IDxIb25uYXBw YS5OYWdhcmFoYWxsaUBhcm0uY29tPjsgb2xpdmllci5tYXR6QDZ3aW5kLmNvbQ0KPiBTdWJqZWN0 OiBSZTogW1BBVENIIHYyXSByaW5nOiBlbmZvcmNlIHJlYWRpbmcgdGhlIHRhaWxzIGJlZm9yZSBy aW5nDQo+IG9wZXJhdGlvbnMNCj4gDQo+IE9uIDA3LjAzLjIwMTkgOTo0NSwgZ2F2aW4gaHUgd3Jv dGU6DQo+ID4gSW4gd2VhayBtZW1vcnkgbW9kZWxzLCBsaWtlIGFybTY0LCByZWFkaW5nIHRoZSB7 cHJvZCxjb25zfS50YWlsIG1heSBnZXQNCj4gPiByZW9yZGVyZWQgYWZ0ZXIgcmVhZGluZyBvciB3 cml0aW5nIHRoZSByaW5nIHNsb3RzLCB3aGljaCBjb3JydXB0cyB0aGUgcmluZw0KPiA+IGFuZCBz dGFsZSBkYXRhIGlzIG9ic2VydmVkLg0KPiA+DQo+ID4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