linux-stable/net/rxrpc
David Howells 024b251175 rxrpc: Fix counting of new acks and nacks
[ Upstream commit 41b7fa157e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-16 19:10:50 +01:00
..
Kconfig
Makefile
af_rxrpc.c
ar-internal.h
call_accept.c
call_event.c
call_object.c
call_state.c
conn_client.c
conn_event.c
conn_object.c
conn_service.c
input.c
insecure.c
io_thread.c
key.c
local_event.c
local_object.c
misc.c
net_ns.c
output.c
peer_event.c
peer_object.c
proc.c
protocol.h
recvmsg.c
rtt.c
rxkad.c
rxperf.c
security.c
sendmsg.c
server_key.c
skbuff.c
sysctl.c
txbuf.c
utils.c