From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00043.outbound.protection.outlook.com [40.107.0.43]) by dpdk.org (Postfix) with ESMTP id C67332C17 for ; Thu, 7 Mar 2019 07:50:08 +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=ckLzdRWDm34FVmsRGxbD2BUixxOz+U4dsinHgIrM4sc=; b=OvydlKkf/YjrlKHYmBYp8rIyBYgcAkKnSGig3i1IQJau8nYWXU3MRRdrspWgX+e1/DrqPDB0AzS/siEeKJGB65WsQ6Ppgtled2QKkmY0iXThp/is097UU9NLslYCPC1hzGFOidcSUYpLweXeTrAnJyQ3DgvFlOdKTHigVmm++lg= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB2896.eurprd08.prod.outlook.com (10.170.239.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.17; Thu, 7 Mar 2019 06:50:06 +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 06:50:06 +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: [v1] ring: enforce reading the tails before ring operations Thread-Index: AQHU1BKccix9Ie0tqkqWqY0zzxg5DKX/qS0A Date: Thu, 7 Mar 2019 06:50:06 +0000 Message-ID: References: <1551841661-42892-1-git-send-email-gavin.hu@arm.com> <572899c3-f7cd-77a9-8f60-50e117967678@samsung.com> In-Reply-To: <572899c3-f7cd-77a9-8f60-50e117967678@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: 25d2096f-5ac8-47a9-c65c-08d6a2c92213 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:VI1PR08MB2896; x-ms-traffictypediagnostic: VI1PR08MB2896: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-exchange-diagnostics: 1; VI1PR08MB2896; 20:c+94f+sG/Q14ojzh0Seajjbgm6niQpZVYg4pTwdZCMQZKURBMbSCV7OG0AopPbDoMJ4+EFS1AnBosOTUoTreZ5EaVPA1Bx/g3Fw7l9/ACSsGs+VQPFgC/+rnK77qLR8U3MWKsNK3QMxvm9dj7X2ExiCMWn4Hb87DwnqednMIuUk= x-microsoft-antispam-prvs: x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39850400004)(136003)(346002)(366004)(13464003)(189003)(199004)(54906003)(14444005)(256004)(71200400001)(486006)(71190400001)(2501003)(2906002)(81156014)(11346002)(446003)(186003)(52536013)(5660300002)(26005)(72206003)(102836004)(76176011)(53546011)(55236004)(6506007)(25786009)(14454004)(476003)(316002)(66066001)(110136005)(99286004)(478600001)(8936002)(4326008)(305945005)(106356001)(74316002)(7696005)(7736002)(97736004)(229853002)(8676002)(68736007)(6116002)(105586002)(55016002)(33656002)(3846002)(9686003)(6246003)(53936002)(86362001)(6436002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2896; 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: ao08fHMAzlIH/qrdGKr8zhOD9tFrsVHuY0r+a4vg7acvirOfjJkTSRVeFNLx1kZDvxkXzTOcVlALAw2ifLQwkws1azWTMbZFEM/MtAf/j95Zf/auRB0gqAr2qnimuJdKtvKcQDQIaJjZ6aNluQ76NntlGzcfeVrsB3cvEhPxI71rTOypLkDMxV1fjI+63Gryw6o4EdogUNWP3cSbiqBEhxVOUYS8ROzFK0zFOs2SlkbMH0TIPEu2VoB+6hoBouu9++uFJYm8daXXosPLUV1ENRdU8tSToQp1ogO1dnrVjcEegXeYDcWtkFPvdOtEMAPnSzJBc4JxsibIZfGIIiRJ6pt6+ydM+lWNsNlKqMXT1dMmQmeHBzWi8Xt2K1FyCc8PQLSeTQPLgGXUB1fxuREpYFvEQfuOrf/TV5pcmzDmdgM= 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: 25d2096f-5ac8-47a9-c65c-08d6a2c92213 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2019 06:50:06.1420 (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: VI1PR08MB2896 Subject: Re: [dpdk-dev] [v1] 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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