From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 862A5C4AE for ; Wed, 15 Jun 2016 11:54:35 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 15 Jun 2016 02:54:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,475,1459839600"; d="scan'208";a="122239476" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 15 Jun 2016 02:54:25 -0700 Date: Wed, 15 Jun 2016 17:54:27 +0800 From: Yuanhan Liu To: Jianfeng Tan Cc: dev@dpdk.org, rich.lane@bigswitch.com, mst@redhat.com, nakajima.yoshihiro@lab.ntt.co.jp, p.fedin@samsung.com, ann.zhuangyanying@huawei.com, mukawa@igel.co.jp, nhorman@tuxdriver.com Message-ID: <20160615095427.GF10038@yliu-dev.sh.intel.com> References: <1465981637-38015-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465981637-38015-1-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 0/3] add multi queue support for virtio-user 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: Wed, 15 Jun 2016 09:54:35 -0000 Applied to dpdk-next-virtio, with following small changes, for addressing a build error and some checkpatch warnings. Thanks. --yliu --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 026b8a1..ea7a48e 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -307,9 +307,9 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev, const struct rte_memzone *mz = NULL, *hdr_mz = NULL; unsigned int vq_size, size; struct virtio_hw *hw = dev->data->dev_private; - struct virtnet_rx *rxvq; - struct virtnet_tx *txvq; - struct virtnet_ctl *cvq; + struct virtnet_rx *rxvq = NULL; + struct virtnet_tx *txvq = NULL; + struct virtnet_ctl *cvq = NULL; struct virtqueue *vq; const char *queue_names[] = {"rvq", "txq", "cvq"}; size_t sz_vq, sz_q = 0, sz_hdr_mz = 0; diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h index 8d1e505..897042f 100644 --- a/drivers/net/virtio/virtio_user/vhost.h +++ b/drivers/net/virtio/virtio_user/vhost.h @@ -141,6 +141,6 @@ struct vhost_user_msg { int vhost_user_sock(int vhostfd, uint64_t req, void *arg); int vhost_user_setup(const char *path); -int vhost_user_enable_queue_pair(int vhostfd, unsigned pair_idx, int enable); +int vhost_user_enable_queue_pair(int vhostfd, uint16_t pair_idx, int enable); #endif diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c index 98d98b6..95e80f8 100644 --- a/drivers/net/virtio/virtio_user/vhost_user.c +++ b/drivers/net/virtio/virtio_user/vhost_user.c @@ -100,8 +100,9 @@ vhost_user_read(int fd, struct vhost_user_msg *msg) if (sz_payload) { ret = recv(fd, (void *)((char *)msg + sz_hdr), sz_payload, 0); if (ret < sz_payload) { - PMD_DRV_LOG(ERR, "Failed to recv msg payload: %d instead of %d.", - ret, msg->size); + PMD_DRV_LOG(ERR, + "Failed to recv msg payload: %d instead of %d.", + ret, msg->size); goto fail; } } @@ -406,7 +407,7 @@ vhost_user_setup(const char *path) } int -vhost_user_enable_queue_pair(int vhostfd, unsigned pair_idx, int enable) +vhost_user_enable_queue_pair(int vhostfd, uint16_t pair_idx, int enable) { int i; @@ -422,5 +423,4 @@ vhost_user_enable_queue_pair(int vhostfd, unsigned pair_idx, int enable) } return 0; - } diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 4c9279e..9216182 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -46,7 +46,7 @@ #include "virtio_user/virtio_user_dev.h" #define virtio_user_get_dev(hw) \ - ((struct virtio_user_dev *)(hw)->virtio_user_dev); + ((struct virtio_user_dev *)(hw)->virtio_user_dev) static void virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,