Patch "rxrpc: Manage RTT per-call rather than per-peer" has been added to the 6.12-stable tree
gregkh at linuxfoundation.org
gregkh at linuxfoundation.org
Fri Aug 7 06:07:26 PDT 2026
This is a note to let you know that I've just added the patch titled
rxrpc: Manage RTT per-call rather than per-peer
to the 6.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rxrpc-manage-rtt-per-call-rather-than-per-peer.patch
and it can be found in the queue-6.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.
>From stable+bounces-296837-greg=kroah.com at vger.kernel.org Thu Aug 6 15:51:40 2026
From: Sasha Levin <sashal at kernel.org>
Date: Thu, 6 Aug 2026 09:50:02 -0400
Subject: rxrpc: Manage RTT per-call rather than per-peer
To: stable at vger.kernel.org
Cc: David Howells <dhowells at redhat.com>, Marc Dionne <marc.dionne at auristor.com>, linux-afs at lists.infradead.org, Jakub Kicinski <kuba at kernel.org>, Sasha Levin <sashal at kernel.org>
Message-ID: <20260806135003.602726-4-sashal at kernel.org>
From: David Howells <dhowells at redhat.com>
[ Upstream commit b40ef2b85a7d117dd323b5910e504899e0a3e7dc ]
Manage the determination of RTT on a per-call (ie. per-RPC op) basis rather
than on a per-peer basis, averaging across all calls going to that peer.
The problem is that the RTT measurements from the initial packets on a call
may be off because the server may do some setting up (such as getting a
lock on a file) before accepting the rest of the data in the RPC and,
further, the RTT may be affected by server-side file operations, for
instance if a large amount of data is being written or read.
Note: When handling the FS.StoreData-type RPCs, for example, the server
uses the userStatus field in the header of ACK packets as supplementary
flow control to aid in managing this. AF_RXRPC does not yet support this,
but it should be added.
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: linux-afs at lists.infradead.org
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Stable-dep-of: e4d2878369d5 ("rxrpc: Fix irq-disabled in local_bh_enable()")
Signed-off-by: Sasha Levin <sashal at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
include/trace/events/rxrpc.h | 2
net/rxrpc/ar-internal.h | 39 +++++++++---------
net/rxrpc/call_event.c | 18 ++++----
net/rxrpc/call_object.c | 2
net/rxrpc/input.c | 8 +--
net/rxrpc/output.c | 14 +++---
net/rxrpc/peer_object.c | 8 ---
net/rxrpc/proc.c | 6 +-
net/rxrpc/rtt.c | 93 +++++++++++++++++++++----------------------
net/rxrpc/sendmsg.c | 2
10 files changed, 97 insertions(+), 95 deletions(-)
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -1333,7 +1333,7 @@ TRACE_EVENT(rxrpc_rtt_rx,
__entry->rtt = rtt;
__entry->srtt = srtt;
__entry->rto = rto;
- __entry->min_rtt = minmax_get(&call->peer->min_rtt)
+ __entry->min_rtt = minmax_get(&call->min_rtt)
),
TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u srtt=%u rto=%u min=%u",
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -344,20 +344,9 @@ struct rxrpc_peer {
int debug_id; /* debug ID for printks */
struct sockaddr_rxrpc srx; /* remote address */
- /* calculated RTT cache */
-#define RXRPC_RTT_CACHE_SIZE 32
- spinlock_t rtt_input_lock; /* RTT lock for input routine */
- ktime_t rtt_last_req; /* Time of last RTT request */
- unsigned int rtt_count; /* Number of samples we've got */
- unsigned int rtt_taken; /* Number of samples taken (wrapping) */
- struct minmax min_rtt; /* Estimated minimum RTT */
-
- u32 srtt_us; /* smoothed round trip time << 3 in usecs */
- u32 mdev_us; /* medium deviation */
- u32 mdev_max_us; /* maximal mdev for the last rtt period */
- u32 rttvar_us; /* smoothed mdev_max */
- u32 rto_us; /* Retransmission timeout in usec */
- u8 backoff; /* Backoff timeout (as shift) */
+ /* Calculated RTT cache */
+ unsigned int recent_srtt_us;
+ unsigned int recent_rto_us;
u8 cong_ssthresh; /* Congestion slow-start threshold */
};
@@ -742,6 +731,18 @@ struct rxrpc_call {
rxrpc_seq_t acks_hard_ack; /* Latest hard-ack point */
rxrpc_seq_t acks_lowest_nak; /* Lowest NACK in the buffer (or ==tx_hard_ack) */
rxrpc_serial_t acks_highest_serial; /* Highest serial number ACK'd */
+
+ /* Calculated RTT cache */
+ ktime_t rtt_last_req; /* Time of last RTT request */
+ unsigned int rtt_count; /* Number of samples we've got */
+ unsigned int rtt_taken; /* Number of samples taken (wrapping) */
+ struct minmax min_rtt; /* Estimated minimum RTT */
+ u32 srtt_us; /* smoothed round trip time << 3 in usecs */
+ u32 mdev_us; /* medium deviation */
+ u32 mdev_max_us; /* maximal mdev for the last rtt period */
+ u32 rttvar_us; /* smoothed mdev_max */
+ u32 rto_us; /* Retransmission timeout in usec */
+ u8 backoff; /* Backoff timeout (as shift) */
};
/*
@@ -1222,10 +1223,12 @@ static inline int rxrpc_abort_eproto(str
/*
* rtt.c
*/
-void rxrpc_peer_add_rtt(struct rxrpc_call *, enum rxrpc_rtt_rx_trace, int,
- rxrpc_serial_t, rxrpc_serial_t, ktime_t, ktime_t);
-ktime_t rxrpc_get_rto_backoff(struct rxrpc_peer *peer, bool retrans);
-void rxrpc_peer_init_rtt(struct rxrpc_peer *);
+void rxrpc_call_add_rtt(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
+ int rtt_slot,
+ rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
+ ktime_t send_time, ktime_t resp_time);
+ktime_t rxrpc_get_rto_backoff(struct rxrpc_call *call, bool retrans);
+void rxrpc_call_init_rtt(struct rxrpc_call *call);
/*
* rxkad.c
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -44,8 +44,8 @@ void rxrpc_propose_delay_ACK(struct rxrp
trace_rxrpc_propose_ack(call, why, RXRPC_ACK_DELAY, serial);
- if (call->peer->srtt_us)
- delay = (call->peer->srtt_us >> 3) * NSEC_PER_USEC;
+ if (call->srtt_us)
+ delay = (call->srtt_us >> 3) * NSEC_PER_USEC;
else
delay = ms_to_ktime(READ_ONCE(rxrpc_soft_ack_delay));
ktime_add_ms(delay, call->tx_backoff);
@@ -72,7 +72,7 @@ void rxrpc_resend(struct rxrpc_call *cal
struct rxrpc_txbuf *txb;
rxrpc_seq_t transmitted = call->tx_transmitted;
ktime_t next_resend = KTIME_MAX;
- ktime_t rto = rxrpc_get_rto_backoff(call->peer, false);
+ ktime_t rto = rxrpc_get_rto_backoff(call, false);
ktime_t resend_at = KTIME_MAX, now, delay;
bool unacked = false, did_send = false;
unsigned int i;
@@ -174,7 +174,7 @@ void rxrpc_resend(struct rxrpc_call *cal
no_further_resend:
no_resend:
if (resend_at < KTIME_MAX) {
- delay = rxrpc_get_rto_backoff(call->peer, did_send);
+ delay = rxrpc_get_rto_backoff(call, did_send);
resend_at = ktime_add(resend_at, delay);
trace_rxrpc_timer_set(call, resend_at - now, rxrpc_timer_trace_resend_reset);
}
@@ -189,7 +189,7 @@ no_resend:
*/
if (!did_send) {
ktime_t next_ping = ktime_add_us(call->acks_latest_ts,
- call->peer->srtt_us >> 3);
+ call->srtt_us >> 3);
if (ktime_sub(next_ping, now) <= 0)
rxrpc_send_ACK(call, RXRPC_ACK_PING, 0,
@@ -306,8 +306,8 @@ static void rxrpc_transmit_some_data(str
*/
static void rxrpc_send_initial_ping(struct rxrpc_call *call)
{
- if (call->peer->rtt_count < 3 ||
- ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000),
+ if (call->rtt_count < 3 ||
+ ktime_before(ktime_add_ms(call->rtt_last_req, 1000),
ktime_get_real()))
rxrpc_send_ACK(call, RXRPC_ACK_PING, 0,
rxrpc_propose_ack_ping_for_params);
@@ -438,10 +438,10 @@ bool rxrpc_input_call_event(struct rxrpc
rxrpc_propose_ack_rx_idle);
if (call->ackr_nr_unacked > 2) {
- if (call->peer->rtt_count < 3)
+ if (call->rtt_count < 3)
rxrpc_send_ACK(call, RXRPC_ACK_PING, 0,
rxrpc_propose_ack_ping_for_rtt);
- else if (ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000),
+ else if (ktime_before(ktime_add_ms(call->rtt_last_req, 1000),
ktime_get_real()))
rxrpc_send_ACK(call, RXRPC_ACK_PING, 0,
rxrpc_propose_ack_ping_for_old_rtt);
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -178,6 +178,8 @@ struct rxrpc_call *rxrpc_alloc_call(stru
call->cong_cwnd = RXRPC_MIN_CWND;
call->cong_ssthresh = RXRPC_TX_MAX_WINDOW;
+ rxrpc_call_init_rtt(call);
+
call->rxnet = rxnet;
call->rtt_avail = RXRPC_CALL_RTT_AVAIL_MASK;
atomic_inc(&rxnet->nr_calls);
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -83,11 +83,11 @@ static void rxrpc_congestion_management(
/* We analyse the number of packets that get ACK'd per RTT
* period and increase the window if we managed to fill it.
*/
- if (call->peer->rtt_count == 0)
+ if (call->rtt_count == 0)
goto out;
if (ktime_before(skb->tstamp,
ktime_add_us(call->cong_tstamp,
- call->peer->srtt_us >> 3)))
+ call->srtt_us >> 3)))
goto out_no_clear_ca;
change = rxrpc_cong_rtt_window_end;
call->cong_tstamp = skb->tstamp;
@@ -197,7 +197,7 @@ void rxrpc_congestion_degrade(struct rxr
if (__rxrpc_call_state(call) == RXRPC_CALL_CLIENT_AWAIT_REPLY)
return;
- rtt = ns_to_ktime(call->peer->srtt_us * (1000 / 8));
+ rtt = ns_to_ktime(call->srtt_us * (NSEC_PER_USEC / 8));
now = ktime_get_real();
if (!ktime_before(ktime_add(call->tx_last_sent, rtt), now))
return;
@@ -664,7 +664,7 @@ static void rxrpc_complete_rtt_probe(str
clear_bit(i + RXRPC_CALL_RTT_PEND_SHIFT, &call->rtt_avail);
smp_mb(); /* Read data before setting avail bit */
set_bit(i, &call->rtt_avail);
- rxrpc_peer_add_rtt(call, type, i, acked_serial, ack_serial,
+ rxrpc_call_add_rtt(call, type, i, acked_serial, ack_serial,
sent_at, resp_time);
matched = true;
}
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -220,7 +220,7 @@ static void rxrpc_send_ack_packet(struct
if (ack->reason == RXRPC_ACK_PING)
rxrpc_begin_rtt_probe(call, txb->serial, now, rxrpc_rtt_tx_ping);
if (txb->flags & RXRPC_REQUEST_ACK)
- call->peer->rtt_last_req = now;
+ call->rtt_last_req = now;
rxrpc_set_keepalive(call, now);
}
rxrpc_tx_backoff(call, ret);
@@ -358,9 +358,9 @@ static void rxrpc_prepare_data_subpacket
why = rxrpc_reqack_slow_start;
else if (call->tx_winsize <= 2)
why = rxrpc_reqack_small_txwin;
- else if (call->peer->rtt_count < 3 && txb->seq & 1)
+ else if (call->rtt_count < 3)
why = rxrpc_reqack_more_rtt;
- else if (ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000), ktime_get_real()))
+ else if (ktime_before(ktime_add_ms(call->rtt_last_req, 1000), ktime_get_real()))
why = rxrpc_reqack_old_rtt;
else
goto dont_set_request_ack;
@@ -407,9 +407,9 @@ static void rxrpc_tstamp_data_packets(st
if (ack_requested) {
rxrpc_begin_rtt_probe(call, txb->serial, now, rxrpc_rtt_tx_data);
- call->peer->rtt_last_req = now;
- if (call->peer->rtt_count > 1) {
- ktime_t delay = rxrpc_get_rto_backoff(call->peer, false);
+ call->rtt_last_req = now;
+ if (call->rtt_count > 1) {
+ ktime_t delay = rxrpc_get_rto_backoff(call, false);
call->ack_lost_at = ktime_add(now, delay);
trace_rxrpc_timer_set(call, delay, rxrpc_timer_trace_lost_ack);
@@ -727,7 +727,7 @@ void rxrpc_transmit_one(struct rxrpc_cal
rxrpc_instant_resend(call, txb);
}
} else {
- ktime_t delay = ns_to_ktime(call->peer->rto_us * NSEC_PER_USEC);
+ ktime_t delay = ns_to_ktime(call->rto_us * NSEC_PER_USEC);
call->resend_at = ktime_add(ktime_get_real(), delay);
trace_rxrpc_timer_set(call, delay, rxrpc_timer_trace_resend_tx);
--- a/net/rxrpc/peer_object.c
+++ b/net/rxrpc/peer_object.c
@@ -222,11 +222,8 @@ struct rxrpc_peer *rxrpc_alloc_peer(stru
peer->service_conns = RB_ROOT;
seqlock_init(&peer->service_conn_lock);
spin_lock_init(&peer->lock);
- spin_lock_init(&peer->rtt_input_lock);
peer->debug_id = atomic_inc_return(&rxrpc_debug_id);
-
- rxrpc_peer_init_rtt(peer);
-
+ peer->recent_srtt_us = UINT_MAX;
peer->cong_ssthresh = RXRPC_TX_MAX_WINDOW;
trace_rxrpc_peer(peer->debug_id, 1, why);
}
@@ -244,7 +241,6 @@ static void rxrpc_init_peer(struct rxrpc
peer->hash_key = hash_key;
rxrpc_assess_MTU_size(local, peer);
peer->mtu = peer->if_mtu;
- peer->rtt_last_req = ktime_get_real();
switch (peer->srx.transport.family) {
case AF_INET:
@@ -480,7 +476,7 @@ EXPORT_SYMBOL(rxrpc_kernel_get_call_peer
*/
unsigned int rxrpc_kernel_get_srtt(const struct rxrpc_peer *peer)
{
- return peer->rtt_count > 0 ? peer->srtt_us >> 3 : UINT_MAX;
+ return READ_ONCE(peer->recent_srtt_us);
}
EXPORT_SYMBOL(rxrpc_kernel_get_srtt);
--- a/net/rxrpc/proc.c
+++ b/net/rxrpc/proc.c
@@ -299,15 +299,15 @@ static int rxrpc_peer_seq_show(struct se
now = ktime_get_seconds();
seq_printf(seq,
"UDP %-47.47s %-47.47s %3u"
- " %3u %5u %6ds %8u %8u\n",
+ " %3u %5u %6ds %8d %8d\n",
lbuff,
rbuff,
refcount_read(&peer->ref),
peer->cong_ssthresh,
peer->mtu,
(s32)now - (s32)READ_ONCE(peer->last_tx_at),
- peer->srtt_us >> 3,
- peer->rto_us);
+ READ_ONCE(peer->recent_srtt_us),
+ READ_ONCE(peer->recent_rto_us));
return 0;
}
--- a/net/rxrpc/rtt.c
+++ b/net/rxrpc/rtt.c
@@ -12,17 +12,17 @@
#include "ar-internal.h"
#define RXRPC_RTO_MAX (120 * USEC_PER_SEC)
-#define RXRPC_TIMEOUT_INIT ((unsigned int)(1 * MSEC_PER_SEC)) /* RFC6298 2.1 initial RTO value */
+#define RXRPC_TIMEOUT_INIT ((unsigned int)(1 * USEC_PER_SEC)) /* RFC6298 2.1 initial RTO value */
#define rxrpc_jiffies32 ((u32)jiffies) /* As rxrpc_jiffies32 */
-static u32 rxrpc_rto_min_us(struct rxrpc_peer *peer)
+static u32 rxrpc_rto_min_us(struct rxrpc_call *call)
{
return 200;
}
-static u32 __rxrpc_set_rto(const struct rxrpc_peer *peer)
+static u32 __rxrpc_set_rto(const struct rxrpc_call *call)
{
- return (peer->srtt_us >> 3) + peer->rttvar_us;
+ return (call->srtt_us >> 3) + call->rttvar_us;
}
static u32 rxrpc_bound_rto(u32 rto)
@@ -40,10 +40,10 @@ static u32 rxrpc_bound_rto(u32 rto)
* To save cycles in the RFC 1323 implementation it was better to break
* it up into three procedures. -- erics
*/
-static void rxrpc_rtt_estimator(struct rxrpc_peer *peer, long sample_rtt_us)
+static void rxrpc_rtt_estimator(struct rxrpc_call *call, long sample_rtt_us)
{
long m = sample_rtt_us; /* RTT */
- u32 srtt = peer->srtt_us;
+ u32 srtt = call->srtt_us;
/* The following amusing code comes from Jacobson's
* article in SIGCOMM '88. Note that rtt and mdev
@@ -66,7 +66,7 @@ static void rxrpc_rtt_estimator(struct r
srtt += m; /* rtt = 7/8 rtt + 1/8 new */
if (m < 0) {
m = -m; /* m is now abs(error) */
- m -= (peer->mdev_us >> 2); /* similar update on mdev */
+ m -= (call->mdev_us >> 2); /* similar update on mdev */
/* This is similar to one of Eifel findings.
* Eifel blocks mdev updates when rtt decreases.
* This solution is a bit different: we use finer gain
@@ -78,31 +78,31 @@ static void rxrpc_rtt_estimator(struct r
if (m > 0)
m >>= 3;
} else {
- m -= (peer->mdev_us >> 2); /* similar update on mdev */
+ m -= (call->mdev_us >> 2); /* similar update on mdev */
}
- peer->mdev_us += m; /* mdev = 3/4 mdev + 1/4 new */
- if (peer->mdev_us > peer->mdev_max_us) {
- peer->mdev_max_us = peer->mdev_us;
- if (peer->mdev_max_us > peer->rttvar_us)
- peer->rttvar_us = peer->mdev_max_us;
+ call->mdev_us += m; /* mdev = 3/4 mdev + 1/4 new */
+ if (call->mdev_us > call->mdev_max_us) {
+ call->mdev_max_us = call->mdev_us;
+ if (call->mdev_max_us > call->rttvar_us)
+ call->rttvar_us = call->mdev_max_us;
}
} else {
/* no previous measure. */
srtt = m << 3; /* take the measured time to be rtt */
- peer->mdev_us = m << 1; /* make sure rto = 3*rtt */
- peer->rttvar_us = max(peer->mdev_us, rxrpc_rto_min_us(peer));
- peer->mdev_max_us = peer->rttvar_us;
+ call->mdev_us = m << 1; /* make sure rto = 3*rtt */
+ call->rttvar_us = umax(call->mdev_us, rxrpc_rto_min_us(call));
+ call->mdev_max_us = call->rttvar_us;
}
- peer->srtt_us = max(1U, srtt);
+ call->srtt_us = umax(srtt, 1);
}
/*
* Calculate rto without backoff. This is the second half of Van Jacobson's
* routine referred to above.
*/
-static void rxrpc_set_rto(struct rxrpc_peer *peer)
+static void rxrpc_set_rto(struct rxrpc_call *call)
{
u32 rto;
@@ -113,7 +113,7 @@ static void rxrpc_set_rto(struct rxrpc_p
* is invisible. Actually, Linux-2.4 also generates erratic
* ACKs in some circumstances.
*/
- rto = __rxrpc_set_rto(peer);
+ rto = __rxrpc_set_rto(call);
/* 2. Fixups made earlier cannot be right.
* If we do not estimate RTO correctly without them,
@@ -124,73 +124,73 @@ static void rxrpc_set_rto(struct rxrpc_p
/* NOTE: clamping at RXRPC_RTO_MIN is not required, current algo
* guarantees that rto is higher.
*/
- peer->rto_us = rxrpc_bound_rto(rto);
+ call->rto_us = rxrpc_bound_rto(rto);
}
-static void rxrpc_update_rtt_min(struct rxrpc_peer *peer, ktime_t resp_time, long rtt_us)
+static void rxrpc_update_rtt_min(struct rxrpc_call *call, ktime_t resp_time, long rtt_us)
{
/* Window size 5mins in approx usec (ipv4.sysctl_tcp_min_rtt_wlen) */
u32 wlen_us = 5ULL * NSEC_PER_SEC / 1024;
- minmax_running_min(&peer->min_rtt, wlen_us, resp_time / 1024,
+ minmax_running_min(&call->min_rtt, wlen_us, resp_time / 1024,
(u32)rtt_us ? : jiffies_to_usecs(1));
}
-static void rxrpc_ack_update_rtt(struct rxrpc_peer *peer, ktime_t resp_time, long rtt_us)
+static void rxrpc_ack_update_rtt(struct rxrpc_call *call, ktime_t resp_time, long rtt_us)
{
if (rtt_us < 0)
return;
/* Update RACK min RTT [RFC8985 6.1 Step 1]. */
- rxrpc_update_rtt_min(peer, resp_time, rtt_us);
+ rxrpc_update_rtt_min(call, resp_time, rtt_us);
- rxrpc_rtt_estimator(peer, rtt_us);
- rxrpc_set_rto(peer);
+ rxrpc_rtt_estimator(call, rtt_us);
+ rxrpc_set_rto(call);
/* Only reset backoff on valid RTT measurement [RFC6298]. */
- peer->backoff = 0;
+ call->backoff = 0;
}
/*
* Add RTT information to cache. This is called in softirq mode and has
- * exclusive access to the peer RTT data.
+ * exclusive access to the call RTT data.
*/
-void rxrpc_peer_add_rtt(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
+void rxrpc_call_add_rtt(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
int rtt_slot,
rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
ktime_t send_time, ktime_t resp_time)
{
- struct rxrpc_peer *peer = call->peer;
s64 rtt_us;
rtt_us = ktime_to_us(ktime_sub(resp_time, send_time));
if (rtt_us < 0)
return;
- spin_lock(&peer->rtt_input_lock);
- rxrpc_ack_update_rtt(peer, resp_time, rtt_us);
- if (peer->rtt_count < 3)
- peer->rtt_count++;
- peer->rtt_taken++;
- spin_unlock(&peer->rtt_input_lock);
+ rxrpc_ack_update_rtt(call, resp_time, rtt_us);
+ if (call->rtt_count < 3)
+ call->rtt_count++;
+ call->rtt_taken++;
+
+ WRITE_ONCE(call->peer->recent_srtt_us, call->srtt_us / 8);
+ WRITE_ONCE(call->peer->recent_rto_us, call->rto_us);
trace_rxrpc_rtt_rx(call, why, rtt_slot, send_serial, resp_serial,
- rtt_us, peer->srtt_us, peer->rto_us);
+ rtt_us, call->srtt_us, call->rto_us);
}
/*
* Get the retransmission timeout to set in nanoseconds, backing it off each
* time we retransmit.
*/
-ktime_t rxrpc_get_rto_backoff(struct rxrpc_peer *peer, bool retrans)
+ktime_t rxrpc_get_rto_backoff(struct rxrpc_call *call, bool retrans)
{
u64 timo_us;
- u32 backoff = READ_ONCE(peer->backoff);
+ u32 backoff = READ_ONCE(call->backoff);
- timo_us = peer->rto_us;
+ timo_us = call->rto_us;
timo_us <<= backoff;
if (retrans && timo_us * 2 <= RXRPC_RTO_MAX)
- WRITE_ONCE(peer->backoff, backoff + 1);
+ WRITE_ONCE(call->backoff, backoff + 1);
if (timo_us < 1)
timo_us = 1;
@@ -198,10 +198,11 @@ ktime_t rxrpc_get_rto_backoff(struct rxr
return ns_to_ktime(timo_us * NSEC_PER_USEC);
}
-void rxrpc_peer_init_rtt(struct rxrpc_peer *peer)
+void rxrpc_call_init_rtt(struct rxrpc_call *call)
{
- peer->rto_us = RXRPC_TIMEOUT_INIT;
- peer->mdev_us = RXRPC_TIMEOUT_INIT;
- peer->backoff = 0;
- //minmax_reset(&peer->rtt_min, rxrpc_jiffies32, ~0U);
+ call->rtt_last_req = KTIME_MIN;
+ call->rto_us = RXRPC_TIMEOUT_INIT;
+ call->mdev_us = RXRPC_TIMEOUT_INIT;
+ call->backoff = 0;
+ //minmax_reset(&call->rtt_min, rxrpc_jiffies32, ~0U);
}
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -133,7 +133,7 @@ static int rxrpc_wait_for_tx_window_wait
rxrpc_seq_t tx_start, tx_win;
signed long rtt, timeout;
- rtt = READ_ONCE(call->peer->srtt_us) >> 3;
+ rtt = READ_ONCE(call->srtt_us) >> 3;
rtt = usecs_to_jiffies(rtt) * 2;
if (rtt < 2)
rtt = 2;
Patches currently in stable-queue which might be from sashal at kernel.org are
queue-6.12/wifi-brcmfmac-set-f2-blocksize-to-256-for-bcm43752.patch
queue-6.12/net-dsa-mt7530-check-bus-read-errors-in-the-mdio-reg.patch
queue-6.12/um-set-parent-death-signal-for-userspace-process.patch
queue-6.12/usb-gadget-f_tcm-synchronize-delayed-set_alt-with-teardown.patch
queue-6.12/drm-xe-rtp-de-whitelist-oa-registers-for-all-hwe-s-f.patch
queue-6.12/media-uapi-rkisp-correct-name-version-enum.patch
queue-6.12/net-sxgbe-free-tx-rings-on-rx-allocation-failure.patch
queue-6.12/rtase-fix-double-free-of-multi-frag-skb-on-dma-map-f.patch
queue-6.12/usb-typec-ucsi-fix-race-condition-and-ordering-in-port-unregistration.patch
queue-6.12/drm-xe-introduce-xe_gt_dbg_printer.patch
queue-6.12/drm-fb-helper-allocate-and-release-fb_info-in-single-place.patch
queue-6.12/drm-xe-rtp-maintain-oa-whitelists-separately.patch
queue-6.12/pinctrl-qcom-sc8280xp-add-missing-wakeup-entries-for.patch
queue-6.12/forcedeth-fix-uaf-of-txrx_stats-in-nv_remove.patch
queue-6.12/alsa-hda-codecs-hdmi-disable-keep-alive-before-audio-format-change.patch
queue-6.12/hid-logitech-dj-standardise-hid_report_enum-variable.patch
queue-6.12/scsi-libsas-fix-ha-resume-deadlock-and-hisi_sas-disk.patch
queue-6.12/netfilter-nft_payload-fix-mask-build-for-partial-fie.patch
queue-6.12/bluetooth-iso-fix-timeout-vs-sync_timeout-typo-in-ch.patch
queue-6.12/um-set-parent-death-signal-for-ubd-io-thread-process.patch
queue-6.12/net-sxgbe-check-descriptor-ring-allocation-failures.patch
queue-6.12/ipvs-fix-the-checksum-validations.patch
queue-6.12/mptcp-pm-avoid-code-duplication-to-lookup-endp.patch
queue-6.12/hwmon-ina2xx-fix-various-overflow-issues.patch
queue-6.12/spi-spi-cadence-move-tx-fifo-full-busy-wait-into-fif.patch
queue-6.12/powerpc-boot-fix-simpleboot-cpu-node-lookup-check.patch
queue-6.12/ata-sata_mv-accept-1-or-2-resources-in-platform-prob.patch
queue-6.12/drm-xe-rtp-generalize-whitelist_apply_to_hwe.patch
queue-6.12/wifi-mac80211-validate-individual-twt-params-before-.patch
queue-6.12/mm-hugetlb-fix-swap-entry-corruption-when-clearing-u.patch
queue-6.12/dmaengine-idxd-fix-fdev-setup-failure-cleanup-in-idx.patch
queue-6.12/asoc-max98090-fix-missing-is_err-before-ptr_err-on-m.patch
queue-6.12/keys-trusted-dcp-fix-key_len-validation-and-calc_blo.patch
queue-6.12/drm-xe-oa-de-whitelist-oa-registers-on-oa-stream-ope.patch
queue-6.12/mptcp-pm-use-addr-entry-for-get_local_id.patch
queue-6.12/drm-xe-rtp-save-oa-nonpriv-registers-to-register-sav.patch
queue-6.12/bluetooth-hci_sync-remove-unnecessary-hci_conn_get-i.patch
queue-6.12/drm-mediatek-check-crtc-state-before-freeing.patch
queue-6.12/bluetooth-iso-clear-iso_data-always-when-detaching-c.patch
queue-6.12/bluetooth-iso-fix-leaking-sk-after-socket-release.patch
queue-6.12/hwmon-ina2xx-add-support-for-ina260.patch
queue-6.12/accel-qaic-use-sizeof-trans_hdr-for-transaction-leng.patch
queue-6.12/pinctrl-amd-don-t-clear-s4-wake-bits-at-probe.patch
queue-6.12/net-bridge-mrp-fix-option-tlv-length-in-mrp_test-fra.patch
queue-6.12/kmemleak-iommu-iova-fix-transient-kmemleak-false-positive.patch
queue-6.12/gpio-pch-use-raw_spinlock_t-for-the-register-lock.patch
queue-6.12/rxrpc-generate-rtt_min.patch
queue-6.12/drm-xe-rtp-refactor-oag-mmio-trigger-register-whitel.patch
queue-6.12/hwmon-ina2xx-add-support-for-ina234.patch
queue-6.12/drm-xe-apply-whitelist-to-engine-save-restore.patch
queue-6.12/powerpc-boot-fix-treeboot-currituck-cpu-node-lookup-.patch
queue-6.12/wifi-ath6kl-fix-use-after-free-in-aggr_reset_state.patch
queue-6.12/wifi-brcmfmac-fix-43752-sdio-fwvid-incorrectly-labelled-as-cypress-cyw.patch
queue-6.12/keys-make-keyring-key-chunk-byte-order-agree-with-ke.patch
queue-6.12/drm-xe-pt-reset-current_op-in-xe_pt_update_ops_init.patch
queue-6.12/drm-xe-rtp-toggle-deny-bit-to-de-whitelist-oa-regs.patch
queue-6.12/hwmon-adt7470-fix-fans-stuck-in-manual-mode-on-i2c-e.patch
queue-6.12/net-airoha-fix-register-index-for-tx-fwd-counter-con.patch
queue-6.12/ata-ahci_ceva-fix-error-paths-in-ceva_ahci_platform_.patch
queue-6.12/qede-sync-udp_tunnel-ports-outside-qede_lock-in-the-.patch
queue-6.12/rxrpc-fix-the-calculation-and-use-of-rto.patch
queue-6.12/tracing-mmiotrace-reset-dropped_count-in-mmio_reset_.patch
queue-6.12/netfilter-nf_conntrack_sip-widen-nat-rewrite-delta-t.patch
queue-6.12/drm-i915-hdcp-move-to-using-intel_display-in-intel_hdcp.patch
queue-6.12/usb-typec-ucsi-split-connector-lock-classes.patch
queue-6.12/ahci-introduce-ahci_ignore_port-helper.patch
queue-6.12/drm-i915-hdcp-require-monotonically-increasing-seq_num_v.patch
queue-6.12/net-udp_tunnel-fix-memory-leak-in-udp_tunnel_nic_unr.patch
queue-6.12/bluetooth-iso-validate-sockaddr_iso-first-in-iso_soc.patch
queue-6.12/net-libwx-fix-fdir-atr-queue-mismatch-for-software-v.patch
queue-6.12/riscv-mm-fix-out-of-bounds-page-table-walk-during-me.patch
queue-6.12/netfilter-nf_tables-make-nft_object-rhltable-per-tab.patch
queue-6.12/mm-huge_memory-unlock-i_mmap_rwsem-before-releasing-.patch
queue-6.12/bluetooth-l2cap-fix-uaf-in-l2cap_le_connect_rsp.patch
queue-6.12/hwmon-ina226-add-support-for-sy24655.patch
queue-6.12/scsi-zfcp-fix-memory-leak-during-adapter-release-by-.patch
queue-6.12/mptcp-pm-userspace-fix-use-after-free-in-get_local_id.patch
queue-6.12/hwmon-ina2xx-make-it-easier-to-add-more-devices.patch
queue-6.12/net-dsa-mt7530-error-out-on-failed-reads-in-mt7531-p.patch
queue-6.12/scsi-libiscsi_tcp-bound-scsi-response-data-segment-t.patch
queue-6.12/bluetooth-hci_conn-hold-conn-reference-in-abort_conn.patch
queue-6.12/ipvs-do-not-mangle-icmp-replies-for-non-first-fragme.patch
queue-6.12/drm-i915-hdcp-check-streams-bounds-before-overflow.patch
queue-6.12/phy-zynqmp-fix-clock-error-handling-in-xpsgtr_phy_in.patch
queue-6.12/asoc-max98095-fix-missing-is_err-before-ptr_err-on-m.patch
queue-6.12/hid-logitech-dj-fix-wrong-detection-of-bad-dj_short-.patch
queue-6.12/rds-tcp-hold-the-rcu-lock-across-ipv6_chk_addr-in-rd.patch
queue-6.12/drm-xe-rtp-ensure-locking-ref-counting-for-oa-whitel.patch
queue-6.12/um-add-os_set_pdeathsig-helper-function.patch
queue-6.12/hwmon-lm90-only-report-alarms-if-driver-is-ready.patch
queue-6.12/of-reserved_mem-add-code-to-dynamically-allocate-res.patch
queue-6.12/bpf-reset-register-bounds-before-narrowing-retval-ra.patch
queue-6.12/drm-xe-rtp-keep-track-of-non-oa-nonpriv-slots.patch
queue-6.12/net-ethernet-mtk_eth_soc-support-named-irqs.patch
queue-6.12/wifi-brcmfmac-drain-bus_reset-work-on-device-removal.patch
queue-6.12/hwmon-adt7470-fix-divide-by-zero-toctou-crash-in-fan.patch
queue-6.12/mptcp-add-mptcp_userspace_pm_lookup_addr-helper.patch
queue-6.12/drm-sched-store-the-drm-client_id-in-drm_sched_fence.patch
queue-6.12/of-reserved_mem-prevent-oob-when-too-many-dynamic-re.patch
queue-6.12/hwmon-adt7470-fix-temperature-alarm-logic-in-hwmon_t.patch
queue-6.12/ksmbd-return-success-for-deferred-final-close.patch
queue-6.12/hwmon-ina2xx-add-support-for-has_alerts-configuratio.patch
queue-6.12/drm-tegra-fbdev-remove-offset-into-framebuffer-memory.patch
queue-6.12/scsi-ufs-core-cancel-rtc-work-in-active-active-suspe.patch
queue-6.12/drm-exec-remove-the-index-parameter-from-drm_exec_for_each_locked_obj.patch
queue-6.12/hwmon-adt7470-fix-cache-updated-before-hardware-writ.patch
queue-6.12/assoc_array-trim-the-final-shortcut-word-using-the-c.patch
queue-6.12/mm-kmemleak-fix-checksum-computation-for-per-cpu-objects.patch
queue-6.12/ksmbd-fix-use-after-free-in-__close_file_table_ids.patch
queue-6.12/drm-xe-wait-on-external-bo-kernel-fences-in-exec-ioctl.patch
queue-6.12/drm-amdgpu-gfx-fix-cleaner-shader-ib-buffer-overflow.patch
queue-6.12/netfilter-xt_hashlimit-validate-hashtable-supports-x.patch
queue-6.12/scsi-target-iblock-fix-wrong-pr-ops-null-check-for-p.patch
queue-6.12/net-ethernet-mtk_eth_soc-add-consts-for-irq-index.patch
queue-6.12/hwmon-adt7470-fix-swapped-pwm3-and-pwm4-auto-mode-ma.patch
queue-6.12/media-chips-media-wave5-support-cbp-profile.patch
queue-6.12/um-use-os_set_pdeathsig-helper-in-winch-thread-proce.patch
queue-6.12/idpf-fix-mailbox-irq-name-leak-on-request-failure.patch
queue-6.12/drm-i915-vrr-check-has_vrr-first-in-intel_vrr_is_capable.patch
queue-6.12/btrfs-fix-leaking-btrfs_fs_state_remounting-flag.patch
queue-6.12/netfilter-br_netfilter-reallocate-headroom-if-necess.patch
queue-6.12/idpf-adjust-txq-ring-count-minimum.patch
queue-6.12/pinctrl-qcom-unconditionally-mark-gpio-as-wakeup-ena.patch
queue-6.12/gpio-sloppy-logic-analyzer-fix-memory-leak-in-gpio_l.patch
queue-6.12/keys-fix-out-of-bounds-read-in-keyring_get_key_chunk.patch
queue-6.12/drm-amdgpu-fix-context-pstate-override-handling.patch
queue-6.12/hwmon-sht3x-fix-unaligned-accesses.patch
queue-6.12/mm-slab-prevent-unbounded-recursion-in-free-path-wit.patch
queue-6.12/fs-proc-task_mmu-fix-pagemap_scan-written-state-for-.patch
queue-6.12/hwmon-adt7470-use-cached-pwm-frequency-value.patch
queue-6.12/hwmon-pmbus-fix-return-value-from-pmbus_update_byte_.patch
queue-6.12/phy-zynqmp-fix-runtime-pm-leak-on-probe-allocation-f.patch
queue-6.12/scsi-libiscsi-fix-stale-data-leak-into-the-scsi-sens.patch
queue-6.12/tracing-mmiotrace-add-null-check-for-mmio_trace_arra.patch
queue-6.12/drm-xe-rtp-add-ring_force_to_nonpriv_deny-to-oa-whit.patch
queue-6.12/spi-spi-cadence-supports-transmission-with-bits_per_.patch
queue-6.12/kunit-tool-skip-stty-when-stdin-is-not-a-tty.patch
queue-6.12/um-preserve-errno-within-signal-handler.patch
queue-6.12/ipvs-fix-places-with-wrong-packet-offsets.patch
queue-6.12/hwmon-adt7470-fix-pwm-auto-temp-state-array-and-boun.patch
queue-6.12/hwmon-ina2xx-shift-ina234-shunt-and-current-register.patch
queue-6.12/drm-amdgpu-give-each-kernel-job-a-unique-id.patch
queue-6.12/netconsole-avoid-oob-reads-msg-is-not-nul-terminated.patch
queue-6.12/bluetooth-hci_sync-make-hci_cmd_sync_run_once-return.patch
queue-6.12/hwmon-adt7470-fix-busy-loop-and-i2c-flooding-in-upda.patch
queue-6.12/bluetooth-iso-avoid-deadlocks-in-iso_sock_timeout.patch
queue-6.12/rxrpc-fix-irq-disabled-in-local_bh_enable.patch
queue-6.12/drm-i915-hdcp-skip-inactive-mst-connectors-when-building-stream-list.patch
queue-6.12/hwmon-nct6775-core-fix-number-of-temperature-registe.patch
queue-6.12/hwmon-nct6775-core-prevent-access-to-unsupported-wei.patch
queue-6.12/dmaengine-sun6i-dma-fix-reclaim-descriptors-while-te.patch
queue-6.12/drm-xe-hold-a-dma-buf-reference-for-imported-bos.patch
queue-6.12/sched-deadline-use-revised-wakeup-rule-only-for-runn.patch
queue-6.12/rds-fix-inet6_addr_lst-null-dereference-when-ipv6-is.patch
queue-6.12/rxrpc-adjust-the-rxrpc_rtt_rx-tracepoint.patch
queue-6.12/media-i2c-imx219-rename-vts-to-frm_length.patch
queue-6.12/smb-client-fix-buffer-leaks-in-smb1-read-and-write.patch
queue-6.12/scsi-target-clear-cmd_cnt-when-initial-counter-enrol.patch
queue-6.12/lib-alloc_tag-introduce-mem_alloc_profiling_permanen.patch
queue-6.12/rxrpc-manage-rtt-per-call-rather-than-per-peer.patch
queue-6.12/bluetooth-hci_sync-fix-hci_conn_del-use-in-hci_le_cr.patch
queue-6.12/net-phylink-put-link_gpio-if-phylink_create-fails.patch
queue-6.12/btrfs-zoned-fix-deadlock-between-metadata-writeback-.patch
queue-6.12/media-imx219-fix-maximum-frame-length-in-lines.patch
queue-6.12/tracing-remove-trace_event_fl_filtered-logic.patch
queue-6.12/drm-i915-vrr-require-valid-min-max-vfreq-for-vrr.patch
queue-6.12/um-set-parent-death-signal-for-write_sigio-thread-pr.patch
queue-6.12/hwmon-nzxt-smart2-dma-align-output-buffer.patch
queue-6.12/rhashtable-clear-stale-iter-p-on-table-restart.patch
queue-6.12/drm-amdgpu-respect-placement-requirements-in-amdgpu_gtt_mgr-functions.patch
queue-6.12/powerpc-boot-fix-treeboot-akebono-cpu-node-lookup-ch.patch
queue-6.12/hwmon-ltc4282-fix-reading-the-minimum-alarm-voltage.patch
queue-6.12/thunderbolt-prevent-xdomain-delayed-work-use-after-f.patch
queue-6.12/ata-libahci_platform-support-non-consecutive-port-nu.patch
queue-6.12/octeontx2-pf-set-correct-sequence-for-carrier-off-an.patch
queue-6.12/net-mpls-initialize-rtm_tos-in-mpls_getroute.patch
queue-6.12/um-set-parent-death-signal-for-winch-thread-process.patch
queue-6.12/netfilter-nf_conntrack_expect-restore-helper-propaga.patch
queue-6.12/drm-xe-stub-out-new-pagefault-layer.patch
queue-6.12/bluetooth-btintel-validate-length-before-parsing-dia.patch
queue-6.12/net-ethernet-mtk_eth_soc-pass-eth-to-mtk_handle_irq_.patch
queue-6.12/drivers-hv-vmbus-replace-lockdep_hardirq_threaded-wi.patch
queue-6.12/drm-xe-rename-___xe_bo_create_locked.patch
queue-6.12/hid-logitech-dj-prevent-report_id_dj_short-related-u.patch
queue-6.12/net-do-not-send-icmp-ndisc-redirects-when-peer-alloc.patch
queue-6.12/phy-zynqmp-postpone-getting-clock-rate-until-actuall.patch
queue-6.12/kunit-tool-terminate-kernel-under-test-on-sigint.patch
queue-6.12/can-isotp-check-register_netdevice_notifier-error-in.patch
More information about the linux-afs
mailing list