From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id CA4FD8D94 for ; Mon, 16 Apr 2018 14:44:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2018 05:44:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,459,1517904000"; d="scan'208";a="37724689" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 16 Apr 2018 05:44:16 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Apr 2018 05:44:16 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Apr 2018 05:44:16 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.146]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.239]) with mapi id 14.03.0319.002; Mon, 16 Apr 2018 20:44:14 +0800 From: "Wang, Xiao W" To: "Burakov, Anatoly" CC: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "Wang, Zhihong" , "Bie, Tiwei" , "Tan, Jianfeng" , "Liang, Cunming" , "Daly, Dan" , "thomas@monjalon.net" , "Chen, Junjie J" , "Yigit, Ferruh" Thread-Topic: [PATCH v7 2/5] vfio: add multi container support Thread-Index: AQHT1M9aBwV8HJ3dmE2l6Wvd7gRBgaQCpHmAgACx+YA= Date: Mon, 16 Apr 2018 12:44:13 +0000 Message-ID: References: <20180412071956.66178-2-xiao.w.wang@intel.com> <20180415153349.62105-1-xiao.w.wang@intel.com> <20180415153349.62105-3-xiao.w.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWM2MmFlMjgtZmRkNC00ZWUwLTliOTEtMmUyNzAxOWVhYTlkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJuYUJQUWNRZTB6Zk5nZTYyU1wvZ3ljWGRnUkZBdlYyMnFITkZ5RUJ5dUZtdVV1MmRRdHlYWTE5czVNU3pjSjMyRiJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 v7 2/5] vfio: add multi container support 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: Mon, 16 Apr 2018 12:44:18 -0000 SGkgQW5hdG9seSwNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBCdXJh a292LCBBbmF0b2x5DQo+IFNlbnQ6IE1vbmRheSwgQXByaWwgMTYsIDIwMTggNjowMyBQTQ0KPiBU bzogV2FuZywgWGlhbyBXIDx4aWFvLncud2FuZ0BpbnRlbC5jb20+OyBZaWdpdCwgRmVycnVoDQo+ IDxmZX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