Thread (14 messages) 14 messages, 3 authors, 2016-08-23

Re: [PATCH 2/2] examples/vhost: support multiple socket files

flat view

From: Yuanhan Liu <hidden>
Date: 2016-08-18 08:34:23

On Thu, Aug 18, 2016 at 10:27:55AM +0200, Maxime Coquelin wrote:

On 08/16/2016 06:14 PM, Jiayu Hu wrote:
quoted
When examples/vhost runs in client mode, only one QEMU can be connected.
This is because that examples/vhost just supports one socket file. This
patch is to add multiple sockets support for examples/vhost.

Signed-off-by: Jiayu Hu <redacted>
---
examples/vhost/main.c | 50 ++++++++++++++++++++++++++++++++++++++------------
1 file changed, 38 insertions(+), 12 deletions(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index a718577..9974f0b 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -136,8 +136,9 @@ static uint32_t burst_rx_delay_time = BURST_RX_WAIT_US;
/* Specify the number of retries on RX. */
static uint32_t burst_rx_retry_num = BURST_RX_RETRIES;

-/* Socket file path. Can be set by user */
-static char socket_file[PATH_MAX] = "vhost-net";
Default name being removed, you can drop my comment on patch 1. :)
quoted
+/* Socket file paths. Can be set by user */
+static char *socket_files;
+int nb_sockets;
Any reason not to make it static?
Right, it should be "static". Hmm, I missed it in review :(

	--yliu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help