From: zhiyong.yang@intel.com
To: dev@dpdk.org
Cc: maxime.coquelin@redhat.com, jianfeng.tan@intel.com,
thomas@monjalon.net, zhihong.wang@intel.com, tiwei.bie@intel.com
Subject: [dpdk-dev] [PATCH v4 0/1] server mode virtio-user
Date: Tue, 3 Apr 2018 20:20:08 +0800 [thread overview]
Message-ID: <20180403122009.52876-1-zhiyong.yang@intel.com> (raw)
In-Reply-To: <20180321030343.64399-1-zhiyong.yang@intel.com>
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 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 adds support for server mode in this patch.
Client mode vhost-user startup firstly, server mode virtio-user startups
and creates the socket file to exchange vhost messages.
If the connection is broken, client mode vhost-user can support to
reconnect virtio-user.
Server mode virtio-user supports many times' vhost-user reconnections with
the same parameter configurations.
Virtio-user supports only one connection at the same time in server/client mode.
How to test?
The following scripts are as reference.
step1:
./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
step2:
./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
step3: at the virtio-user side, run "start"
step4: at the vhost-user side, run "start tx_first 40000"
Then you can get the numbers by running "show port stats all" at both sides.
Vhost-user restarts (quit and startup again)and can reconnect virtio-user
successfully again and continue communications.
Changes in V4:
1. Don't create new pthread any more and use librte_eal interrupt thread.
2. virtio-user doesn't work in blocking mode any more for the first connection.
Client mode vhost-user startups firstly, then server mode creates socket file
and startups. Keep consistency with client mode virtio-user.
Changes in V3:
1. use EAL epoll mechanism instead of vhost events. Cancel to export vhost
event APIs.
2. rebase the code on top of dpdk-next-virtio
Changes in V2:
1. split two patches 1/5 and 2/5 from v1 patchset to fix some existing issues
which is not strongly related to support for server mode
2. move fdset related functions to librte_eal from librte_vhost exposed as
new APIs.
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 (1):
net/virtio-user: add support for server mode
doc/guides/rel_notes/release_18_05.rst | 6 ++
drivers/net/virtio/virtio_user/vhost_user.c | 64 ++++++++++++--
drivers/net/virtio/virtio_user/virtio_user_dev.c | 45 +++++++---
drivers/net/virtio/virtio_user/virtio_user_dev.h | 4 +
drivers/net/virtio/virtio_user_ethdev.c | 103 +++++++++++++++++++++--
5 files changed, 194 insertions(+), 28 deletions(-)
--
2.14.3
next prev parent reply other threads:[~2018-04-03 12:20 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 14:53 [dpdk-dev] [PATCH 0/4] add to support for virtio-user server mode Zhiyong Yang
2018-02-14 14:53 ` [dpdk-dev] [PATCH 1/4] vhost: move fdset functions from fd_man.c to fd_man.h Zhiyong Yang
2018-02-27 17:51 ` Maxime Coquelin
2018-02-28 1:36 ` Yang, Zhiyong
2018-02-28 8:45 ` Maxime Coquelin
2018-03-01 6:02 ` Tan, Jianfeng
2018-03-01 14:13 ` Thomas Monjalon
2018-03-05 7:43 ` Yang, Zhiyong
2018-03-05 8:54 ` Thomas Monjalon
2018-03-13 8:46 ` Yang, Zhiyong
[not found] ` <9059097.ABoCBN0gVk@xps>
2018-03-13 9:50 ` Yang, Zhiyong
2018-03-15 9:32 ` Thomas Monjalon
2018-03-16 8:43 ` Yang, Zhiyong
2018-03-21 6:51 ` Yang, Zhiyong
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 0/5] add support for virtio-user server mode zhiyong.yang
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 1/5] net/virtio: fix add pointer checking zhiyong.yang
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 2/5] net/virtio: add checking for cvq zhiyong.yang
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 3/5] eal: expose fdset related APIs zhiyong.yang
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 4/5] net/virtio-user: add support for server mode zhiyong.yang
2018-03-15 9:45 ` [dpdk-dev] [PATCH v2 5/5] net/vhost: add memory checking zhiyong.yang
2018-02-14 14:53 ` [dpdk-dev] [PATCH 2/4] net/virtio-user: add data members to support server mode Zhiyong Yang
2018-02-27 17:53 ` Maxime Coquelin
2018-02-28 1:38 ` Yang, Zhiyong
2018-02-14 14:53 ` [dpdk-dev] [PATCH 3/4] net/virtio-user: " Zhiyong Yang
2018-02-27 18:01 ` Maxime Coquelin
2018-02-28 1:53 ` Yang, Zhiyong
2018-02-28 8:33 ` Maxime Coquelin
2018-02-14 14:53 ` [dpdk-dev] [PATCH 4/4] net/vhost: add memory checking to support client mode Zhiyong Yang
2018-03-21 3:03 ` [dpdk-dev] [PATCH v3 0/4] add support for virtio-user server mode zhiyong.yang
2018-03-21 3:03 ` [dpdk-dev] [PATCH v3 1/4] net/virtio: fix add pointer checking zhiyong.yang
2018-03-28 7:26 ` Tan, Jianfeng
2018-03-28 7:48 ` Yang, Zhiyong
2018-03-29 11:59 ` Maxime Coquelin
2018-03-29 12:01 ` Maxime Coquelin
2018-03-21 3:03 ` [dpdk-dev] [PATCH v3 2/4] net/virtio: add checking for cvq zhiyong.yang
2018-03-28 8:34 ` Tan, Jianfeng
2018-03-29 11:59 ` Maxime Coquelin
2018-03-29 12:06 ` Maxime Coquelin
2018-03-21 3:03 ` [dpdk-dev] [PATCH v3 3/4] net/virtio-user: add support for server mode zhiyong.yang
2018-03-28 15:14 ` Tan, Jianfeng
2018-03-30 2:08 ` Yang, Zhiyong
2018-03-21 3:03 ` [dpdk-dev] [PATCH v3 4/4] net/vhost: add NULL pointer checking zhiyong.yang
2018-03-29 13:19 ` Maxime Coquelin
2018-03-30 2:00 ` Yang, Zhiyong
2018-03-30 7:41 ` Yang, Zhiyong
2018-04-03 12:20 ` zhiyong.yang [this message]
2018-04-03 12:20 ` [dpdk-dev] [PATCH v4 1/1] net/virtio-user: add support for server mode zhiyong.yang
2018-04-03 15:16 ` Tan, Jianfeng
2018-04-04 3:31 ` Yang, Zhiyong
2018-04-04 3:47 ` Tan, Jianfeng
2018-04-04 5:37 ` Tiwei Bie
2018-04-04 9:59 ` Yang, Zhiyong
2018-04-04 14:57 ` Yang, Zhiyong
2018-04-04 17:17 ` [dpdk-dev] [PATCH v5] " zhiyong.yang
2018-04-05 8:29 ` Tiwei Bie
2018-04-05 9:19 ` Yang, Zhiyong
2018-04-06 7:22 ` Yang, Zhiyong
2018-04-05 9:21 ` Yang, Zhiyong
2018-04-06 0:18 ` [dpdk-dev] [PATCH v6] " zhiyong.yang
2018-04-05 18:13 ` Tan, Jianfeng
2018-04-06 7:14 ` Yang, Zhiyong
2018-04-06 9:25 ` [dpdk-dev] [PATCH v7] " zhiyong.yang
2018-04-08 0:36 ` Tan, Jianfeng
2018-04-10 11:55 ` 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=20180403122009.52876-1-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=thomas@monjalon.net \
--cc=tiwei.bie@intel.com \
--cc=zhihong.wang@intel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).