From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [RFC PATCH 7/7] lib/librte_vhost: Add vhost-user implementation Date: Fri, 14 Nov 2014 13:41:27 +0900 Message-ID: <546587F7.8080009@igel.co.jp> References: <1415272471-3299-1-git-send-email-mukawa@igel.co.jp> <1415272471-3299-8-git-send-email-mukawa@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "nakajima.yoshihiro-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org" , "masutani.hitoshi-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org" To: "Xie, Huawei" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" (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