From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhiyong Yang Subject: [PATCH 0/4] add to support for virtio-user server mode Date: Wed, 14 Feb 2018 22:53:26 +0800 Message-ID: <20180214145330.4679-1-zhiyong.yang@intel.com> Cc: dong1.wang@intel.com To: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, jianfeng.tan@intel.com, tiwei.bie@intel.com, zhihong.wang@intel.com Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EBB2E1B2F8 for ; Wed, 14 Feb 2018 15:53:35 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When vhost user/ovs-dpdk restart, virtio user is expected to keep alive so that vhost user can reconnect it successfully and continue to exchange packets. The series support the feature and target for 18.05 release. Virtio user with server mode creates socket file and then starts to wait for first connection from vhost user with client mode in blocking mode. Virtio user with server mode supports many times' vhost reconnections with same configurations. Virtio user supports only one connection at the same time in server/client mode. How to test? for example: ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3 -n 4 -m 256,0 --no-pci \ --file-prefix=testpmd0 --vdev=net_virtio_user0,mac=00:11:22:33:44:10, \ path=/tmp/sock0,server=1,queues=1 -- -i --rxq=1 --txq=1 --no-numa ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3e000 -n 4 --socket-mem 256,0 \ --vdev 'net_vhost0,iface=/tmp/sock0,client=0,queues=1' -- -i --rxq=1 --txq=1 \ --nb-cores=1 --no-numa Zhiyong Yang (4): vhost: move fdset functions from fd_man.c to fd_man.h net/virtio-user: add data members to support server mode net/virtio-user: support server mode net/vhost: add memory checking to support client mode drivers/net/vhost/rte_eth_vhost.c | 9 + drivers/net/virtio/virtio_ethdev.c | 9 +- drivers/net/virtio/virtio_user/vhost_user.c | 77 ++++++- drivers/net/virtio/virtio_user/virtio_user_dev.c | 44 ++-- drivers/net/virtio/virtio_user/virtio_user_dev.h | 8 + drivers/net/virtio/virtio_user_ethdev.c | 81 ++++++- lib/librte_vhost/Makefile | 3 +- lib/librte_vhost/fd_man.c | 274 ----------------------- lib/librte_vhost/fd_man.h | 258 ++++++++++++++++++++- 9 files changed, 456 insertions(+), 307 deletions(-) delete mode 100644 lib/librte_vhost/fd_man.c -- 2.13.3