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 EBB2E1B2F8 for ; Wed, 14 Feb 2018 15:53:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 06:53:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,512,1511856000"; d="scan'208";a="17661389" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by fmsmga007.fm.intel.com with ESMTP; 14 Feb 2018 06:53:33 -0800 From: Zhiyong Yang To: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com, jianfeng.tan@intel.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dong1.wang@intel.com Date: Wed, 14 Feb 2018 22:53:26 +0800 Message-Id: <20180214145330.4679-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH 0/4] add to support for virtio-user server mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 14:53:36 -0000 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