From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6FBEC23D for ; Wed, 25 Jul 2018 04:41:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 19:40:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,400,1526367600"; d="scan'208";a="75679173" Received: from dpdk-test32.sh.intel.com ([10.67.119.193]) by orsmga001.jf.intel.com with ESMTP; 24 Jul 2018 19:40:58 -0700 From: Marvin Liu To: tiwei.bie@intel.com, dev@dpdk.org Cc: Marvin Liu Date: Wed, 25 Jul 2018 18:25:56 +0800 Message-Id: <20180725102556.68604-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180724151649.44490-1-yong.liu@intel.com> References: <20180724151649.44490-1-yong.liu@intel.com> Subject: [dpdk-dev] [PATCH v3] examples/vhost: workaround qemu abort 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, 25 Jul 2018 02:41:01 -0000 Current qemu vhost net ring start has a dependency on feature bit VHOST_USER_F_PROTOCOL_FEATURES. Without this feature, vhost ring can't enabled and ioevent fd won't be deleted after vhost device stop. That will cause qemu abort when reloading driver. Work around qemu issues by enabling feature bit in vhost user backend. Signed-off-by: Marvin Liu diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2175c1186..8573004dd 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1520,7 +1520,10 @@ main(int argc, char *argv[]) } if (builtin_net_driver) - rte_vhost_driver_set_features(file, VIRTIO_NET_FEATURES); + /* Workaround for qemu vhost net device startup */ + rte_vhost_driver_set_features(file, + VIRTIO_NET_FEATURES | + 1ULL << VHOST_USER_F_PROTOCOL_FEATURES); if (mergeable == 0) { rte_vhost_driver_disable_features(file, -- 2.17.0