From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40077.outbound.protection.outlook.com [40.107.4.77]) by dpdk.org (Postfix) with ESMTP id 2493F1B13F for ; Fri, 8 Mar 2019 06:27:33 +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=naemQa8VsZJm7wxduiWkfi9URfOtRt7Uslyi/QWDXwM=; b=FJFyeom/urYo/OINvdKXkBF+44yVGw5ZdbIRDOC73kmi+z/wOBj5NqwA4Z26wPtmj/+vWbPsR0ZdirteR5X3h19/XTP69UYwmrCgOYXxak5v50H16OJNfFQuo4FKE8knZ5fCG3X+m1Ap8mHiOaSr/HExVjTlL7BkI2a3L0JV1P8= Received: from DB7PR08MB3163.eurprd08.prod.outlook.com (52.134.110.149) by DB7PR08MB3420.eurprd08.prod.outlook.com (20.176.238.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Fri, 8 Mar 2019 05:27:31 +0000 Received: from DB7PR08MB3163.eurprd08.prod.outlook.com ([fe80::106f:8670:d85b:1b76]) by DB7PR08MB3163.eurprd08.prod.outlook.com ([fe80::106f:8670:d85b:1b76%3]) with mapi id 15.20.1686.019; Fri, 8 Mar 2019 05:27:31 +0000 From: "Gavin Hu (Arm Technology China)" To: Honnappa Nagarahalli , "Ananyev, Konstantin" , Ilya Maximets , "dev@dpdk.org" CC: nd , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Nipun.gupta@nxp.com" , "olivier.matz@6wind.com" , "Richardson, Bruce" , "chaozhu@linux.vnet.ibm.com" , nd Thread-Topic: [PATCH v2] ring: enforce reading the tails before ring operations Thread-Index: AQHU1LF27vtsQ2Xy+0iZsAZL3+5RW6X/3LWAgAAItaCAAAb/gIAADMAQgAAMP4CAAQ0wgIAAFJEw Date: Fri, 8 Mar 2019 05:27:31 +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> <2601191342CEEE43887BDE71AB97725801365527AC@irsmsx105.ger.corp.intel.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: aad01aeb-4d5f-4c3e-4148-08d6a386c357 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:DB7PR08MB3420; x-ms-traffictypediagnostic: DB7PR08MB3420: x-ms-exchange-purlcount: 1 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-exchange-diagnostics: 1; DB7PR08MB3420; 20:DLEO3suGzT1MJk4XdVBlFpl+BCTzMRp6BIPoIMRY+qJFtBNT1WiBlLgV3c9Sl8qdTXdOIdhazpw3DSCQece5CHLzggqHeSxJaJ5nqOVYXQOCG7ZitlwdOO7Iiw6yYIci3msDFUXm07vPU73BE8oCGrohn7/K1ukE5dqD0748dl4= x-microsoft-antispam-prvs: x-forefront-prvs: 0970508454 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(396003)(39860400002)(136003)(366004)(376002)(346002)(13464003)(199004)(189003)(81166006)(5660300002)(4326008)(93886005)(81156014)(7696005)(97736004)(76176011)(8676002)(7736002)(74316002)(316002)(305945005)(99286004)(52536013)(7416002)(110136005)(6436002)(6116002)(229853002)(9686003)(6246003)(6306002)(53936002)(25786009)(55016002)(3846002)(2501003)(54906003)(446003)(105586002)(476003)(33656002)(478600001)(86362001)(11346002)(14444005)(256004)(71190400001)(102836004)(2906002)(72206003)(68736007)(966005)(14454004)(26005)(55236004)(71200400001)(53546011)(186003)(8936002)(6506007)(66066001)(486006)(106356001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR08MB3420; H:DB7PR08MB3163.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-message-info: qfeWGe5CEA1Hemw4R6Me7BP1rImg4HgmYExhlg8lWNkFGE4UeYfzZbVkJMZRZyfmMIKfyqw3YX1Kix7EgWBf7J6YcLT+SJ5rjP8yvPO2ICCsSw+9V9ENchWAmw9Ddy9JURxskE23RmfjixxKPWqoAwFdyQeRgyIIBkvSQI8kcSn5JVcFCSxS+egrZiskF7mDzlTeWpwz2Xe8y4O0PByQlUqwg87UEAP+eOLRHL3Z0s9UK2UR7ZqZKAszqYISb49yT1yIacNTQQ/V+VTiKN2hHGKWZno86f/AjNf2ze1VVoBTT3UdBzrxf4AZXx6zEIpg5Jrqp+O+Erj8ypvkPTwxF5BcRagfm3zebieX14dmPTrXF1tr7x+vx2c6pLT51gcujsu8+skMElgDtlF4J+40HvtOqIc+vijJNLUeBVssSuQ= 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: aad01aeb-4d5f-4c3e-4148-08d6a386c357 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2019 05:27:31.6413 (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: DB7PR08MB3420 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: Fri, 08 Mar 2019 05:27:33 -0000 SGkgS29uc3RhbnRpbiwNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBI b25uYXBwYSBOYWdhcmFoYWxsaSA8SG9ubmFwcGEuTmFnYXJhaGFsbGlAYXJtLmNvbT4NCj4gU2Vu dDogRnJpZGF5LCBNYXJjaCA4LCAyMDE5IDExOjIxIEFNDQo+IFRvOiBBbmFueWV2LCBLb25zdGFu dGluIDxrb25zdGFudGluLmFuYW55ZXZAaW50ZWwuY29tPjsgR2F2aW4gSHUgKEFybQ0KPiBUZWNo bm9sb2d5IENoaW5hKSA8R2F2aW4uSHVAYXJtLmNvbT47IElseWEgTWF4aW1ldHMNCj4gPGkubWF4 aW1ldHNAc2Ftc3VuZy5jb20+OyBkZXZAZHBkay5vcmcNCj4gQ2M6IG5kIDxuZEBhcm0uY29tPjsg dGhvbWFzQG1vbmphbG9uLm5ldDsgamVyaW5qQG1hcnZlbGwuY29tOw0KPiBoZW1hbnQuYWdyYXdh bEBueHAuY29tOyBOaXB1bi5ndXB0YUBueHAuY29tOyBvbGl2aWVyLm1hdHpANndpbmQuY29tOw0K PiBSaWNoYXJkc29uLCBCcnVjZSA8YnJ1Y2UucmljaGFyZHNvbkBpbnRlbC5jb20+Ow0KPiBjaGFv emh1QGxpbnV4LnZuZXQuaWJtLmNvbTsgbmQgPG5kQGFybS5jb20+DQo+IFN1YmplY3Q6IFJFOiBb UEFUQ0ggdjJdIHJpbmc6IGVuZm9yY2UgcmVhZGluZyB0aGUgdGFpbHM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