From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by dpdk.org (Postfix) with ESMTP id 615637F25 for ; Fri, 14 Nov 2014 05:31:29 +0100 (CET) Received: by mail-pa0-f54.google.com with SMTP id hz1so5610595pad.27 for ; Thu, 13 Nov 2014 20:41:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=OozTa9Hewnc8Lkz81l0i3HLtmizVjgJVWlqO3ApMuh0=; b=LkPKa7/pVQ0GKCP7MzxWHo9GUBSBPFfokPfcA/ngILIzDiTrPl7AN+CKUFQBK6cpGa 5aDUNdk5kvfWJ1h4tKUD01ArV1k2Z160FVhmI0Ag8QDrsg4e3r8SyNHmU0ki3pIXsH9S CIFwEh8ZtLlFUVOYtXirQCtWkKgTj/tvQFBh50W1AHaRyRwy3/zrvlYRCuVRwy2BV++Z tRnjLbwCy6S2og5r7JxJhIAr+e/SqKTuzdiJEOLJjh5HXiZOI3Ws23B4oLuKCLe6BjXS RwUoV2Sa+SMo5Zd+lQEKgP0PEANTG+XKGKtv1/Ju4/wl3ER1TFkm5W/NBGCBdPFQ2V9b rPtQ== X-Gm-Message-State: ALoCoQlfrCWCb5ZqsotJ2v/rhjd4PN61t8tSYChF8xE9Bmb8+rNPOJABQPpqj17J+5PL+yCuE6AD X-Received: by 10.68.203.41 with SMTP id kn9mr7417578pbc.47.1415940090299; Thu, 13 Nov 2014 20:41:30 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id yk3sm26162354pbb.60.2014.11.13.20.41.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 20:41:29 -0800 (PST) Message-ID: <546587F7.8080009@igel.co.jp> Date: Fri, 14 Nov 2014 13:41:27 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Xie, Huawei" , "dev@dpdk.org" References: <1415272471-3299-1-git-send-email-mukawa@igel.co.jp> <1415272471-3299-8-git-send-email-mukawa@igel.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "nakajima.yoshihiro@lab.ntt.co.jp" , "masutani.hitoshi@lab.ntt.co.jp" Subject: Re: [dpdk-dev] [RFC PATCH 7/7] lib/librte_vhost: Add vhost-user implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 04:31:30 -0000 (2014/11/14 9:07), Xie, Huawei wrote: >> +struct vhost_device_user_ctx { >> + int *fds; >> + int fd_num; >> + struct vhost_driver *drv; >> +}; >> + >> /* >> * Structure used to identify device context. >> */ >> @@ -83,6 +89,7 @@ struct vhost_device_ctx { >> vhost_driver_type_t type; /* driver type. */ >> uint64_t fh; /* Populated with fi->fh to track the >> device index. */ >> union { >> + struct vhost_device_user_ctx user; >> struct vhost_device_cuse_ctx cdev; >> }; >> }; > Tetsuya: > It is ok we define the enum ctx, but so far I don't see absolute necess= ity to have user ctx. > Will send out RFC patch of my implementation today or next day to make = it more clear. Thanks, let's change implementation simpler as much as possible. > > I don't understand why we keep two device lists. > * in real case, will we allow to register two drivers? > Besides, we have the open question whether we still need to keep t= he DPDK cuse driver. It requires maintenance effort > and extra kernel module; > Btw, your framework to allow dynamically register different vhost = driver is nice! I assume some customers still need to use QEMU under 2.0. But it's okay for me to remove vhost-cuse implementation. What is you and intel plan? > * If two drivers are simultaneously accessing the device list, we cou= ld add lock. Also we may need to remove some global variables that cannot be shared between drivers. To remove global variable, we may be possible to save these variable in c= tx. Thanks, Tetsuya