From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 34BE65A026D for ; Sat, 20 Apr 2024 21:19:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713640764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rr6FlRCOoJqMg/0okCLE+XF/Xle00fi87LrvB30HKtQ=; b=TJfqpRuHDgjWE8yv29Oc9sF5D6dEDzDxbt/m1DmSt98QxDRLJ5dlqavO5jOK5In35UtcfU yu57i0670mXfd2RokXMJzVPG/ezE8P5ygsUEWE9YhMmMK6PcmNa+GQR9kyA0LPa70+dqkV fZ5svY6X4NvcyiHCJeDmKBAWt5g7TA4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-508-gsYVRibSN9yyIVFrd09Slw-1; Sat, 20 Apr 2024 15:19:22 -0400 X-MC-Unique: gsYVRibSN9yyIVFrd09Slw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2997518065B2 for ; Sat, 20 Apr 2024 19:19:22 +0000 (UTC) Received: from fenrir.redhat.com (unknown [10.22.34.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFC6F43FB1; Sat, 20 Apr 2024 19:19:21 +0000 (UTC) From: Jon Maloy To: passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com, jmaloy@redhat.com Subject: [PATCH 2/2] tcp: allow retransmit when peer receive window is zero Date: Sat, 20 Apr 2024 15:19:20 -0400 Message-ID: <20240420191920.104876-3-jmaloy@redhat.com> In-Reply-To: <20240420191920.104876-1-jmaloy@redhat.com> References: <20240420191920.104876-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: T2MVBXFHPTJHMSDNK2GEQATJGIGUJ4ZC X-Message-ID-Hash: T2MVBXFHPTJHMSDNK2GEQATJGIGUJ4ZC X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: QSBidWcgaW4ga2VybmVsIFRDUCBtYXkgbGVhZCB0byBhIGRlYWRsb2NrIHdoZXJlIGEgemVybyB3 aW5kb3cgaXMgc2VudA0KZnJvbSB0aGUgcGVlciwgd2hpbGUgYnVmZmVyIHJlYWRzIGRvZXNuJ3Qg bGVhZCB0byBpdCBiZWluZyB1cGRhdGVkLg0KQXQgdGhlIHNhbWUgdGltZSwgdGhlIHplcm8gd2lu ZG93IHN0b3BzIHRoaXMgc2lkZSBmcm9tIHNlbmRpbmcgb3V0DQptb3JlIGRhdGEgdG8gdHJpZ2dl ciBuZXcgYWR2ZXJ0aXNlbWVudHMgdG8gYmUgc2VudCBmcm9tIHRoZSBwZWVyLg0KDQpSRkMgNzkz IHN0YXRlcyB0aGF0IGl0IGFsd2F5cyBpcyBwZXJtaXR0ZWQgZm9yIGE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