From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB0B2A09FF; Thu, 7 Jan 2021 09:42:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA802140EF8; Thu, 7 Jan 2021 09:42:01 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id E9615140EF8 for ; Thu, 7 Jan 2021 09:41:59 +0100 (CET) IronPort-SDR: +E0CWC1bZvpI1RJffbdPmkMiCXF4DiD1/msRt9ClDfdJbgI7kShpIzKsdMbL9TxFJbR1v3vYD7 FqAE07yrLOaA== X-IronPort-AV: E=McAfee;i="6000,8403,9856"; a="157178417" X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="157178417" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 00:41:59 -0800 IronPort-SDR: /KwJoh0+/PpYgLxa072zlWlY3Ja6HyxRdl8/wXmNMyN3Jz+fynrcLa0sFDhhO1Cd2NAHh41LC0 Om9aQ5Lsg1DA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="395895602" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 07 Jan 2021 00:41:59 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 7 Jan 2021 00:41:58 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 7 Jan 2021 00:41:58 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 7 Jan 2021 00:41:58 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 7 Jan 2021 00:41:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XB0HJR495uy5KscZJdaFmkVjiO7LSBVrd0LaSv2npkDGMZUeqzFn52IfKwecvuMxSOecEzsVW+HCnfKdgheT8BQCulUbRAVtg+AB+D0ftHViNFXSBbjuM1vdr4oEKWwPg5/MZG0DPOJCu+Eju2jSrfzsB7DN5o/XTWp6wO4YKPyLTcOYrpZZpw8qOaF9G6lv0+VDYHC5S6QW0iPSpRNafPW+RYxDVuMnoCGjL23NPLmDmjXHcUFH4+GgdDx4oq3Kk/C9nlla6LHxlFVIdfEb9L6/K1BJZ6VSN4ftZ8HvHmy37L6b2/JRfPFLOKPGwY1RFNKT0nszp6dcid6a/xw8rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fk0onzkr1bzH7Wm/74TlagcBRZ6Vf8uLfpMOF0CdbQo=; b=Z+vCbmJK+jNmQavEkZ5TpE5tTf28P3WsmqD2HPIHZHHrs+L7dgnPZQ64MVn/2gRBqLsCDrmrPz2h39tyS8TSAoV0hWxU5bNA6hwjmAyRzYvFKb7UvZWLNJTEliahfldK90XYOp6goO4LjykHlA+fjagsiI2DNqKvq0loOIsqto1TzlR3wlf+E9t08GIaW/RccgRk32GkSx7MtQz+Amtda2C/Ywb/SeqPwdbsnK5mAVVfr4BPCrKh24wbTKcq7jtSK4cT++XnpNRWZqpC85L3UEgiSNlDvwLCHaYT8TnvspcR9StoIz0hUTqc9SQbb85DYC3WABaqBGMe9tVNBsX/Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fk0onzkr1bzH7Wm/74TlagcBRZ6Vf8uLfpMOF0CdbQo=; b=pwovT4DMkkvAHu9sdyJx0wXfPt6WCimCzQAqlNE14Asfmclhm3DI1kz1CG/49+hWcLiQhdgJwUgos6zYZsH/RK6OG6VzI7RyJEMSHK7kMsbZ9Nt+y46NfNJN4xx1qoiJoOcjjxDro01nquFXSN8qvZ0Lp919DXZGCBEscOq+GvA= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3870.namprd11.prod.outlook.com (2603:10b6:208:152::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19; Thu, 7 Jan 2021 08:41:57 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::74f2:ba7f:cb22:5272]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::74f2:ba7f:cb22:5272%7]) with mapi id 15.20.3721.024; Thu, 7 Jan 2021 08:41:56 +0000 From: "Xia, Chenbo" To: "Xing, Beilei" , "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" CC: "stephen@networkplumber.org" , "Liang, Cunming" , "Lu, Xiuchun" , "Li, Miao" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH 4/8] emu/iavf: add vfio-user device register and unregister Thread-Index: AQHW1RRzYrm+FHhQM0OvclGy7QHHI6ob4IgAgAACNlA= Date: Thu, 7 Jan 2021 08:41:54 +0000 Message-ID: References: <20201218074736.93999-1-chenbo.xia@intel.com> <20201218074736.93999-5-chenbo.xia@intel.com> In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.39] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 66db7e99-41bb-494c-5c59-08d8b2e81789 x-ms-traffictypediagnostic: MN2PR11MB3870: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: h4oEb4NJ5BkIB0amc324nLC3XpEjturQoVAKgmyAixCVrQ2TPhIA/8uaSqIsP+4rnpiEjXOc9VkS1pSij0t9xjoqeUcewuopiP8LtWKnMxnV+EYLJUxRZCd39chbOXCKoPEhWGckWgosJRIVflAtplZrVUC35rKx3inl56WCUXyv3yE5gCJoKa0oK57GSXpOuhoJdmOxwPJnHDPdlajEeSKv0u1kIknHtMMBZxK58HQACPl/lbVXVvHbpVA6l+17raiLJ5uh2rgYvCOKdzA4nRWTsXwf42cILJG9TvFQ8ZSPOZ98Oq1cGIVvJQNZ6ERsqQqjni9zeil1flG0AcZksmdvNsB9/ZNZLFo/7A2YQujK/DAACUQb0aucD05KC0XTIfzdtgHRi7Unm9Q9xV9U8JEQsvVoVQnj1pnmParjSDurIq+Sy+fCEKKwfIU1c+OY x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(136003)(396003)(376002)(39860400002)(107886003)(54906003)(110136005)(316002)(86362001)(64756008)(66476007)(66946007)(66556008)(66446008)(6506007)(83380400001)(2906002)(71200400001)(52536014)(76116006)(5660300002)(55016002)(186003)(8936002)(9686003)(53546011)(478600001)(33656002)(26005)(4326008)(7696005)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?utf-8?B?V3hDUVJiMVphQlBiOFZXZGV3YitzZ1p4MDhrb1R1dFFMc0IrTmlYZUN2UWp6?= =?utf-8?B?MW5Gbm52cjA3cGNBOWFNRWtNY0svTllwZWxZUnNXK0tkMlU4UWhzTHFKdWxI?= =?utf-8?B?SHRubEFmeUVodTE1SHpYSEE5U0l5aXpNZy8wODFMQ0F5R0d1Wkx5eWZaWExq?= =?utf-8?B?WFpMYnl5aC82czFuTWFYTC9teTJmNjlObDU2WlVwbU9pQ25weWRhTEw3NHJt?= =?utf-8?B?VkErMWxBQ1d6akdEVmVFSXpsd0NycURiSk95Y3BDTk9rQS9XaVVTZGNHbm9r?= =?utf-8?B?WlRMSnRLcmV2V3VJWUZYMm50cHlpalJzZFMxWmZDNXp1TGIzSDZoc1pDaFFD?= =?utf-8?B?Q01nV24zOEo3WE9aNUJZdndTNGJDb0NwbnlGc1ljbEVIZW0vcFg2WllVMVZ6?= =?utf-8?B?elZ1dEtSTEdMd01XVCtKQytmY0pkYmZzdXpITDZHb2xrT2s0SWd2SGdiOEhK?= =?utf-8?B?RzhOeDRIcG9UdUs0YWpwZGJMdVpWbFIwK0JUd1VxZjYvLzVuZUd5MFh1MGhw?= =?utf-8?B?WGpacy8xa05NSVM3WEFoUGVYVnlIazFKK0M1d2REVGpkOHhMZVc4aTBYVStp?= =?utf-8?B?M1JnMThvMnM2Y1VrRWNjZHBmbkdkQjJhR0MvY3RxWVYwZVV0SkkvdUJKQ0N1?= =?utf-8?B?TDJaMTNadEMxeFA1RnR1cThya2dJaGlaZUtCK0lsdUlGYkd6dkxabTZjSmxq?= =?utf-8?B?SU9JMXRCQ21iUkRLN3cwRmFueHBzRjA2SjQwQzZDL1hVcHU0QXdvRklyM0xR?= =?utf-8?B?cGFHck9RSTRrdDdPNVN5ZExVWjJEeTJLYmt2M1BsaGFNaER2RGpWZTh1UDNt?= =?utf-8?B?c0Y1aXdOVzIxUlRRSXpwN253T01Ba3hoYitFRmt6OXovOUZhSFlzYy9KSTJL?= =?utf-8?B?QWRxNDdVcUZ6dmZUdWt5TGtJT2tDemI0cWZ4UFZhVjVGMXR4bTdtRUVPR3B5?= =?utf-8?B?ejRiQ2Q1MkwrMXE5dDlOTm4zZWJvamkrdkQ1bG04cnh5QUthZndkQkJDdnB6?= =?utf-8?B?VXR6WmdXNFh3NzJpZ0dWU1RKUFRKaVRKaWt4YmZKcHBoNDhaSVZlQkFnb0x0?= =?utf-8?B?eDlCVU9MMHZSK0VaM0hNVWd6NVRhWjRtbHE0U2J6ck9BSEZ0UTVkOFcyaExO?= =?utf-8?B?cG5zUU9Bd2szR2xCb1p5T3pwbVJreHlUazVSMTlmTTFoaGlkRjZ5VWkrSEw0?= =?utf-8?B?UUF0UW11WVpiRW1Zb3krUVFuemtEWHBSdjgySUEvYU9WZWhqbGRZM3o1NFdi?= =?utf-8?B?S2V1Z0k5OUNFQXU5elZzd2tSR3FweXViVFNWcGJCSzVuaGFibUwvUjR1Z2I0?= =?utf-8?Q?ls7+Uh40g1esk=3D?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66db7e99-41bb-494c-5c59-08d8b2e81789 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2021 08:41:56.3613 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: x4/4EEoOo2kIOvNk/Hk2HHvMJt+KADqCS5twIuHl9UWhCmOZElQfPwLc95z9Q2+nLQ9+CnnhN6L7LCHkDxfMSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3870 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 4/8] emu/iavf: add vfio-user device register and unregister X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGkgQmVpbGVpLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IFhpbmcs IEJlaWxlaSA8YmVpbGVpLnhpbmdAaW50ZWwuY29tPg0KPiBTZW50OiBUaHVyc2RheSwgSmFudWFy eSA3LCAyMDIxIDM6MTkgUE0NCj4gVG86IFhpYSwgQ2hlbmJvIDxjaGVuYm8ueGlhQGludGVsLmNv bT47IGRldkBkcGRrLm9yZzsgdGhvbWFzQG1vbmphbG9uLm5ldDsNCj4gZGF2aWQubWFyY2hhbmRA cmVkaGF0LmNvbQ0KPiBDYzogc3RlcGhlbkBuZXR3b3JrcGx1bWJlci5vcmc7IExpYW5nLCBDdW5t aW5nIDxjdW5taW5nLmxpYW5nQGludGVsLmNvbT47IEx1LA0KPiBYaXVjaHVuIDx4aXVjaHVuLmx1 QGludGVsLmNvbT47IExpLCBNaWFvIDxtaWFvLmxpQGludGVsLmNvbT47IFd1LCBKaW5namluZw0K PiA8amluZ2ppbmcud3VAaW50ZWwuY29tPg0KPiBTdWJqZWN0OiBSRTogW2RwZGstZGV2XSBbUEFU Q0ggNC84XSBlbXUva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