From nobody Thu Feb 20 16:00:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YzHzx2SjCz5p4hB; Thu, 20 Feb 2025 16:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YzHzv6Lddz3Fk7; Thu, 20 Feb 2025 16:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740067259; 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; bh=x3VVEPcZPdO6stmvym8XbdUQ4CpxUtxI80WqRWd+8tE=; b=fD0UCYwvmiPWWzvqdyECW0JXVUfcvt+Yhc66Q6VCz9vuJh7/XBeANwjZT1NkUGNAmbU5xS Mpor5F8vRsmzJpuHDnC66lm5notDlpAFE/E1QMdXGZc/LsKg7groQMvClkS0MHC3SrNJcJ cqTqojDH8NlOMLFbgZuAR9HYoi/uH6r+dsCEhbeDGl1pQCbz4IJiUq0AIlinYBudXtBhG5 /idqPt4vhd+VG+Pm11upncUPq/5O9TVl+h/ZAi5QKI1q6qUuP+Ii0Yy5eC9b6SZvw6F3gT zzaLKgrUWomayxlETUS1Qh7yzepzf1acuV+8T8etRdjhzNqXtM7mn0W0qGTEWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740067259; a=rsa-sha256; cv=none; b=aP+XqEGkjeHuPYH33y1jvqdLFfbX/6+PMZ3xhhjXdtAL1tmjLP2hEKFIGe4YWBQP8+GU+u f+B4yE7igrcLc+VC4SgiIV9RI86JJJjMMkcrXrpUPKOKiq7PDWooMDP339jDHz2M4kTDMv Z1BQOp0NzS9M/XTNu0eSjqHB3WI75UtBHXzQCpOTfz5sSYHQ6diqTq+mb77Cz6v8ihfhOx wZw1AgL96M6XmVMWx/xU5AY5PB1Jdzsn8qhraCq1JbbQ7szDZNCG4FO/WNd1Z0GJOhVAhQ 8t4uwAllotOcdWjMA9ejNC6SVYaf9Ej2OBTLfp1bx8ln/HQmV1+r01988Y/ViA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740067259; 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; bh=x3VVEPcZPdO6stmvym8XbdUQ4CpxUtxI80WqRWd+8tE=; b=TnML1ZAEFbqy4ZUywA5GfkxQ5vhgtV1YSmcdRWSk0e7XBhhr0+13e9dISWfaLaMZlOhhkI 9iMrLHHrmuoFZHWwmYd1mFJPdcWWALM6LOg+7YH4NRS4913oNqxfuLmHWvzMPhpxsebfaB ZGawK4Hme0BP4x+q/slM3Ik6yPJDW7V1RcwVeFVeHUqfWxSxvXspTkaZPHEeV+z8qY8lnI kX/PD9swXGsLsvoBGnFeoSUBdWOLIk6Bl9AYzljeOG1D2xrzqTSXK6reAeOHDij4lVqCc3 iCjTg+HAT1rWI8uQgNFG4YLYVjwqDuAYK+7Eg56n/JgCxeuIiOS2ufspgPyVng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YzHzv5szjzybD; Thu, 20 Feb 2025 16:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51KG0x0g053734; Thu, 20 Feb 2025 16:00:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51KG0xrh053731; Thu, 20 Feb 2025 16:00:59 GMT (envelope-from git) Date: Thu, 20 Feb 2025 16:00:59 GMT Message-Id: <202502201600.51KG0xrh053731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cheng Cui Subject: git: 7f9ef5c75fd1 - main - cc_cubic: remove redundant code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f9ef5c75fd18fadcd2a74c2c489f218d7611208 Auto-Submitted: auto-generated The branch main has been updated by cc: URL: https://cgit.FreeBSD.org/src/commit/?id=7f9ef5c75fd18fadcd2a74c2c489f218d7611208 commit 7f9ef5c75fd18fadcd2a74c2c489f218d7611208 Author: Cheng Cui AuthorDate: 2025-02-14 16:00:44 +0000 Commit: Cheng Cui CommitDate: 2025-02-20 16:00:41 +0000 cc_cubic: remove redundant code During my progress on updating cc_cubic to RFC9438, found such redundancy as: - W_est: we use the alternative stack local variable `W_est` in `cubic_ack_received()`. - cwnd_prior: it is used for Reno-Friendly Region in RFC9438 Section 4.3, but we use the alternative cwnd from NewReno for Reno-Friendly as in commit ee45061051715be4704ba22d2fcd1c373e29079d. No functional change intended. Reviewed by: rscheff, tuexen Differential Revision: https://reviews.freebsd.org/D49008 --- sys/netinet/cc/cc_cubic.c | 5 ----- sys/netinet/cc/cc_cubic.h | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index ae1561ca54c3..91d6642eb08d 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -468,8 +468,6 @@ cubic_cong_signal(struct cc_var *ccv, ccsignal_t type) */ cubic_data->undo_t_epoch = cubic_data->t_epoch; cubic_data->undo_cwnd_epoch = cubic_data->cwnd_epoch; - cubic_data->undo_W_est = cubic_data->W_est; - cubic_data->undo_cwnd_prior = cubic_data->cwnd_prior; cubic_data->undo_W_max = cubic_data->W_max; cubic_data->undo_K = cubic_data->K; if (V_tcp_do_newsack) { @@ -484,16 +482,13 @@ cubic_cong_signal(struct cc_var *ccv, ccsignal_t type) CUBIC_BETA) >> CUBIC_SHIFT) / mss) * mss; } cubic_data->flags |= CUBICFLAG_CONG_EVENT | CUBICFLAG_RTO_EVENT; - cubic_data->undo_W_max = cubic_data->W_max; CCV(ccv, snd_cwnd) = mss; break; case CC_RTO_ERR: cubic_data->flags &= ~(CUBICFLAG_CONG_EVENT | CUBICFLAG_RTO_EVENT); cubic_data->K = cubic_data->undo_K; - cubic_data->cwnd_prior = cubic_data->undo_cwnd_prior; cubic_data->W_max = cubic_data->undo_W_max; - cubic_data->W_est = cubic_data->undo_W_est; cubic_data->cwnd_epoch = cubic_data->undo_cwnd_epoch; cubic_data->t_epoch = cubic_data->undo_t_epoch; break; diff --git a/sys/netinet/cc/cc_cubic.h b/sys/netinet/cc/cc_cubic.h index b4773618e6f8..c30128570ab0 100644 --- a/sys/netinet/cc/cc_cubic.h +++ b/sys/netinet/cc/cc_cubic.h @@ -94,16 +94,8 @@ struct cubic { int64_t sum_rtt_usecs; /* Size of cwnd just before cwnd was reduced in the last congestion event */ uint64_t W_max; - /* An estimate for the congestion window in the Reno-friendly region */ - uint64_t W_est; /* The cwnd at the beginning of the current congestion avoidance stage */ uint64_t cwnd_epoch; - /* - * Size of cwnd at the time of setting ssthresh most recently, - * either upon exiting the first slow start, or just before cwnd - * was reduced in the last congestion event - */ - uint64_t cwnd_prior; /* various flags */ uint32_t flags; /* Minimum observed rtt in usecs. */ @@ -118,9 +110,7 @@ struct cubic { int undo_t_epoch; /* Few variables to restore the state after RTO_ERR */ int64_t undo_K; - uint64_t undo_cwnd_prior; uint64_t undo_W_max; - uint64_t undo_W_est; uint64_t undo_cwnd_epoch; uint32_t css_baseline_minrtt; uint32_t css_current_round_minrtt;