From patchwork Thu Jul 10 02:19:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 116006 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46F03385772F for ; Thu, 10 Jul 2025 02:20:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46F03385772F X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 5093D3858C56 for ; Thu, 10 Jul 2025 02:19:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5093D3858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5093D3858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.10.215.148 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752113966; cv=none; b=GtcdzJrkWB886l8hpIRg/qvHqfs+h8nvytxGJ3etarl5Ug56ypkZBSfgEaezqEPITSlp2L8j7WVTW8uujlRI8DXGwL8uc3V5S0OjiDZLBr7nnVaQ+5hNkReBB8qOrWovCY/HGPdenKZFt0GCkJPBYPSkXUtkdXBdMr/crN0sQgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752113966; c=relaxed/simple; bh=RaK1bYnLv8QkuZ+0M75osIbsH48ZaBMIQMnjPvT55o8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NHxiKhL9r9Wn0VUvDEyiMlzTT7Rdik6pVZAVsp4yTEbwB/i/qsTEnA435vFOnGGAUB59UI0Nf4hHyDZh3FnlgW2Dhmy9/89T8YJUh+5R7+5s4pD25cTP/w74FJQRL9F+CWe0VF4EeeSAnZBxRBY84DyjrAW8d/xSSoMq5vxViqM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5093D3858C56 Received: from sslproxy06.your-server.de ([78.46.172.3]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1uZgsd-000KHS-2W for newlib@sourceware.org; Thu, 10 Jul 2025 04:19:23 +0200 Received: from localhost ([127.0.0.1]) by sslproxy06.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uZgsd-000Dde-2A for newlib@sourceware.org; Thu, 10 Jul 2025 04:19:23 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 37D5848018E for ; Thu, 10 Jul 2025 04:19:23 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10032) with ESMTP id HO2J2zXryR1j for ; Thu, 10 Jul 2025 04:19:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id BC207480192 for ; Thu, 10 Jul 2025 04:19:22 +0200 (CEST) X-Virus-Scanned: amavis at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavis, port 10026) with ESMTP id RvSe0OIGzkUP for ; Thu, 10 Jul 2025 04:19:22 +0200 (CEST) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 8DA3B480157 for ; Thu, 10 Jul 2025 04:19:22 +0200 (CEST) From: Sebastian Huber To: newlib@sourceware.org Subject: [PATCH 1/7] tcp: LRO timestamps have lost their previous precision Date: Thu, 10 Jul 2025 04:19:12 +0200 Message-ID: <20250710021918.112394-2-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250710021918.112394-1-sebastian.huber@embedded-brains.de> References: <20250710021918.112394-1-sebastian.huber@embedded-brains.de> MIME-Version: 1.0 X-Virus-Scanned: Clear (ClamAV 1.0.7/27694/Wed Jul 9 10:42:34 2025) X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org From: Randall Stewart Recently we had a rewrite to tcp_lro.c that was tested but one subtle change was the move to a less precise timestamp. This causes all kinds of chaos in tcp's that do pacing and needs to be fixed to use the more precise time that was there before. Reviewed by: mtuexen, gallatin, hselasky Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D30695 --- newlib/libc/include/sys/time.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index 5a3dec7ab..4062df728 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -281,6 +281,17 @@ bintime2timespec(const struct bintime *_bt, struct timespec *_ts) (uint32_t)(_bt->frac >> 32)) >> 32; } +static __inline uint64_t +bintime2ns(const struct bintime *_bt) +{ + uint64_t ret; + + ret = (uint64_t)(_bt->sec) * (uint64_t)1000000000; + ret += (((uint64_t)1000000000 * + (uint32_t)(_bt->frac >> 32)) >> 32); + return (ret); +} + static __inline void timespec2bintime(const struct timespec *_ts, struct bintime *_bt) {