DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/vhost: fix qemu abort
@ 2018-07-24 15:16 Marvin Liu
  2018-07-25  1:23 ` Tiwei Bie
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marvin Liu @ 2018-07-24 15:16 UTC (permalink / raw)
  To: tiwei.bie, dev; +Cc: maxime.coquelin, zhihong.wang, Marvin Liu

When start vhost sample with builtin-net-driver argument, vhost feature
bit will be zero. If VHOST_USER_F_PROTOCOL_FEATURES is not set, vhost
net start will be failed in qemu. This occasion will cause device stop
action was skipped. Consequently, same ioevent fd will be added second
time after reload driver and then cause qemu abort. Add feature bit
which has been supported by vhost library can fix this error.

Fixes: ca059fa5 ("examples/vhost: demonstrate the new generic APIs")

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 2175c1186..44aec2f47 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1520,7 +1520,8 @@ main(int argc, char *argv[])
 		}
 
 		if (builtin_net_driver)
-			rte_vhost_driver_set_features(file, VIRTIO_NET_FEATURES);
+			rte_vhost_driver_set_features(file,
+				1ULL << VHOST_USER_F_PROTOCOL_FEATURES);
 
 		if (mergeable == 0) {
 			rte_vhost_driver_disable_features(file,
-- 
2.17.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-26  5:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 15:16 [dpdk-dev] [PATCH] examples/vhost: fix qemu abort Marvin Liu
2018-07-25  1:23 ` Tiwei Bie
2018-07-25  9:56 ` [dpdk-dev] [PATCH v2] examples/vhost: workaround " Marvin Liu
2018-07-25  2:18   ` Tiwei Bie
2018-07-25  2:42     ` Liu, Yong
2018-07-25 10:25 ` [dpdk-dev] [PATCH v3] " Marvin Liu
2018-07-25  6:39   ` Tiwei Bie
2018-07-26  5:42     ` Liu, Yong

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).