DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, chenbo.xia@intel.com, olivier.matz@6wind.com,
	amorenoz@redhat.com, david.marchand@redhat.com
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [dpdk-dev] [PATCH 38/40] net/virtio: move Vhost-user specifics to its backend
Date: Sun, 20 Dec 2020 22:14:03 +0100
Message-ID: <20201220211405.313012-39-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20201220211405.313012-1-maxime.coquelin@redhat.com>

This patch moves all the Vhost-user backend specific
logic like Vhost FD, listen FD and interrupt handling
to the vhost-user backend implementation.

In order to achieve that, new ops are created to update
the link status, disconnect and reconnect the server,
and fetch the link state interrupt FD.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/vhost.h        |   4 +
 drivers/net/virtio/virtio_user/vhost_kernel.c |  18 +-
 drivers/net/virtio/virtio_user/vhost_user.c   | 169 ++++++++++++++---
 drivers/net/virtio/virtio_user/vhost_vdpa.c   |  16 ++
 .../net/virtio/virtio_user/virtio_user_dev.c  | 175 ++++++++++++++---
 .../net/virtio/virtio_user/virtio_user_dev.h  |   9 +-
 drivers/net/virtio/virtio_user_ethdev.c       | 179 +-----------------
 7 files changed, 340 insertions(+), 230 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
index ee5598226d..6001d7a164 100644
--- a/drivers/net/virtio/virtio_user/vhost.h
+++ b/drivers/net/virtio/virtio_user/vhost.h
@@ -75,6 +75,10 @@ struct virtio_user_backend_ops {
 	int (*enable_qp)(struct virtio_user_dev *dev, uint16_t pair_idx, int enable);
 	int (*dma_map)(struct virtio_user_dev *dev, void *addr, uint64_t iova, size_t len);
 	int (*dma_unmap)(struct virtio_user_dev *dev, void *addr, uint64_t iova, size_t len);
+	int (*update_link_state)(struct virtio_user_dev *dev);
+	int (*server_disconnect)(struct virtio_user_dev *dev);
+	int (*server_reconnect)(struct virtio_user_dev *dev);
+	int (*get_intr_fd)(struct virtio_user_dev *dev);
 };
 
 extern struct virtio_user_backend_ops virtio_ops_user;
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel.c b/drivers/net/virtio/virtio_user/vhost_kernel.c
index 023fddcd69..0ba37b23dc 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel.c
@@ -459,6 +459,20 @@ vhost_kernel_get_backend_features(uint64_t *features)
 	return 0;
 }
 
+static int
+vhost_kernel_update_link_state(struct virtio_user_dev *dev __rte_unused)
+{
+	/* Nothing to update (Maybe get TAP interface link state?) */
+	return 0;
+}
+
+static int
+vhost_kernel_get_intr_fd(struct virtio_user_dev *dev __rte_unused)
+{
+	/* No link state interrupt with Vhost-kernel */
+	return -1;
+}
+
 struct virtio_user_backend_ops virtio_ops_kernel = {
 	.setup = vhost_kernel_setup,
 	.destroy = vhost_kernel_destroy,
@@ -475,5 +489,7 @@ struct virtio_user_backend_ops virtio_ops_kernel = {
 	.set_vring_addr = vhost_kernel_set_vring_addr,
 	.get_status = vhost_kernel_get_status,
 	.set_status = vhost_kernel_set_status,
-	.enable_qp = vhost_kernel_enable_queue_pair
+	.enable_qp = vhost_kernel_enable_queue_pair,
+	.update_link_state = vhost_kernel_update_link_state,
+	.get_intr_fd = vhost_kernel_get_intr_fd,
 };
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index e96b1d8b9c..9892135bce 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <errno.h>
 
+#include <rte_alarm.h>
 #include <rte_string_fns.h>
 #include <rte_fbarray.h>
 
@@ -18,6 +19,8 @@
 #include "virtio_user_dev.h"
 
 struct vhost_user_data {
+	int vhostfd;
+	int listenfd;
 	uint64_t protocol_features;
 };
 
@@ -179,13 +182,14 @@ vhost_user_read(int fd, struct vhost_user_msg *msg)
 static int
 vhost_user_check_reply_ack(struct virtio_user_dev *dev, struct vhost_user_msg *msg)
 {
+	struct vhost_user_data *data = dev->backend_data;
 	enum vhost_user_request req = msg->request;
 	int ret;
 
 	if (!(msg->flags & VHOST_USER_NEED_REPLY_MASK))
 		return 0;
 
-	ret = vhost_user_read(dev->vhostfd, msg);
+	ret = vhost_user_read(data->vhostfd, msg);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to read reply-ack");
 		return -1;
@@ -203,12 +207,13 @@ static int
 vhost_user_set_owner(struct virtio_user_dev *dev)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = VHOST_USER_SET_OWNER,
 		.flags = VHOST_USER_VERSION,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to set owner");
 		return -1;
@@ -221,16 +226,17 @@ static int
 vhost_user_get_protocol_features(struct virtio_user_dev *dev, uint64_t *features)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = VHOST_USER_GET_PROTOCOL_FEATURES,
 		.flags = VHOST_USER_VERSION,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0)
 		goto err;
 
-	ret = vhost_user_read(dev->vhostfd, &msg);
+	ret = vhost_user_read(data->vhostfd, &msg);
 	if (ret < 0)
 		goto err;
 
@@ -257,6 +263,7 @@ static int
 vhost_user_set_protocol_features(struct virtio_user_dev *dev, uint64_t features)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = VHOST_USER_SET_PROTOCOL_FEATURES,
 		.flags = VHOST_USER_VERSION,
@@ -264,7 +271,7 @@ vhost_user_set_protocol_features(struct virtio_user_dev *dev, uint64_t features)
 		.payload.u64 = features,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to set protocol features");
 		return -1;
@@ -283,11 +290,11 @@ vhost_user_get_features(struct virtio_user_dev *dev, uint64_t *features)
 		.flags = VHOST_USER_VERSION,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0)
 		goto err;
 
-	ret = vhost_user_read(dev->vhostfd, &msg);
+	ret = vhost_user_read(data->vhostfd, &msg);
 	if (ret < 0)
 		goto err;
 
@@ -331,6 +338,7 @@ static int
 vhost_user_set_features(struct virtio_user_dev *dev, uint64_t features)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = VHOST_USER_SET_FEATURES,
 		.flags = VHOST_USER_VERSION,
@@ -338,7 +346,7 @@ vhost_user_set_features(struct virtio_user_dev *dev, uint64_t features)
 		.payload.u64 = features,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to set features");
 		return -1;
@@ -462,7 +470,7 @@ vhost_user_set_memory_table(struct virtio_user_dev *dev)
 	msg.size += sizeof(msg.payload.memory.padding);
 	msg.size += fd_num * sizeof(struct vhost_memory_region);
 
-	ret = vhost_user_write(dev->vhostfd, &msg, fds, fd_num);
+	ret = vhost_user_write(data->vhostfd, &msg, fds, fd_num);
 	if (ret < 0)
 		goto err;
 
@@ -477,6 +485,7 @@ vhost_user_set_vring(struct virtio_user_dev *dev, enum vhost_user_request req,
 		struct vhost_vring_state *state)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = req,
 		.flags = VHOST_USER_VERSION,
@@ -484,7 +493,7 @@ vhost_user_set_vring(struct virtio_user_dev *dev, enum vhost_user_request req,
 		.payload.state = *state,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to set vring state (request %d)", req);
 		return -1;
@@ -516,6 +525,7 @@ vhost_user_get_vring_base(struct virtio_user_dev *dev, struct vhost_vring_state
 {
 	int ret;
 	struct vhost_user_msg msg;
+	struct vhost_user_data *data = dev->backend_data;
 	unsigned int index = state->index;
 
 	ret = vhost_user_set_vring(dev, VHOST_USER_GET_VRING_BASE, state);
@@ -524,7 +534,7 @@ vhost_user_get_vring_base(struct virtio_user_dev *dev, struct vhost_vring_state
 		goto err;
 	}
 
-	ret = vhost_user_read(dev->vhostfd, &msg);
+	ret = vhost_user_read(data->vhostfd, &msg);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to read reply");
 		goto err;
@@ -560,6 +570,7 @@ vhost_user_set_vring_file(struct virtio_user_dev *dev, enum vhost_user_request r
 	int ret;
 	int fd = file->fd;
 	int num_fd = 0;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = req,
 		.flags = VHOST_USER_VERSION,
@@ -572,7 +583,7 @@ vhost_user_set_vring_file(struct virtio_user_dev *dev, enum vhost_user_request r
 	else
 		msg.payload.u64 |= VHOST_USER_VRING_NOFD_MASK;
 
-	ret = vhost_user_write(dev->vhostfd, &msg, &fd, num_fd);
+	ret = vhost_user_write(data->vhostfd, &msg, &fd, num_fd);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to set vring file (request %d)", req);
 		return -1;
@@ -598,6 +609,7 @@ static int
 vhost_user_set_vring_addr(struct virtio_user_dev *dev, struct vhost_vring_addr *addr)
 {
 	int ret;
+	struct vhost_user_data *data = dev->backend_data;
 	struct vhost_user_msg msg = {
 		.request = VHOST_USER_SET_VRING_ADDR,
 		.flags = VHOST_USER_VERSION,
@@ -605,7 +617,7 @@ vhost_user_set_vring_addr(struct virtio_user_dev *dev, struct vhost_vring_addr *
 		.payload.addr = *addr,
 	};
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to send vring addresses");
 		return -1;
@@ -638,13 +650,13 @@ vhost_user_get_status(struct virtio_user_dev *dev, uint8_t *status)
 	if (!(data->protocol_features & (1ULL << VHOST_USER_PROTOCOL_F_STATUS)))
 		return -ENOTSUP;
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to send request");
 		goto err;
 	}
 
-	ret = vhost_user_read(dev->vhostfd, &msg);
+	ret = vhost_user_read(data->vhostfd, &msg);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to recv request");
 		goto err;
@@ -697,7 +709,7 @@ vhost_user_set_status(struct virtio_user_dev *dev, uint8_t status)
 	if (!(data->protocol_features & (1ULL << VHOST_USER_PROTOCOL_F_STATUS)))
 		return -ENOTSUP;
 
-	ret = vhost_user_write(dev->vhostfd, &msg, NULL, 0);
+	ret = vhost_user_write(data->vhostfd, &msg, NULL, 0);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to send get status request");
 		return -1;
@@ -708,11 +720,12 @@ vhost_user_set_status(struct virtio_user_dev *dev, uint8_t status)
 
 #define MAX_VIRTIO_USER_BACKLOG 1
 static int
-virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
+vhost_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 {
 	int ret;
 	int flag;
-	int fd = dev->listenfd;
+	struct vhost_user_data *data = dev->backend_data;
+	int fd = data->listenfd;
 
 	ret = bind(fd, (struct sockaddr *)un, sizeof(*un));
 	if (ret < 0) {
@@ -725,8 +738,8 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 		return -1;
 
 	PMD_DRV_LOG(NOTICE, "(%s) waiting for client connection...", dev->path);
-	dev->vhostfd = accept(fd, NULL, NULL);
-	if (dev->vhostfd < 0) {
+	data->vhostfd = accept(fd, NULL, NULL);
+	if (data->vhostfd < 0) {
 		PMD_DRV_LOG(ERR, "Failed to accept initial client connection (%s)",
 				strerror(errno));
 		return -1;
@@ -741,6 +754,37 @@ virtio_user_start_server(struct virtio_user_dev *dev, struct sockaddr_un *un)
 	return 0;
 }
 
+static int
+vhost_user_server_disconnect(struct virtio_user_dev *dev)
+{
+	struct vhost_user_data *data = dev->backend_data;
+
+	if (data->vhostfd < 0) {
+		PMD_DRV_LOG(ERR, "(%s) Expected valid Vhost FD", dev->path);
+		return -1;
+	}
+
+	close(data->vhostfd);
+	data->vhostfd = -1;
+
+	return 0;
+}
+
+static int
+vhost_user_server_reconnect(struct virtio_user_dev *dev)
+{
+	struct vhost_user_data *data = dev->backend_data;
+	int fd;
+
+	fd = accept(data->listenfd, NULL, NULL);
+	if (fd < 0)
+		return -1;
+
+	data->vhostfd = fd;
+
+	return 0;
+}
+
 /**
  * Set up environment to talk with a vhost user backend.
  *
@@ -766,6 +810,8 @@ vhost_user_setup(struct virtio_user_dev *dev)
 
 	dev->backend_data = data;
 
+	data->vhostfd = -1;
+
 	fd = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (fd < 0) {
 		PMD_DRV_LOG(ERR, "socket() error, %s", strerror(errno));
@@ -781,8 +827,8 @@ vhost_user_setup(struct virtio_user_dev *dev)
 	strlcpy(un.sun_path, dev->path, sizeof(un.sun_path));
 
 	if (dev->is_server) {
-		dev->listenfd = fd;
-		if (virtio_user_start_server(dev, &un) < 0) {
+		data->listenfd = fd;
+		if (vhost_user_start_server(dev, &un) < 0) {
 			PMD_DRV_LOG(ERR, "virtio-user startup fails in server mode");
 			close(fd);
 			return -1;
@@ -793,7 +839,7 @@ vhost_user_setup(struct virtio_user_dev *dev)
 			close(fd);
 			return -1;
 		}
-		dev->vhostfd = fd;
+		data->vhostfd = fd;
 	}
 
 	return 0;
@@ -802,6 +848,18 @@ vhost_user_setup(struct virtio_user_dev *dev)
 static int
 vhost_user_destroy(struct virtio_user_dev *dev)
 {
+	struct vhost_user_data *data = dev->backend_data;
+
+	if (data->vhostfd >= 0) {
+		close(data->vhostfd);
+		data->vhostfd = -1;
+	}
+
+	if (data->listenfd >= 0) {
+		close(data->listenfd);
+		data->listenfd = -1;
+	}
+
 	if (dev->backend_data) {
 		free(dev->backend_data);
 		dev->backend_data = NULL;
@@ -815,8 +873,12 @@ vhost_user_enable_queue_pair(struct virtio_user_dev *dev,
 			     uint16_t pair_idx,
 			     int enable)
 {
+	struct vhost_user_data *data = dev->backend_data;
 	int i;
 
+	if (data->vhostfd < 0)
+		return 0;
+
 	if (dev->qp_enabled[pair_idx] == enable)
 		return 0;
 
@@ -842,6 +904,61 @@ vhost_user_get_backend_features(uint64_t *features)
 	return 0;
 }
 
+static int
+vhost_user_update_link_state(struct virtio_user_dev *dev)
+{
+	struct vhost_user_data *data = dev->backend_data;
+	char buf[128];
+
+	if (data->vhostfd >= 0) {
+		int r;
+		int flags;
+
+		flags = fcntl(data->vhostfd, F_GETFL);
+		if (fcntl(data->vhostfd, F_SETFL, flags | O_NONBLOCK) == -1) {
+			PMD_DRV_LOG(ERR, "error setting O_NONBLOCK flag");
+			return -1;
+		}
+
+		r = recv(data->vhostfd, buf, 128, MSG_PEEK);
+		if (r == 0 || (r < 0 && errno != EAGAIN)) {
+			dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
+			PMD_DRV_LOG(ERR, "virtio-user port %u is down", dev->port_id);
+
+			/* This function could be called in the process
+			 * of interrupt handling, callback cannot be
+			 * unregistered here, set an alarm to do it.
+			 */
+			rte_eal_alarm_set(1, virtio_user_dev_delayed_handler, (void *)dev);
+		} else {
+			dev->net_status |= VIRTIO_NET_S_LINK_UP;
+		}
+
+		if (fcntl(data->vhostfd, F_SETFL,
+					flags & ~O_NONBLOCK) == -1) {
+			PMD_DRV_LOG(ERR, "error clearing O_NONBLOCK flag");
+			return -1;
+		}
+	} else if (dev->is_server) {
+		dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
+		if (virtio_user_dev_server_reconnect(dev) >= 0)
+			dev->net_status |= VIRTIO_NET_S_LINK_UP;
+	}
+
+	return 0;
+}
+
+static int
+vhost_user_get_intr_fd(struct virtio_user_dev *dev)
+{
+	struct vhost_user_data *data = dev->backend_data;
+
+	if (dev->is_server && data->vhostfd == -1)
+		return data->listenfd;
+
+	return data->vhostfd;
+}
+
 struct virtio_user_backend_ops virtio_ops_user = {
 	.setup = vhost_user_setup,
 	.destroy = vhost_user_destroy,
@@ -859,5 +976,9 @@ struct virtio_user_backend_ops virtio_ops_user = {
 	.set_vring_addr = vhost_user_set_vring_addr,
 	.get_status = vhost_user_get_status,
 	.set_status = vhost_user_set_status,
-	.enable_qp = vhost_user_enable_queue_pair
+	.enable_qp = vhost_user_enable_queue_pair,
+	.update_link_state = vhost_user_update_link_state,
+	.server_disconnect = vhost_user_server_disconnect,
+	.server_reconnect = vhost_user_server_reconnect,
+	.get_intr_fd = vhost_user_get_intr_fd,
 };
diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c
index b29426d767..0f422ae84a 100644
--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
@@ -327,6 +327,20 @@ vhost_vdpa_get_backend_features(uint64_t *features)
 	return 0;
 }
 
+static int
+vhost_vdpa_update_link_state(struct virtio_user_dev *dev __rte_unused)
+{
+	/* Nothing to update (for now?) */
+	return 0;
+}
+
+static int
+vhost_vdpa_get_intr_fd(struct virtio_user_dev *dev __rte_unused)
+{
+	/* No link state interrupt with Vhost-vDPA */
+	return -1;
+}
+
 struct virtio_user_backend_ops virtio_ops_vdpa = {
 	.setup = vhost_vdpa_setup,
 	.destroy = vhost_vdpa_destroy,
@@ -347,4 +361,6 @@ struct virtio_user_backend_ops virtio_ops_vdpa = {
 	.enable_qp = vhost_vdpa_enable_queue_pair,
 	.dma_map = vhost_vdpa_dma_map,
 	.dma_unmap = vhost_vdpa_dma_unmap,
+	.update_link_state = vhost_vdpa_update_link_state,
+	.get_intr_fd = vhost_vdpa_get_intr_fd,
 };
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 8d19a0addd..93a9ce2cd2 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -342,11 +342,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 	eth_dev->intr_handle->type = RTE_INTR_HANDLE_VDEV;
 	/* For virtio vdev, no need to read counter for clean */
 	eth_dev->intr_handle->efd_counter_size = 0;
-	eth_dev->intr_handle->fd = -1;
-	if (dev->vhostfd >= 0)
-		eth_dev->intr_handle->fd = dev->vhostfd;
-	else if (dev->is_server)
-		eth_dev->intr_handle->fd = dev->listenfd;
+	eth_dev->intr_handle->fd = dev->ops->get_intr_fd(dev);
 
 	return 0;
 }
@@ -403,7 +399,6 @@ virtio_user_dev_setup(struct virtio_user_dev *dev)
 {
 	uint32_t q;
 
-	dev->vhostfd = -1;
 	dev->vhostfds = NULL;
 	dev->tapfds = NULL;
 
@@ -597,15 +592,6 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
 		close(dev->callfds[i]);
 		close(dev->kickfds[i]);
 	}
-
-	if (dev->vhostfd >= 0)
-		close(dev->vhostfd);
-
-	if (dev->is_server && dev->listenfd >= 0) {
-		close(dev->listenfd);
-		dev->listenfd = -1;
-	}
-
 	if (dev->vhostfds) {
 		for (i = 0; i < dev->max_queue_pairs; ++i) {
 			close(dev->vhostfds[i]);
@@ -636,15 +622,11 @@ virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs)
 		return -1;
 	}
 
-	/* Server mode can't enable queue pairs if vhostfd is invalid,
-	 * always return 0 in this case.
-	 */
-	if (!dev->is_server || dev->vhostfd >= 0) {
-		for (i = 0; i < q_pairs; ++i)
-			ret |= dev->ops->enable_qp(dev, i, 1);
-		for (i = q_pairs; i < dev->max_queue_pairs; ++i)
-			ret |= dev->ops->enable_qp(dev, i, 0);
-	}
+	for (i = 0; i < q_pairs; ++i)
+		ret |= dev->ops->enable_qp(dev, i, 1);
+	for (i = q_pairs; i < dev->max_queue_pairs; ++i)
+		ret |= dev->ops->enable_qp(dev, i, 0);
+
 	dev->queue_pairs = q_pairs;
 
 	return ret;
@@ -859,3 +841,148 @@ virtio_user_dev_update_status(struct virtio_user_dev *dev)
 	pthread_mutex_unlock(&dev->mutex);
 	return ret;
 }
+
+int
+virtio_user_dev_update_link_state(struct virtio_user_dev *dev)
+{
+	if (dev->ops->update_link_state)
+		return dev->ops->update_link_state(dev);
+
+	return 0;
+}
+
+static void
+virtio_user_dev_reset_queues_packed(struct rte_eth_dev *eth_dev)
+{
+	struct virtio_user_dev *dev = eth_dev->data->dev_private;
+	struct virtio_hw *hw = &dev->hw;
+	struct virtnet_rx *rxvq;
+	struct virtnet_tx *txvq;
+	uint16_t i;
+
+	/* Add lock to avoid queue contention. */
+	rte_spinlock_lock(&hw->state_lock);
+	hw->started = 0;
+
+	/*
+	 * Waitting for datapath to complete before resetting queues.
+	 * 1 ms should be enough for the ongoing Tx/Rx function to finish.
+	 */
+	rte_delay_ms(1);
+
+	/* Vring reset for each Tx queue and Rx queue. */
+	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+		rxvq = eth_dev->data->rx_queues[i];
+		virtqueue_rxvq_reset_packed(rxvq->vq);
+		virtio_dev_rx_queue_setup_finish(eth_dev, i);
+	}
+
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+		txvq = eth_dev->data->tx_queues[i];
+		virtqueue_txvq_reset_packed(txvq->vq);
+	}
+
+	hw->started = 1;
+	rte_spinlock_unlock(&hw->state_lock);
+}
+
+void
+virtio_user_dev_delayed_handler(void *param)
+{
+	struct virtio_user_dev *dev = param;
+	struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
+
+	if (rte_intr_disable(eth_dev->intr_handle) < 0) {
+		PMD_DRV_LOG(ERR, "interrupt disable failed");
+		return;
+	}
+	rte_intr_callback_unregister(eth_dev->intr_handle,
+				     virtio_interrupt_handler, eth_dev);
+	if (dev->is_server) {
+		dev->ops->server_disconnect(dev);
+		eth_dev->intr_handle->fd = dev->ops->get_intr_fd(dev);
+		rte_intr_callback_register(eth_dev->intr_handle,
+					   virtio_interrupt_handler, eth_dev);
+		if (rte_intr_enable(eth_dev->intr_handle) < 0) {
+			PMD_DRV_LOG(ERR, "interrupt enable failed");
+			return;
+		}
+	}
+}
+
+int
+virtio_user_dev_server_reconnect(struct virtio_user_dev *dev)
+{
+	int ret, old_status;
+	struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
+	struct virtio_hw *hw = &dev->hw;
+
+	if (!dev->ops->server_reconnect) {
+		PMD_DRV_LOG(ERR, "(%s) Missing server reconnect callback", dev->path);
+		return -1;
+	}
+
+	old_status = virtio_get_status(hw);
+
+	virtio_reset(hw);
+
+	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_ACK);
+
+	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER);
+
+	if (dev->ops->get_features(dev, &dev->device_features) < 0) {
+		PMD_INIT_LOG(ERR, "get_features failed: %s",
+			     strerror(errno));
+		return -1;
+	}
+
+	dev->device_features |= dev->frontend_features;
+
+	/* umask vhost-user unsupported features */
+	dev->device_features &= ~(dev->unsupported_features);
+
+	dev->features &= dev->device_features;
+
+	/* For packed ring, resetting queues is required in reconnection. */
+	if (virtio_with_packed_queue(hw) &&
+	   (old_status & VIRTIO_CONFIG_STATUS_DRIVER_OK)) {
+		PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
+				" when packed ring reconnecting.");
+		virtio_user_dev_reset_queues_packed(eth_dev);
+	}
+
+	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_FEATURES_OK);
+
+	/* Start the device */
+	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER_OK);
+	if (!dev->started)
+		return -1;
+
+	if (dev->queue_pairs > 1) {
+		ret = virtio_user_handle_mq(dev, dev->queue_pairs);
+		if (ret != 0) {
+			PMD_INIT_LOG(ERR, "Fails to enable multi-queue pairs!");
+			return -1;
+		}
+	}
+	if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		if (rte_intr_disable(eth_dev->intr_handle) < 0) {
+			PMD_DRV_LOG(ERR, "interrupt disable failed");
+			return -1;
+		}
+		rte_intr_callback_unregister(eth_dev->intr_handle,
+					     virtio_interrupt_handler,
+					     eth_dev);
+
+		eth_dev->intr_handle->fd = dev->ops->get_intr_fd(dev);
+		rte_intr_callback_register(eth_dev->intr_handle,
+					   virtio_interrupt_handler, eth_dev);
+
+		if (rte_intr_enable(eth_dev->intr_handle) < 0) {
+			PMD_DRV_LOG(ERR, "interrupt enable failed");
+			return -1;
+		}
+	}
+	PMD_INIT_LOG(NOTICE, "server mode virtio-user reconnection succeeds!");
+	return 0;
+}
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index ec73d5de11..a429dcc57c 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -26,11 +26,11 @@ struct virtio_user_queue {
 struct virtio_user_dev {
 	struct virtio_hw hw;
 	enum virtio_user_backend_type backend_type;
-	/* for vhost_user backend */
-	int		vhostfd;
-	int		listenfd;   /* listening fd */
 	bool		is_server;  /* server or client mode */
 
+	/* for vhost_vdpa backend */
+	int		vhostfd;
+
 	/* for vhost_kernel backend */
 	char		*ifname;
 	int		*vhostfds;
@@ -84,5 +84,8 @@ void virtio_user_handle_cq_packed(struct virtio_user_dev *dev,
 uint8_t virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs);
 int virtio_user_dev_set_status(struct virtio_user_dev *dev, uint8_t status);
 int virtio_user_dev_update_status(struct virtio_user_dev *dev);
+int virtio_user_dev_update_link_state(struct virtio_user_dev *dev);
+void virtio_user_dev_delayed_handler(void *param);
+int virtio_user_dev_server_reconnect(struct virtio_user_dev *dev);
 extern const char * const virtio_user_backend_strings[];
 #endif
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 77ad468768..a287805cf2 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -28,146 +28,6 @@
 
 #define virtio_user_get_dev(hw) container_of(hw, struct virtio_user_dev, hw)
 
-static void
-virtio_user_reset_queues_packed(struct rte_eth_dev *eth_dev)
-{
-	struct virtio_user_dev *dev = eth_dev->data->dev_private;
-	struct virtio_hw *hw = &dev->hw;
-	struct virtnet_rx *rxvq;
-	struct virtnet_tx *txvq;
-	uint16_t i;
-
-	/* Add lock to avoid queue contention. */
-	rte_spinlock_lock(&hw->state_lock);
-	hw->started = 0;
-
-	/*
-	 * Waitting for datapath to complete before resetting queues.
-	 * 1 ms should be enough for the ongoing Tx/Rx function to finish.
-	 */
-	rte_delay_ms(1);
-
-	/* Vring reset for each Tx queue and Rx queue. */
-	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
-		rxvq = eth_dev->data->rx_queues[i];
-		virtqueue_rxvq_reset_packed(rxvq->vq);
-		virtio_dev_rx_queue_setup_finish(eth_dev, i);
-	}
-
-	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
-		txvq = eth_dev->data->tx_queues[i];
-		virtqueue_txvq_reset_packed(txvq->vq);
-	}
-
-	hw->started = 1;
-	rte_spinlock_unlock(&hw->state_lock);
-}
-
-
-static int
-virtio_user_server_reconnect(struct virtio_user_dev *dev)
-{
-	int ret, connectfd, old_status;
-	struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
-	struct virtio_hw *hw = &dev->hw;
-
-	connectfd = accept(dev->listenfd, NULL, NULL);
-	if (connectfd < 0)
-		return -1;
-
-	dev->vhostfd = connectfd;
-	old_status = virtio_get_status(hw);
-
-	virtio_reset(hw);
-
-	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_ACK);
-
-	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER);
-
-	if (dev->ops->get_features(dev, &dev->device_features) < 0) {
-		PMD_INIT_LOG(ERR, "get_features failed: %s",
-			     strerror(errno));
-		return -1;
-	}
-
-	dev->device_features |= dev->frontend_features;
-
-	/* umask vhost-user unsupported features */
-	dev->device_features &= ~(dev->unsupported_features);
-
-	dev->features &= dev->device_features;
-
-	/* For packed ring, resetting queues is required in reconnection. */
-	if (virtio_with_packed_queue(hw) &&
-	   (old_status & VIRTIO_CONFIG_STATUS_DRIVER_OK)) {
-		PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
-				" when packed ring reconnecting.");
-		virtio_user_reset_queues_packed(eth_dev);
-	}
-
-	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_FEATURES_OK);
-
-	/* Start the device */
-	virtio_set_status(hw, VIRTIO_CONFIG_STATUS_DRIVER_OK);
-	if (!dev->started)
-		return -1;
-
-	if (dev->queue_pairs > 1) {
-		ret = virtio_user_handle_mq(dev, dev->queue_pairs);
-		if (ret != 0) {
-			PMD_INIT_LOG(ERR, "Fails to enable multi-queue pairs!");
-			return -1;
-		}
-	}
-	if (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
-		if (rte_intr_disable(eth_dev->intr_handle) < 0) {
-			PMD_DRV_LOG(ERR, "interrupt disable failed");
-			return -1;
-		}
-		rte_intr_callback_unregister(eth_dev->intr_handle,
-					     virtio_interrupt_handler,
-					     eth_dev);
-		eth_dev->intr_handle->fd = connectfd;
-		rte_intr_callback_register(eth_dev->intr_handle,
-					   virtio_interrupt_handler, eth_dev);
-
-		if (rte_intr_enable(eth_dev->intr_handle) < 0) {
-			PMD_DRV_LOG(ERR, "interrupt enable failed");
-			return -1;
-		}
-	}
-	PMD_INIT_LOG(NOTICE, "server mode virtio-user reconnection succeeds!");
-	return 0;
-}
-
-static void
-virtio_user_delayed_handler(void *param)
-{
-	struct virtio_hw *hw = (struct virtio_hw *)param;
-	struct rte_eth_dev *eth_dev = &rte_eth_devices[hw->port_id];
-	struct virtio_user_dev *dev = virtio_user_get_dev(hw);
-
-	if (rte_intr_disable(eth_dev->intr_handle) < 0) {
-		PMD_DRV_LOG(ERR, "interrupt disable failed");
-		return;
-	}
-	rte_intr_callback_unregister(eth_dev->intr_handle,
-				     virtio_interrupt_handler, eth_dev);
-	if (dev->is_server) {
-		if (dev->vhostfd >= 0) {
-			close(dev->vhostfd);
-			dev->vhostfd = -1;
-		}
-		eth_dev->intr_handle->fd = dev->listenfd;
-		rte_intr_callback_register(eth_dev->intr_handle,
-					   virtio_interrupt_handler, eth_dev);
-		if (rte_intr_enable(eth_dev->intr_handle) < 0) {
-			PMD_DRV_LOG(ERR, "interrupt enable failed");
-			return;
-		}
-	}
-}
-
 static void
 virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
 		     void *dst, int length)
@@ -183,44 +43,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
 	}
 
 	if (offset == offsetof(struct virtio_net_config, status)) {
-		char buf[128];
-
-		if (dev->vhostfd >= 0) {
-			int r;
-			int flags;
-
-			flags = fcntl(dev->vhostfd, F_GETFL);
-			if (fcntl(dev->vhostfd, F_SETFL,
-					flags | O_NONBLOCK) == -1) {
-				PMD_DRV_LOG(ERR, "error setting O_NONBLOCK flag");
-				return;
-			}
-			r = recv(dev->vhostfd, buf, 128, MSG_PEEK);
-			if (r == 0 || (r < 0 && errno != EAGAIN)) {
-				dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
-				PMD_DRV_LOG(ERR, "virtio-user port %u is down",
-					    hw->port_id);
-
-				/* This function could be called in the process
-				 * of interrupt handling, callback cannot be
-				 * unregistered here, set an alarm to do it.
-				 */
-				rte_eal_alarm_set(1,
-						  virtio_user_delayed_handler,
-						  (void *)hw);
-			} else {
-				dev->net_status |= VIRTIO_NET_S_LINK_UP;
-			}
-			if (fcntl(dev->vhostfd, F_SETFL,
-					flags & ~O_NONBLOCK) == -1) {
-				PMD_DRV_LOG(ERR, "error clearing O_NONBLOCK flag");
-				return;
-			}
-		} else if (dev->is_server) {
-			dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
-			if (virtio_user_server_reconnect(dev) >= 0)
-				dev->net_status |= VIRTIO_NET_S_LINK_UP;
-		}
+		virtio_user_dev_update_link_state(dev);
 
 		*(uint16_t *)dst = dev->net_status;
 	}
-- 
2.29.2


  parent reply	other threads:[~2020-12-20 21:26 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 21:13 [dpdk-dev] [PATCH 00/40] net/virtio: Virtio PMD rework Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 01/40] bus/vdev: add helper to get vdev from eth dev Maxime Coquelin
2020-12-30  3:02   ` Xia, Chenbo
2021-01-05 21:15   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 02/40] net/virtio: Introduce Virtio bus type Maxime Coquelin
2020-12-30  3:02   ` Xia, Chenbo
2021-01-05 21:15   ` David Marchand
2021-01-14  9:24     ` Maxime Coquelin
2021-01-14 10:54       ` Maxime Coquelin
2021-01-14 11:55         ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 03/40] net/virtio: refactor virtio-user device Maxime Coquelin
2020-12-30  3:02   ` Xia, Chenbo
2021-01-05 21:16   ` David Marchand
2021-01-14  9:26     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 04/40] net/virtio: introduce PCI device metadata Maxime Coquelin
2020-12-30  3:02   ` Xia, Chenbo
2021-01-05 21:16   ` David Marchand
2021-01-14 11:05     ` Maxime Coquelin
2021-01-14 14:40       ` David Marchand
2021-01-14 14:44         ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 05/40] net/virtio: move PCI device init in dedicated file Maxime Coquelin
2020-12-30  3:02   ` Xia, Chenbo
2021-01-05 21:19   ` David Marchand
2021-01-14 16:04     ` Maxime Coquelin
2021-01-14 16:14       ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 06/40] net/virtio: move PCI specific dev init to PCI ethdev init Maxime Coquelin
2020-12-30  3:05   ` Xia, Chenbo
2021-01-06  8:58   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 07/40] net/virtio: move MSIX detection to PCI ethdev Maxime Coquelin
2020-12-30  3:05   ` Xia, Chenbo
2021-01-06  8:22   ` David Marchand
2021-01-14 17:19     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 08/40] net/virtio: force IOVA as VA mode for Virtio-user Maxime Coquelin
2020-12-30  3:06   ` Xia, Chenbo
2021-01-06  9:06   ` David Marchand
2021-01-06  9:11     ` Thomas Monjalon
2021-01-06  9:22       ` Maxime Coquelin
2021-01-06 16:37       ` Kinsella, Ray
2021-01-06  9:14     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 09/40] net/virtio: store PCI type in Virtio device metadata Maxime Coquelin
2020-12-30  3:07   ` Xia, Chenbo
2021-01-06  9:14   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 10/40] net/virtio: add callback for device closing Maxime Coquelin
2020-12-30  3:07   ` Xia, Chenbo
2021-01-06  9:33   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 11/40] net/virtio: validate features at bus level Maxime Coquelin
2020-12-30  3:08   ` Xia, Chenbo
2021-01-06  9:33   ` David Marchand
2021-01-15  9:20     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 12/40] net/virtio: remove bus type enum Maxime Coquelin
2020-12-30  3:08   ` Xia, Chenbo
2021-01-06  9:33   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 13/40] net/virtio: move PCI-specific fields to PCI device Maxime Coquelin
2020-12-30  3:08   ` Xia, Chenbo
2021-01-06  9:58   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 14/40] net/virtio: pack virtio HW struct Maxime Coquelin
2020-12-30  3:09   ` Xia, Chenbo
2021-01-06  9:58   ` David Marchand
2021-01-15  9:35     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 15/40] net/virtio: move legacy IO to Virtio PCI Maxime Coquelin
2020-12-30  3:09   ` Xia, Chenbo
2021-01-06 10:09   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 16/40] net/virtio: introduce generic virtio header Maxime Coquelin
2020-12-30  3:09   ` Xia, Chenbo
2021-01-06 10:08   ` David Marchand
2021-01-15  9:39     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 17/40] net/virtio: move features definition to generic header Maxime Coquelin
2020-12-30  3:14   ` Xia, Chenbo
2021-01-14  8:40     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 18/40] net/virtio: move virtqueue defines in " Maxime Coquelin
2020-12-30  3:14   ` Xia, Chenbo
2021-01-06 15:53   ` David Marchand
2021-01-15 10:55     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 19/40] net/virtio: move config definitions to " Maxime Coquelin
2020-12-30  3:15   ` Xia, Chenbo
2021-01-06 16:01   ` David Marchand
2021-01-15 11:01     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 20/40] net/virtio: make interrupt handling more generic Maxime Coquelin
2020-12-30  3:17   ` Xia, Chenbo
2021-01-14  8:43     ` Maxime Coquelin
2021-01-06 16:07   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 21/40] net/virtio: move vring alignment to generic header Maxime Coquelin
2020-12-30  3:18   ` Xia, Chenbo
2021-01-06 16:13   ` David Marchand
2020-12-20 21:13 ` [dpdk-dev] [PATCH 22/40] net/virtio: remove last PCI refs in non-PCI code Maxime Coquelin
2020-12-30  3:25   ` Xia, Chenbo
2021-01-14  8:46     ` Maxime Coquelin
2021-01-06 16:18   ` David Marchand
2021-01-15 11:10     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 23/40] net/virtio: make Vhost-user req sender consistent Maxime Coquelin
2021-01-06 11:50   ` Xia, Chenbo
2021-01-15  9:47     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 24/40] net/virtio: add Virtio-user ops to set owner Maxime Coquelin
2021-01-06 11:50   ` Xia, Chenbo
2020-12-20 21:13 ` [dpdk-dev] [PATCH 25/40] net/virtio: add Virtio-user features ops Maxime Coquelin
2021-01-06 11:54   ` Xia, Chenbo
2021-01-13 13:43     ` Adrian Moreno
2021-01-13 13:54       ` Maxime Coquelin
2021-01-15 14:19       ` Maxime Coquelin
2021-01-13 13:57   ` Adrian Moreno
2021-01-15 14:29     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 26/40] net/virtio: add Virtio-user protocol " Maxime Coquelin
2021-01-06 11:55   ` Xia, Chenbo
2020-12-20 21:13 ` [dpdk-dev] [PATCH 27/40] net/virtio: add Virtio-user memory tables ops Maxime Coquelin
2021-01-06 11:57   ` Xia, Chenbo
2021-01-15  9:57     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 28/40] net/virtio: add Virtio-user vring setting ops Maxime Coquelin
2021-01-05 21:24   ` David Marchand
2021-01-06 12:01   ` Xia, Chenbo
2021-01-15 10:12     ` Maxime Coquelin
2021-01-06 12:03   ` Xia, Chenbo
2021-01-15 10:15     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 29/40] net/virtio: add Virtio-user vring file ops Maxime Coquelin
2021-01-05 21:24   ` David Marchand
2021-01-06 12:04   ` Xia, Chenbo
2021-01-15 10:17     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 30/40] net/virtio: add Virtio-user vring address ops Maxime Coquelin
2021-01-06 12:06   ` Xia, Chenbo
2021-01-15 10:19     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 31/40] net/virtio: add Virtio-user status ops Maxime Coquelin
2021-01-06 12:09   ` Xia, Chenbo
2021-01-15 10:48     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 32/40] net/virtio: remove useless request ops Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 33/40] net/virtio: improve Virtio-user errors handling Maxime Coquelin
2021-01-07  2:26   ` Xia, Chenbo
2021-01-15 11:09     ` Maxime Coquelin
2020-12-20 21:13 ` [dpdk-dev] [PATCH 34/40] net/virtio: move Vhost-user reqs to Vhost-user backend Maxime Coquelin
2020-12-20 21:14 ` [dpdk-dev] [PATCH 35/40] net/virtio: make server mode blocking Maxime Coquelin
2021-01-07  3:20   ` Xia, Chenbo
2021-01-15 11:13     ` Maxime Coquelin
2020-12-20 21:14 ` [dpdk-dev] [PATCH 36/40] net/virtio: move protocol features to Vhost-user Maxime Coquelin
2020-12-20 21:14 ` [dpdk-dev] [PATCH 37/40] net/virtio: introduce backend data Maxime Coquelin
2021-01-05 21:26   ` David Marchand
2021-01-13 17:18   ` Adrian Moreno
2021-01-15 16:49     ` Maxime Coquelin
2020-12-20 21:14 ` Maxime Coquelin [this message]
2021-01-07  6:32   ` [dpdk-dev] [PATCH 38/40] net/virtio: move Vhost-user specifics to its backend Xia, Chenbo
2021-01-15 12:03     ` Maxime Coquelin
2020-12-20 21:14 ` [dpdk-dev] [PATCH 39/40] net/virtio: move Vhost-kernel data " Maxime Coquelin
2021-01-07  6:42   ` Xia, Chenbo
2021-01-11  8:02   ` Xia, Chenbo
2021-01-15 11:54     ` Maxime Coquelin
2021-01-18 20:36     ` Maxime Coquelin
2020-12-20 21:14 ` [dpdk-dev] [PATCH 40/40] net/virtio: move Vhost-vDPA " Maxime Coquelin
2020-12-22 15:20   ` Maxime Coquelin
2021-01-07  6:50   ` Xia, Chenbo
2021-01-15 12:08     ` Maxime Coquelin
2021-01-11  8:05   ` Xia, Chenbo
2020-12-21 10:58 ` [dpdk-dev] [PATCH 00/40] net/virtio: Virtio PMD rework Maxime Coquelin

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=20201220211405.313012-39-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git