From nobody Sat May 4 06:05:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1627070268; cv=none; d=zohomail.com; s=zohoarc; b=GjjMcAWsgmxq6XkYHh9bFXmmZKLkjjr022TF3n8PLzfVQ7xAF9GtORF5uhHN5LPN6dlwL70AxMRXZnNkvSZeftPJJDWjfcdYbwDUtHCoI2x3o1b6ts34w2EwmiE/4qqiTepqUyVKqz/JINfvbawDoKwcPAbRhSNCKWIrc7R0N7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627070268; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=sn4MYzWI0e38j0dFXBErp99/ntrSC2Wdif0q+5K3saY=; b=cUOFfCJgS9zXpH+kXaAZbYeC2fLaVxAmRyzjQSs5JW7FBaFjVi2waVIdPB/ZIkKNplwQYQ7Tl9I9I3pi6CCcX6rJftd/nHmjZKN6HMCuX8OsftIZV5ax9MDDS/z68DdlhkGYHpcvmJXvyyhfi8cSzgW0P13QJAr3MTxR2ntDjY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1627070268401332.40871922952147; Fri, 23 Jul 2021 12:57:48 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-eIxdgCJhNQiJY8DYFPer2g-1; Fri, 23 Jul 2021 15:57:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D0B8A1005D4F; Fri, 23 Jul 2021 19:57:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C09ED5C1D5; Fri, 23 Jul 2021 19:57:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 69ED54BB7C; Fri, 23 Jul 2021 19:57:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16NJtsqD019865 for ; Fri, 23 Jul 2021 15:55:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D4F918EC5; Fri, 23 Jul 2021 19:55:54 +0000 (UTC) Received: from worklaptop.redhat.com (unknown [10.22.18.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5905687D5; Fri, 23 Jul 2021 19:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627070267; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sn4MYzWI0e38j0dFXBErp99/ntrSC2Wdif0q+5K3saY=; b=YRXl1qEaZNksYu2wOSRpE4xBli/5Kqgas843HIkcaK13E6NotxkZkI62vqtY3UEGlvDFW9 pMhREJpSWOUahWe9/pzm6Xk/vs4MyIlwgRgjm9leDdQE9aimNsCs7BP2QbSIGPCem2GI9H goiGaJYUADUNmARLSDUL7eN3zGxgSrI= X-MC-Unique: eIxdgCJhNQiJY8DYFPer2g-1 From: Cole Robinson To: libvir-list@redhat.com Subject: [PATCH] qemu_vhost_user: don't raise error for unknown features Date: Fri, 23 Jul 2021 15:55:34 -0400 Message-Id: <90c852217f168edcabebb9fa56c6b5cc7f3d2913.1627070134.git.crobinso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Cole Robinson X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627070270132100001 Content-Type: text/plain; charset="utf-8" Similar to what was done for qemu_firmware.c in 61d95a1073, don't report an error for unknown vhost-user features, just log it and correctly continue on Signed-off-by: Cole Robinson Reviewed-by: Peter Krempa --- src/qemu/qemu_vhost_user.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c index bc8e7ad898..75cc718c09 100644 --- a/src/qemu/qemu_vhost_user.c +++ b/src/qemu/qemu_vhost_user.c @@ -280,6 +280,7 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu, qemuVhostUserGPU *gpu =3D &vu->capabilities.gpu; virJSONValue *featuresJSON; size_t nfeatures; + size_t nparsed =3D 0; size_t i; g_autoptr(qemuVhostUserGPUFeature) features =3D NULL; =20 @@ -299,17 +300,16 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu, int tmp; =20 if ((tmp =3D qemuVhostUserGPUFeatureTypeFromString(tmpStr)) <=3D 0= ) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown feature %s"), - tmpStr); + VIR_DEBUG("ignoring unknown QEMU vhost-user feature '%s'", tmp= Str); continue; } =20 - features[i] =3D tmp; + features[nparsed] =3D tmp; + nparsed++; } =20 gpu->features =3D g_steal_pointer(&features); - gpu->nfeatures =3D nfeatures; + gpu->nfeatures =3D nparsed; =20 return 0; } --=20 2.31.1