From nobody Sat Feb 7 07:52:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728670651937924.3245664513598; Fri, 11 Oct 2024 11:17:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DE4EB169E; Fri, 11 Oct 2024 14:17:30 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A375A180D; Fri, 11 Oct 2024 14:13:47 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 916B2170A; Fri, 11 Oct 2024 14:13:37 -0400 (EDT) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3FAA817D5 for ; Fri, 11 Oct 2024 14:13:26 -0400 (EDT) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3e5c6dc6eb4so1017929b6e.0 for ; Fri, 11 Oct 2024 11:13:26 -0700 (PDT) Received: from home.. ([2603:8081:c640:1::1003]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2885844a8b7sm1047097fac.58.2024.10.11.11.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 11:13:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728670405; x=1729275205; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q/KXeWeEa2SGcSZEZbAwvK4P65kvdli9eRp2ZPWiy/k=; b=Y63VESEML8uG+1zGYyLNZ1Y+mUUKlV/K9mqaTrvKUZbtGGwJs6zeUmUMM5PFtFgSiW occCe+l3dn27j7wPgYOrq8lyZYlJ25zgTX8M3Z3vBD2Dd22YtT5octfKG5rbZ6FWqaYq Il4pOlSFu/3isJXDsoV+9u9MCbQNBKs6XxKtvdddJhCkJJSvcDROvJZYITG4GU9YJBnx DRN4WCoQq8fqXceLoh0GoMoSX5oknZqwOuMioVbP8WLkdeUmfbof2H5ty6vTe8sDFKdv Lng43aYxi+NzAdqNrVWKvYxAj8mZ+cIs9eK/OPidprsKrSzxRn3gbkJD7sobbEVLZ8f3 KOhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728670405; x=1729275205; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/KXeWeEa2SGcSZEZbAwvK4P65kvdli9eRp2ZPWiy/k=; b=t8rvCh0qTk9cIuk0SlpOF8NshLj/tgcUhPN+WtGndg/GCjs6M51JXODxzq3qfRfaHl EPM/SHHvT+HAlI5P4WRCAWBysWQV2rWbKcdMyUiOy/pnJAwJY43fl8eNwElHQT5cuRzv JPui1DiNSzoeTaI4bELMDtsxte2Wmfz+JlTHGxtsz8ayTcJMvEV6FJQFLJ/Uplxp0cwu WEqytNBBJXFh5KMNBiDS7sbSeirh29LCLIixSlBs4NqRDdkoiIF84GT3YFePvzwHvi65 a21flBCBrHraCC6Btfde3BTPQ/B/YTDbV0Mc/gtGNJ8P4nZeFF1sDVHUaLJAEAxWQWaa SS+A== X-Gm-Message-State: AOJu0Yzc+3pESwEdGlG0863p6x/ILhCbjzVdHSmCly9GLjkRN9RlmRBH ONqXl/vqRWty6SXrwoVhglxdLMfgvAQ9ViE9FDumETrPYSIC9t7sQS1s1Q== X-Google-Smtp-Source: AGHT+IEwmu4QWbJkmWffp6H2g6hdRnx+Y/SMn5PXcXPiLb1eTSjCnCZzaGiEyDpl1KLdqybEvDBTUQ== X-Received: by 2002:a05:6870:418f:b0:270:2c3:f362 with SMTP id 586e51a60fabf-2886df67f30mr3390397fac.32.1728670405123; Fri, 11 Oct 2024 11:13:25 -0700 (PDT) From: Praveen K Paladugu X-Google-Original-From: Praveen K Paladugu To: devel@lists.libvirt.org Subject: [PATCH 10/10] ch: explicitly set INFILESIZE to 0 Date: Fri, 11 Oct 2024 13:13:11 -0500 Message-ID: <20241011181311.6813-11-prapal@linux.microsoft.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241011181311.6813-1-prapal@linux.microsoft.com> References: <20241011181311.6813-1-prapal@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JFPPBS6VJ7XH4STXT72LC6TQLREPV464 X-Message-ID-Hash: JFPPBS6VJ7XH4STXT72LC6TQLREPV464 X-MailFrom: praveenkpaladugu@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: liuwe@microsoft.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728670652549116600 Content-Type: text/plain; charset="utf-8" While sending API requests that don't need any body, explicitly set CURLOPT_INFILESIZE to 0. Without this option, curl sends a chunked request with `Expect: 100-continu= e` header. The client, in this case curl, expects a response from the server, ch in this case, to respond within a timeout period. If guest definition has a PCI passthrough device configuration, cloud-hypervisor process cannot respond within above mentioned timeout. Even if cloud-hypervisor responds after the timeout, curl cannot read the response. Because of this, virsh request to create a guest, hangs. This only happens while using "mshv" hypervisor. By setting CURLOPT_INFILESIZE to O, curl drops the Expect header and sychronously waits for server to respond. Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 3e49902791..e9b70abb69 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@ -684,6 +684,7 @@ virCHMonitorPutNoContent(virCHMonitor *mon, const char = *endpoint) curl_easy_setopt(mon->handle, CURLOPT_URL, url); curl_easy_setopt(mon->handle, CURLOPT_UPLOAD, 1L); curl_easy_setopt(mon->handle, CURLOPT_HTTPHEADER, NULL); + curl_easy_setopt(mon->handle, CURLOPT_INFILESIZE, 0L); =20 responseCode =3D virCHMonitorCurlPerform(mon->handle); =20 --=20 2.44.0