linux/net/rxrpc
David Howells 41b7fa157e rxrpc: Fix counting of new acks and nacks
Fix the counting of new acks and nacks when parsing a packet - something
that is used in congestion control.

As the code stands, it merely notes if there are any nacks whereas what we
really should do is compare the previous SACK table to the new one,
assuming we get two successive ACK packets with nacks in them.  However, we
really don't want to do that if we can avoid it as the tables might not
correspond directly as one may be shifted from the other - something that
will only get harder to deal with once extended ACK tables come into full
use (with a capacity of up to 8192).

Instead, count the number of nacks shifted out of the old SACK, the number
of nacks retained in the portion still active and the number of new acks
and nacks in the new table then calculate what we need.

Note this ends up a bit of an estimate as the Rx protocol allows acks to be
withdrawn by the receiver and packets requested to be retransmitted.

Fixes: d57a3a1516 ("rxrpc: Save last ACK's SACK table rather than marking txbufs")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-02-05 12:34:07 +00:00
..
af_rxrpc.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
ar-internal.h rxrpc: Fix counting of new acks and nacks 2024-02-05 12:34:07 +00:00
call_accept.c rxrpc: Fix trace string 2023-01-30 14:13:29 +00:00
call_event.c rxrpc: Fix counting of new acks and nacks 2024-02-05 12:34:07 +00:00
call_object.c rxrpc: Fix counting of new acks and nacks 2024-02-05 12:34:07 +00:00
call_state.c rxrpc: Move client call connection to the I/O thread 2023-01-06 09:43:33 +00:00
conn_client.c rxrpc: Create a procfile to display outstanding client conn bundles 2023-12-24 15:22:56 +00:00
conn_event.c rxrpc: Fix response to PING RESPONSE ACKs to a dead call 2024-02-05 12:34:06 +00:00
conn_object.c rxrpc: Fix two connection reaping bugs 2023-11-01 22:28:55 -07:00
conn_service.c rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock() 2023-12-24 15:22:49 +00:00
input.c rxrpc: Fix counting of new acks and nacks 2024-02-05 12:34:07 +00:00
insecure.c rxrpc: Tidy up abort generation infrastructure 2023-01-06 09:43:32 +00:00
io_thread.c rxrpc: Allow a delay to be injected into packet reception 2023-01-31 16:38:09 +00:00
Kconfig rxrpc: Allow a delay to be injected into packet reception 2023-01-31 16:38:09 +00:00
key.c rxrpc: Fix error when reading rxrpc tokens 2023-04-23 13:38:28 +01:00
local_event.c rxrpc: Truncate UTS_RELEASE for rxrpc version 2023-05-30 10:01:06 +02:00
local_object.c rxrpc: Fix use of Don't Fragment flag 2024-01-11 16:41:41 -08:00
Makefile rxrpc: Split out the call state changing functions into their own file 2023-01-06 09:43:32 +00:00
misc.c rxrpc: Allow a delay to be injected into packet reception 2023-01-31 16:38:09 +00:00
net_ns.c rxrpc: Create a procfile to display outstanding client conn bundles 2023-12-24 15:22:56 +00:00
output.c rxrpc: Fix generation of serial numbers to skip zero 2024-02-05 12:34:06 +00:00
peer_event.c rxrpc: Fix locking issues in rxrpc_put_peer_locked() 2022-12-19 09:51:31 +00:00
peer_object.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
proc.c rxrpc: Fix generation of serial numbers to skip zero 2024-02-05 12:34:06 +00:00
protocol.h rxrpc: Replace fake flex-array with flexible-array member 2023-04-23 13:36:05 +01:00
recvmsg.c rxrpc: Fix overproduction of wakeups to recvmsg() 2023-02-20 08:33:25 +01:00
rtt.c rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies() 2021-09-24 14:18:34 +01:00
rxkad.c rxrpc: Fix generation of serial numbers to skip zero 2024-02-05 12:34:06 +00:00
rxperf.c rxrpc: Fix potential race in error handling in afs_make_call() 2023-04-22 15:16:39 +01:00
security.c rxrpc: Fix incoming call setup race 2023-01-07 09:30:26 +00:00
sendmsg.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
server_key.c rxrpc: Implement an in-kernel rxperf server for testing purposes 2022-12-01 13:36:37 +00:00
skbuff.c rxrpc: Use consume_skb() rather than kfree_skb_reason() 2023-02-07 23:11:20 +00:00
sysctl.c rxrpc: Allow a delay to be injected into packet reception 2023-01-31 16:38:09 +00:00
txbuf.c rxrpc: Don't lock call->tx_lock to access call->tx_buffer 2023-01-31 16:38:35 +00:00
utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00