From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id AEF1B2B96 for ; Wed, 30 May 2018 14:25:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2018 05:25:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,460,1520924400"; d="scan'208";a="55128276" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 30 May 2018 05:25:03 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 May 2018 05:25:02 -0700 Received: from hasmsx108.ger.corp.intel.com (10.184.198.18) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 May 2018 05:25:02 -0700 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.132]) by hasmsx108.ger.corp.intel.com ([169.254.9.94]) with mapi id 14.03.0319.002; Wed, 30 May 2018 15:24:58 +0300 From: "Stojaczyk, DariuszX" To: Stefan Hajnoczi CC: "dev@dpdk.org" , Maxime Coquelin , "Bie, Tiwei" , "Tetsuya Mukawa" , Thomas Monjalon , "yliu@fridaylinux.org" , "Harris, James R" Thread-Topic: [RFC v2] vhost: new rte_vhost API proposal Thread-Index: AQHT7on2huGy3KtQDE+XGzZuey1czqRAEIsAgAaoa6CAASACAIAAaUZw Date: Wed, 30 May 2018 12:24:58 +0000 Message-ID: References: <1525958573-184361-1-git-send-email-dariuszx.stojaczyk@intel.com> <1526648465-62579-1-git-send-email-dariuszx.stojaczyk@intel.com> <20180525100550.GD14757@stefanha-x1.localdomain> <20180530085700.GC14623@stefanha-x1.localdomain> In-Reply-To: <20180530085700.GC14623@stefanha-x1.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGZkN2JlY2MtMDNhMi00MWQzLWIxMWMtYjQ3OTQyODUwNzllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJoYW93XC8wUlkwOU5FZncxY0d2Z3lJVmNiWEJ0RThYQ3lnakxUWkc0cnFaMXdtYlpWRGtPS01KRnZHQlwvQnFoMm8ifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.103.103.177] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC v2] vhost: new rte_vhost API proposal 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, 30 May 2018 12:25:05 -0000 > -----Original Message----- > From: Stefan Hajnoczi [mailto:stefanha@redhat.com] > Sent: Wednesday, May 30, 2018 10:57 AM > On Tue, May 29, 2018 at 01:38:33PM +0000, Stojaczyk, DariuszX wrote: > > > > > > > -----Original Message----- > > > From: Stefan Hajnoczi [mailto:stefanha@redhat.com] > > > Sent: Friday, May 25, 2018 12:06 PM > > > On Fri, May 18, 2018 at 03:01:05PM +0200, Dariusz Stojaczyk wrote: > > > > +struct rte_vhost2_msg { > > > > + uint32_t id; > > > > > > Is this what the vhost-user specification calls the "request type"? > > > I suggest following the vhost-user spec terminology. > > > > > > > + uint32_t flags; > > > > + uint32_t size; /**< The following payload size. */ > > > > + void *payload; > > > > + int fds[RTE_VHOST2_MEMORY_MAX_NREGIONS]; > > > > > > Is it necessary to expose file descriptor passing in the API? > > > virtio-vhost-user doesn't have file descriptor passing, so it's best > > > if this can be hidden inside rte_vhost2. > > > > So it's another argument for not exposing raw message handling to the > user. > > If there's some backend-specific vhost-user message in future that > contains an fd, it will need a set of new abstractions to work with virti= o- > vhost-user anyway. > > I guess I'll get back the original custom_msg idea from V1. >=20 > Hold on, have you looked at the device-specific messages defined in the > vhost-user spec? Do any of them even pass resources (file descriptors)? There's at least VHOST_USER_NVME_SET_CQ_CALL (currently in review, not pres= ent in master yet). Vhost-nvme is a one big hack that doesn't use any virtq= ueues, so it has its own message for callfd.