The branch main has been updated by cc:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7f9ef5c75fd18fadcd2a74c2c489f218d7611208

commit 7f9ef5c75fd18fadcd2a74c2c489f218d7611208
Author:     Cheng Cui <[email protected]>
AuthorDate: 2025-02-14 16:00:44 +0000
Commit:     Cheng Cui <[email protected]>
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;

Reply via email to