DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jianfeng Tan <jianfeng.tan@intel.com>
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
Subject: Re: [dpdk-dev] [PATCH v3 0/3] add multi queue support for virtio-user
Date: Wed, 15 Jun 2016 17:54:27 +0800	[thread overview]
Message-ID: <20160615095427.GF10038@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1465981637-38015-1-git-send-email-jianfeng.tan@intel.com>

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,

      parent reply	other threads:[~2016-06-15  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  8:59 [dpdk-dev] [PATCH " Jianfeng Tan
2016-05-05  8:59 ` [dpdk-dev] [PATCH 1/3] virtio-user: add mq in vhost user adapter Jianfeng Tan
2016-05-05  8:59 ` [dpdk-dev] [PATCH 2/3] virtio-user: add mq in device emulation Jianfeng Tan
2016-05-05  8:59 ` [dpdk-dev] [PATCH 3/3] virtio-user: add mq in virtual pci driver Jianfeng Tan
2016-06-13  6:43 ` [dpdk-dev] [PATCH v2 0/4] add multi queue support for virtio-user Jianfeng Tan
2016-06-13  6:43   ` [dpdk-dev] [PATCH v2 1/4] virtio-user: use virtual address in cq Jianfeng Tan
2016-06-13 10:19     ` Yuanhan Liu
2016-06-13  6:43   ` [dpdk-dev] [PATCH v2 2/4] virtio-user: add mq in vhost user adapter Jianfeng Tan
2016-06-13  6:43   ` [dpdk-dev] [PATCH v2 3/4] virtio-user: add ctrl-q and mq in device emulation Jianfeng Tan
2016-06-13  6:43   ` [dpdk-dev] [PATCH v2 4/4] virtio-user: handle ctrl-q in driver Jianfeng Tan
2016-06-13 10:14     ` Yuanhan Liu
2016-06-13 10:20       ` Tan, Jianfeng
2016-06-15  9:07 ` [dpdk-dev] [PATCH v3 0/3] add multi queue support for virtio-user Jianfeng Tan
2016-06-15  9:07   ` [dpdk-dev] [PATCH v3 1/3] virtio-user: add mq in vhost user adapter Jianfeng Tan
2016-06-15  9:07   ` [dpdk-dev] [PATCH v3 2/3] virtio-user: add ctrl-q and mq in device emulation Jianfeng Tan
2016-06-15  9:07   ` [dpdk-dev] [PATCH v3 0/3] virtio-user: handle ctrl-q in driver Jianfeng Tan
2016-06-15  9:54   ` Yuanhan Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160615095427.GF10038@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=ann.zhuangyanying@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=mst@redhat.com \
    --cc=mukawa@igel.co.jp \
    --cc=nakajima.yoshihiro@lab.ntt.co.jp \
    --cc=nhorman@tuxdriver.com \
    --cc=p.fedin@samsung.com \
    --cc=rich.lane@bigswitch.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).