[dpdk-dev] [PATCH v2 0/5] add support for virtio-user server mode
zhiyong.yang at intel.com
zhiyong.yang at intel.com
Thu Mar 15 10:45:09 CET 2018
In a container environment if the vhost-user backend restarts, there's no way
for it to reconnect to virtio-user currently. To address this, support for
server mode is added. In this mode the socket file is created by virtio-user,
which the backend then connects to. This means that if the backend restarts,
it can reconnect to virtio-user and continue communications.
The series add support for the feature and target for 18.05 release.
Virtio-user with server mode creates socket file and then starts to wait for the
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?
The following scripts are as reference.
./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=1,queues=1' -- -i --rxq=1 --txq=1 \
--nb-cores=1 --no-numa
step1 : at the virio-user side, run "start"
step2: at the vhost-user side run "start tx_first 40000"
Changes in V2:
1. split two patch 1/5 and 2/5 from v1 patchset to fix some existing issues which is not
strongly related to support for server mode according to Maxime's comments.
2. move fdset related functions to librte_eal from librte_vhost exposed as
new APIs according to Thomas' comments.
3. release note is added in the patch 5/5.
4. squash data structure change patch into 4/5 according to Maxime's suggestion.
Zhiyong Yang (5):
net/virtio: fix add pointer checking
net/virtio: add checking for cvq
eal: expose fdset related APIs
net/virtio-user: add support for server mode
net/vhost: add memory checking
doc/guides/rel_notes/release_18_05.rst | 7 +
drivers/net/vhost/rte_eth_vhost.c | 9 +
drivers/net/virtio/virtio_ethdev.c | 10 +-
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 | 82 +++++-
lib/librte_eal/common/include/rte_eal_interrupts.h | 56 +++++
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 257 +++++++++++++++++++
lib/librte_eal/rte_eal_version.map | 10 +
lib/librte_vhost/Makefile | 2 +-
lib/librte_vhost/fd_man.c | 274 ---------------------
lib/librte_vhost/fd_man.h | 40 ---
lib/librte_vhost/socket.c | 22 +-
14 files changed, 548 insertions(+), 350 deletions(-)
delete mode 100644 lib/librte_vhost/fd_man.c
delete mode 100644 lib/librte_vhost/fd_man.h
--
2.14.3
More information about the dev
mailing list