From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6A47BA0518; Fri, 19 Jun 2020 15:11:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BBAD1BEB0; Fri, 19 Jun 2020 15:11:06 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70085.outbound.protection.outlook.com [40.107.7.85]) by dpdk.org (Postfix) with ESMTP id 1DB541BEA8 for ; Fri, 19 Jun 2020 15:11:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ApOwo9GgvONgsFT6khZ0fN9fB6Tp+ROpOROO91MLeIPCM+QgFggpyG+fIYbyRQOkNT0f/fSf8hFCxvf6A2GdDWwd3pKy9LUSbVYa4Z8HGM2NM3NRTpLwyHYQ8KZNU91OXDsUXjoTbN2iSaLnaGkBDLeLGgs7fd3atbpIO5vFGHbmNqB2L4Sp1W4ZjZBai9g+DtcQ2rXCiTt/eYisoYe/g6s0ScLv4YzdMmWZRZmYdy9RJBMdTaAUbRJxyu7+fRCWbY5vh9QSma/4d+Mn223aQAY/K5Qkk3VqtJ+UYU/jlyNQlxgbi1oLZiBYuLFfqIrlYyna9zhcpgIT7YVEejMJfg== 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=H6XPZsuObdhmWKCoUlsS2NdyucuBbiWOam0mXTWyS2s=; b=eRYl2gEtJwHTQYVh3drcdTcFHD3X2Ss7y7ckeiDrIYofFN9pcKDCC+mrMegKlbYLgnqBIm0Gm12RCZR7NWhqUepNUTP3l5RH/bCOjnKCC0FQGR6JpurVoDcOYNNPSXCvmR0pGPa73xg2NpsjympGQ6Aai94sh29Lxf5JajOH0qsYByoPKhGN9Y9twF5f4IpS6QuB3puddJ+QapdPV/7bj66B3ZFqi7ju5pb+kVqOWq2tgg2sE0YljUycuMdYjvibH/5cEW3onc2/Fw1GPxNfPB5t7PY3CkaYk7wuM2Er8SwZ4GlXZTXGNVmxUzgD1adJHUMJCKLSAJtD1fToiMF3gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H6XPZsuObdhmWKCoUlsS2NdyucuBbiWOam0mXTWyS2s=; b=ZR9aCclqiKm2C40aOrItwy5iuyOD5UzojZmSS18llVNX1GeI5NkK8xgvdrPjWsK1UFBJMrmAknjCoF3BkXcx1+4LJAjCDI+5u58dR+lBk0ZkRO9OZc0ZCOtCyKHLRWy6WE9IO/4QQ4yMrvnXQyQ5jKsu7v3mEgBFJZ3KIIC0ZTk= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (2603:10a6:208:f::11) by AM0PR0502MB4067.eurprd05.prod.outlook.com (2603:10a6:208:b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Fri, 19 Jun 2020 13:11:03 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::b189:d782:4c74:7998]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::b189:d782:4c74:7998%7]) with mapi id 15.20.3109.021; Fri, 19 Jun 2020 13:11:03 +0000 From: Matan Azrad To: Maxime Coquelin , Xiao Wang CC: "dev@dpdk.org" Thread-Topic: [PATCH v1 3/4] vhost: improve device ready definition Thread-Index: AQHWRY1+WLgdYR0e1E+Ph0x8zoCWqqjfjwYAgAA4hqA= Date: Fri, 19 Jun 2020 13:11:02 +0000 Message-ID: References: <1592497686-433697-1-git-send-email-matan@mellanox.com> <1592497686-433697-4-git-send-email-matan@mellanox.com> <631a3cf3-f21a-b292-b475-93552d8f73e8@redhat.com> In-Reply-To: <631a3cf3-f21a-b292-b475-93552d8f73e8@redhat.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [2a02:ed0:53f7:cf00:6029:8d06:f641:39c] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7a83a75b-70b5-467c-7f86-08d8145237e6 x-ms-traffictypediagnostic: AM0PR0502MB4067: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0439571D1D x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gsbCHdXCLlWZ9l05yiwYAP5ibO4PqdrJXly5MDWV7Zr81m++e4IDKOLqZdnj+GA6bADIGhArvU7ccDvwgkz1NrV3CVD54SA0wU0sYlq0wFXeaKtQLbZmwAItQyaL/KfH4KWEwvqMMB7vX1GxRDRuQGPaLyZLHVAkO+hIeeVhVU7mt1EVcGyhLvXzaJMuNUc1Z+K76dMlQa6GVcILo3VjD3v0xcsc/XCI3ie3vtTJoJ5QztukGz1JDN/+udr2vPZHixvSCRmeJx9renW/osbEHUnUveoYsnPT9AGPQ4rn5axXZRtZwfszRKoG+OTLKji8rWA0775joZ+2b041Pjmzlg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(136003)(376002)(346002)(366004)(66476007)(66946007)(5660300002)(64756008)(66556008)(66446008)(86362001)(8676002)(7696005)(55016002)(186003)(9686003)(76116006)(33656002)(2906002)(4326008)(6506007)(53546011)(71200400001)(83380400001)(110136005)(316002)(478600001)(8936002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: DcXpnQCf2i3CcI04y6w0H9Mm4KaPQ0OknDOrP4CC5aDjkoLpfS+Ct6Hx5g8wekR7Sbr70CpVdirmcw1ulDo/qfzMBjl/xwHx58oTgvspGAeaFDOVw3TMmhLS1+LFhHzzB+ZJRTPwxynJjn+EMsjiOwDItU+uH/PnJvnZAcrcWwf0DJOM6JvgNY50mzyRs8OlODfjOXBuXNze9lWpf4w4yCJCpLRKL3KDPq2UUbiiqQwMQWwNrfQAYNfK8x6hQnVe+gvQzYf1vPpPs1wBCVXGjKuQtFbnrhiIQZyYCwvN5fuYd9e00k7NcbFEukDFF31fHRykx/6/o4sO8HeD8NCvyAeEJ2xSEOclVw7nfIEF376HP0Q9kmCtDabeqZXJul1keEolw7V14YbtF9wPL62g9mOFDnmydhoxaweu8vuAtIE3z1A9LmeBBG9pFW1ZOnwRRcMj1wNv/7h+E4UcpuVnFyeE5AFFz/nUTiVsF4AKdMFp+04eOCALHlAp9JjsC1DvM4lVVOVERsQPh5Pi4h02vKMge3QNEzNJHS4k3CDnDEo= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a83a75b-70b5-467c-7f86-08d8145237e6 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2020 13:11:02.8772 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Q22ti9xaglzl93EMjTKiMkJyGR5DM1JvAwCzNy33QL4aReqGUO47+nnBwtNEQjWByCI920yCtOSHCiZyoYPy1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4067 Subject: Re: [dpdk-dev] [PATCH v1 3/4] vhost: improve device ready definition 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGkgTWF4aW1lDQoNClRoYW5rcyBmb3IgdGhlIGZhc3QgcmV2aWV3Lg0KVGhpcyBpcyBmaXJzdCB2 ZXJzaW9uLCBsZXQncyByZXZpZXcgaXQgY2FyZWZ1bGx5IHRvIGJlIHN1cmUgaXQgaXMgY29ycmVj dC4NCkBYaWFvIFdhbmcsIGl0IHdpbGwgYmUgZ29vZCB0byBoZWFyIHlvdXIgaWRlYSB0b28uDQpX ZSBhbHNvIG5lZWQgdG8gdW5kZXJzdGFuZCB0aGUgZWZmZWN0IG9uIElGQyBkcml2ZXIvZGV2aWNl Li4uDQpKdXN0IHRvIHVwZGF0ZSB0aGF0IEkgY2hlY2tlZCB0aGlzIGNvZGUgd2l0aCB0aGUgbWx4 NSBhZGp1c3RtZW50cyBhbmQgSSBzZW50IGluIHRoaXMgc2VyaWVzLg0KSXQgd29ya3Mgd2VsbCB3 aXRoIHRoZSB2RFBBIGV4YW1wbGUgYXBwbGljYXRpb24uDQoNCkZyb206IE1heGltZSBDb3F1ZWxp bjoNCj4gT24gNi8xOC8yMCA2OjI4IFBNLCBNYXRhbiBBenJhZCB3cm90ZToNCj4gPiBTb21lIGd1 ZXN0IGRyaXZlcnMgbWF5IG5vdCBjb25maWd1cmUgZGlzYWJsZWQgdmlydGlvIHF1ZXVlcy4NCj4g Pg0KPiA+IEluIHRoaXMgY2FzZSwgdGhlIHZob3N0IG1hbmFnZW1lbnQgbmV2ZXIgdHJpZ2dlcnMg dGhlIHZEUEEgZGV2aWNlDQo+ID4gY29uZmlndXJhdGlvbiBiZWN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