From nobody Tue Feb 10 11:14:24 2026 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527794701268749.1549348674587; Thu, 31 May 2018 12:25:01 -0700 (PDT) Received: from localhost ([::1]:45781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOTBq-0005Ax-UL for importer@patchew.org; Thu, 31 May 2018 15:24:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOT9r-00041z-Ou for qemu-devel@nongnu.org; Thu, 31 May 2018 15:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOT9q-0008R6-Ot for qemu-devel@nongnu.org; Thu, 31 May 2018 15:22:47 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:55070) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOT9q-0008QM-IN for qemu-devel@nongnu.org; Thu, 31 May 2018 15:22:46 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 8DD6C99A; Thu, 31 May 2018 21:22:45 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yFzBLrEb7aZq; Thu, 31 May 2018 21:22:42 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (unknown [109.190.253.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CB861945; Thu, 31 May 2018 21:22:40 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.91) (envelope-from ) id 1fOT9i-00013T-Gc; Thu, 31 May 2018 21:22:38 +0200 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org Date: Thu, 31 May 2018 21:22:34 +0200 Message-Id: <20180531192237.3994-7-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531192237.3994-1-samuel.thibault@ens-lyon.org> References: <20180531192237.3994-1-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PULL 6/9] slirp: Send window updates to guest after window was closed 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: jan.kiszka@siemens.com, James Clarke , stefanha@redhat.com, Samuel Thibault 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" From: James Clarke If the receive window presented to the guest closes, slirp should send a window update once the window reopens sufficiently, rather than forcing the guest to send a window probe, which can take several seconds. Signed-off-by: James Clarke Signed-off-by: Samuel Thibault --- slirp/slirp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 4f29753444..5c3bd6163f 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -678,13 +678,13 @@ void slirp_pollfds_poll(GArray *pollfds, int select_e= rror) /* continue; */ } else { ret =3D sowrite(so); + if (ret > 0) { + /* Call tcp_output in case we need to send a w= indow + * update to the guest, otherwise it will be s= tuck + * until it sends a window probe. */ + tcp_output(sototcpcb(so)); + } } - /* - * XXXXX If we wrote something (a lot), there - * could be a need for a window update. - * In the worst case, the remote will send - * a window probe to get things going again - */ } =20 /* --=20 2.17.0