From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A2BE91B720 for ; Wed, 31 Jan 2018 09:42:39 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 00:42:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,438,1511856000"; d="scan'208";a="14780032" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 31 Jan 2018 00:42:38 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 31 Jan 2018 00:42:38 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 31 Jan 2018 00:42:37 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.127]) with mapi id 14.03.0319.002; Wed, 31 Jan 2018 16:42:35 +0800 From: "Chen, Junjie J" To: Maxime Coquelin , Victor Kaplansky CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5] vhost_user: protect active rings from async ring changes Thread-Index: AQHTmmtT/zZ9LW6gokOOANd026BqG6ONqegA Date: Wed, 31 Jan 2018 08:42:34 +0000 Message-ID: References: <20180117154925-mutt-send-email-victork@redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDEyYmI5ODYtZTI1Yy00M2JiLTlmYjktYTlhNzU2MTljOWFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ1aVMzY2pQTW5mTTdLQlkyZU5hUHhnTzJsaFUyVDJCbnZWRHJ5Vk1kcjBGd2dZajJpVGVMalZGMnRKdHp0TXJQIn0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5] vhost_user: protect active rings from async ring changes 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: Wed, 31 Jan 2018 08:42:40 -0000 TWFrZSBzZW5zZSwgVGhhbmtzLg0KDQpDaGVlcnMNCkpKDQoNCg0KPiAtLS0tLU9yaWdpbmFsIE1l c3NhZ2UtLS0tLQ0KPiBGcm9tOiBNYXhpbWUgQ29xdWVsaW4gW21haWx0bzptYXhpbWUuY29xdWVs aW5AcmVkaGF0LmNvbV0NCj4gU2VudDogV2VkbmVzZGF5LCBKYW51YXJ5IDMxLCAyMDE4IDQ6MTMg UE0NCj4gVG86IENoZW4sIEp1bmppZSBKIDxqdW5qaWUuai5jaGVuQGludGVsLmNvbT47IFZpY3Rv ciBLYXBsYW5za3kNCj4gPHZpY3RvcmtAcmVkaGF0LmNvbT4NCj4gQ2M6IGRldkBkcGRrLm9yZw0K PiBTdWJqZWN0OiBSZTogW2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