]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tcp: move max_packets_out, cwnd_usage_seq, rate_delivered and rate_interval_us to...
authorEric Dumazet <edumazet@google.com>
Thu, 30 Apr 2026 10:00:21 +0000 (10:00 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 2 May 2026 00:22:45 +0000 (17:22 -0700)
These fields are used in TX path.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260430100021.211139-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/tcp.h
net/ipv4/tcp.c

index d3650f04d94251ebef6f1bae296adc33a5491768..8a6807082672a48a62292fc9ba9776297c7cc670 100644 (file)
@@ -276,6 +276,10 @@ struct tcp_sock {
        u32     lsndtime;       /* timestamp of last sent data packet (for restart window) */
        u32     mdev_us;        /* medium deviation                     */
        u32     rtt_seq;        /* sequence number to update rttvar     */
+       u32     max_packets_out;  /* max packets_out in last window */
+       u32     cwnd_usage_seq;  /* right edge of cwnd usage tracking flight */
+       u32     rate_delivered;    /* saved rate sample: packets delivered */
+       u32     rate_interval_us;  /* saved rate sample: time elapsed */
        u64     tcp_wstamp_ns;  /* departure time for next sent data packet */
        u64     accecn_opt_tstamp;      /* Last AccECN option sent timestamp */
        struct list_head tsorted_sent_queue; /* time-sorted sent but un-SACKed skbs */
@@ -346,10 +350,6 @@ struct tcp_sock {
                                 * total number of data segments in.
                                 */
        u32     rcv_wup;        /* rcv_nxt on last window update sent   */
-       u32     max_packets_out;  /* max packets_out in last window */
-       u32     cwnd_usage_seq;  /* right edge of cwnd usage tracking flight */
-       u32     rate_delivered;    /* saved rate sample: packets delivered */
-       u32     rate_interval_us;  /* saved rate sample: time elapsed */
        u32     rcv_rtt_last_tsecr;
        u32     delivered_ecn_bytes[3];
        u16     pkts_acked_ewma;/* Pkts acked EWMA for AccECN cep heuristic */
index 7211d2c669b8e4ac15b3a6fcfc572f7199e310cf..21ece4c7161216093e15b295b0a79db23ad406ce 100644 (file)
@@ -5247,6 +5247,10 @@ static void __init tcp_struct_check(void)
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, tcp_wstamp_ns);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, accecn_opt_tstamp);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, rtt_seq);
+       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, max_packets_out);
+       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, cwnd_usage_seq);
+       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, rate_delivered);
+       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, rate_interval_us);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, tsorted_sent_queue);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, highest_sack);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_tx, ecn_flags);
@@ -5276,10 +5280,6 @@ static void __init tcp_struct_check(void)
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, bytes_received);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, data_segs_in);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, rcv_wup);
-       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, max_packets_out);
-       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, cwnd_usage_seq);
-       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, rate_delivered);
-       CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, rate_interval_us);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, rcv_rtt_last_tsecr);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, delivered_ecn_bytes);
        CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_write_rx, pkts_acked_ewma);