From patchwork Fri Jul 23 19:55:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 484665 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1640593jao; Fri, 23 Jul 2021 12:57:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzMZGjnQ4bG+FvaZqZpTmWKX4LMz8M1g+5/bmZ1bVRpwEZXNBFHlBC9nEx0ZgSHsk2sYK0 X-Received: by 2002:a17:906:f8da:: with SMTP id lh26mr6115180ejb.203.1627070267914; Fri, 23 Jul 2021 12:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627070267; cv=none; d=google.com; s=arc-20160816; b=Lr2KWFN+g1SaNGsulCCY24Ap79/iaOqCUUhn0XvXDUkUIL1lAC03zWR5/y/xalpyV+ zKRFjto3EhE5ncs+h2sYF/VODqVniHVtbafnpvP5vO15Hkv078zC2wCa8kEDVPEsntE7 HL0mXxdqZzfs1aEQMFxyExhgyajcnGXk52BF5j8RuTPVGjZ8yJ+7SqPwBkQZb/hJu6Zb o1qP5VLWUu8V0CjGiVHmpkE1XBX2itT19wsrBUxdD08/WcIxU+EDCr3RLI0WEgy1R52V FYGpkxgjrZdCtJ0C9Dk68iZq/5sr/Qth/FBbRjq7l54mBwBDyNZHN4yucHzf2941uSBe fA6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:errors-to:sender:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:cc :mime-version:message-id:date:subject:to:from:delivered-to :dkim-signature; bh=sn4MYzWI0e38j0dFXBErp99/ntrSC2Wdif0q+5K3saY=; b=iPar0Vrk0lWBERvVBrRLeDxaLG2MsMjWZoz3AP9Dc8Xq7riuSDswO7uJ7UJnQ5B97/ 2Zkl8q/HgxLpLLc9N+bOISkyPzdVZRbusY5+KrjvJtz3L6T8ZdQYU1+QmQ6TSec/3X3R S48oNlWF3qT3ZeL1Zzce/1X162SEJUdl1lfnJ27BmgYwV0m2pY2t8PYaiK6qDM+6+uzJ uNCU5uJ1bGLXRCnCWs8kOrwes43sbJXu5kkFY+tVK7gCXKPgDWWizg7HMr4DdE3oiHRh JYGBE/XgMKKWx6DQh6TlgTMOVS8XPZtFmM0k0NPTWkL19YvG36Mv6FQKHD6rWKr3/lb1 EOvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="KZaJ75/R"; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by mx.google.com with ESMTPS id m1si4513479ejj.198.2021.07.23.12.57.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jul 2021 12:57:47 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="KZaJ75/R"; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627070266; 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=KZaJ75/RELQDuxw/irLoBGgSyfaOnnsPPXICM9lCPOu+AKFO285534XYNX7rW8b5SVgfdL mkxh85PbZfLykCucJKlD1/oFvGOvd+CdgcSJflJO5FLDpmUdCnpRp6KslCRBOQONr7m0kz qNPZ1M59mw//BhAVBui71KDU16ljXmw= 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 X-MC-Unique: eIxdgCJhNQiJY8DYFPer2g-1 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) Delivered-To: libvir-list@redhat.com 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) 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 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 --- src/qemu/qemu_vhost_user.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.31.1 Reviewed-by: Peter Krempa 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 = &vu->capabilities.gpu; virJSONValue *featuresJSON; size_t nfeatures; + size_t nparsed = 0; size_t i; g_autoptr(qemuVhostUserGPUFeature) features = NULL; @@ -299,17 +300,16 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUser *vu, int tmp; if ((tmp = qemuVhostUserGPUFeatureTypeFromString(tmpStr)) <= 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unknown feature %s"), - tmpStr); + VIR_DEBUG("ignoring unknown QEMU vhost-user feature '%s'", tmpStr); continue; } - features[i] = tmp; + features[nparsed] = tmp; + nparsed++; } gpu->features = g_steal_pointer(&features); - gpu->nfeatures = nfeatures; + gpu->nfeatures = nparsed; return 0; }