From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D811B2B86 for ; Mon, 26 Dec 2016 07:39:29 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP; 25 Dec 2016 22:39:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,404,1477983600"; d="scan'208";a="43345701" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 25 Dec 2016 22:39:27 -0800 Date: Mon, 26 Dec 2016 14:41:14 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, ferruh.yigit@intel.com, cunming.liang@intel.com Message-ID: <20161226064114.GC19288@yliu-dev.sh.intel.com> References: <1480689075-66977-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-5-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482477266-39199-5-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 4/7] net/virtio_user: abstract virtio user backend ops 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: Mon, 26 Dec 2016 06:39:30 -0000 On Fri, Dec 23, 2016 at 07:14:23AM +0000, Jianfeng Tan wrote: > +typedef int (*vhost_setup_t)(struct virtio_user_dev *dev); > +typedef int (*vhost_send_request_t)(struct virtio_user_dev *dev, > + enum vhost_user_request req, > + void *arg); > +typedef int (*vhost_enable_qp_t)(struct virtio_user_dev *dev, > + uint16_t pair_idx, > + int enable); I will not bother to define new types if they are just gonna be used once. No strong perference here, just a suggestion. ... > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h > index 28fc788..503a496 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.h > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h > @@ -37,9 +37,15 @@ > #include > #include "../virtio_pci.h" > #include "../virtio_ring.h" > +#include "vhost.h" > > struct virtio_user_dev { > + /* for vhost_user backend */ > int vhostfd; > + > + /* for vhost_kernel backend */ > + > + /* for both vhost_user and vhost_kernel */ By far (till this patch), vhost_kernel is not introduced at all, that I will not mention it here. That said, I will leave this change to the patch that actually enables vhost-kernel. --yliu