From nobody Sun May 5 15:52:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503280376643639.0056574868344; Sun, 20 Aug 2017 18:52:56 -0700 (PDT) Received: from localhost ([::1]:55086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djbtf-0001Bj-1S for importer@patchew.org; Sun, 20 Aug 2017 21:52:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djbsf-0000hg-Nh for qemu-devel@nongnu.org; Sun, 20 Aug 2017 21:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djbsc-0004wq-Mp for qemu-devel@nongnu.org; Sun, 20 Aug 2017 21:51:53 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:28132 helo=zte.com.cn) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djbsc-0004w8-Cg for qemu-devel@nongnu.org; Sun, 20 Aug 2017 21:51:50 -0400 Received: from unknown (HELO mse01.zte.com.cn) (10.30.3.20) by localhost with (AES256-SHA encrypted) SMTP; 21 Aug 2017 01:51:27 -0000 Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id v7L1pTnj032942; Mon, 21 Aug 2017 09:51:29 +0800 (GMT-8) (envelope-from lu.zhipeng@zte.com.cn) Received: from ceshi.localdomain ([10.74.120.130]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2017082109513064-351093 ; Mon, 21 Aug 2017 09:51:30 +0800 X-scanvirus: By SEG_CYREN AntiVirus Engine X-scanresult: CLEAN X-MAILFROM: X-RCPTTO: X-FROMIP: 10.30.3.20 X-SEG-Scaned: 1 X-Received: unknown,10.30.3.20,20170821095127 From: ZhiPeng Lu To: mst@redhat.com Date: Mon, 21 Aug 2017 09:50:23 +0800 Message-Id: <1503280223-6880-1-git-send-email-lu.zhipeng@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2017-08-21 09:51:30, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2017-08-21 09:51:29, Serialize complete at 2017-08-21 09:51:29 X-MAIL: mse01.zte.com.cn v7L1pTnj032942 X-HQIP: 127.0.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 63.217.80.70 Subject: [Qemu-devel] [PATCH] vhost: don't set vring call fd to -1 in vhost_virtqueue_start for vhost-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ZhiPeng Lu , jasowang@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" commit 96a3d98d2cdbd897ff5ab33427aa4cfb94077665 (vhost: don't set vring call if no vector) set vring call fd to -1 for drivers does not use interrupt at all(e.g virtio-net pmd). That patch setting vring call fd to -1 cause the network to not work when running dpdk in the guest. The openvswitch port status is down by executing the command "ovs-vsctl list interface" in host of running the guest. The network is ok if it doesn't set vring cal= l fd to -1 in vhost_virtqueue_start. The patch doesn't set vring call fd to -1 for vhost-user. Signed-off-by: ZhiPeng Lu --- hw/virtio/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 6eddb09..bb8db7d 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1098,7 +1098,8 @@ static int vhost_virtqueue_start(struct vhost_dev *de= v, =20 if (k->query_guest_notifiers && k->query_guest_notifiers(qbus->parent) && - virtio_queue_vector(vdev, idx) =3D=3D VIRTIO_NO_VECTOR) { + virtio_queue_vector(vdev, idx) =3D=3D VIRTIO_NO_VECTOR && + vdev->use_guest_notifier_mask) { file.fd =3D -1; r =3D dev->vhost_ops->vhost_set_vring_call(dev, &file); if (r) { --=20 1.8.3.1