From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 3F7CE5A0271; Thu, 16 Jan 2025 21:32:50 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 1/4] tcp: Fix ACK sequence getting out of sync on EPOLLOUT wake-up Date: Thu, 16 Jan 2025 21:32:47 +0100 Message-ID: <20250116203250.784496-2-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250116203250.784496-1-sbrivio@redhat.com> References: <20250116203250.784496-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: SEUKB5M24IXRX3H2VBHXRWH7WEU2CQZG X-Message-ID-Hash: SEUKB5M24IXRX3H2VBHXRWH7WEU2CQZG X-MailFrom: sbrivio@passt.top 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 CC: Asahi Lina , Sergio Lopez , Jon Maloy , David Gibson 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: SW4gdGhlIG5leHQgcGF0Y2hlcywgSSdtIGV4dGVuZGluZyB0aGUgdXNhZ2Ugb2YgU1RBTExFRCB0 byBhIGZldyBtb3JlDQpjYXNlcy4NCg0KRG9pbmcgc28gcmV2ZWFsZWQgdGhpcyBpc3N1ZTogaWYg d2Ugc2V0IFNUQUxMRUQgYW5kLCBjb25zZXF1ZW50bHksDQpFUE9MTE9VVCAod2hpY2ggaXMgd3Jv bmcsIGZpeGVkIGxhdGVyKSByaWdodCBhZnRlciB3ZSBzZXQgYSBjb25uZWN0aW9uDQp0byBFU1RB QkxJU0hFRCAod2hpY2ggYWxzbyBoYXBwZW5lZCBieSBtaXN0YWtlIHdoaWx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