]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix decision on when to generate an IDLE ACK
authorDavid Howells <dhowells@redhat.com>
Sat, 21 May 2022 08:03:31 +0000 (09:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 May 2022 20:30:53 +0000 (21:30 +0100)
commitb0cb9123a7ca80353078faac8f5391d4b5f5c154
tree014d913916b462128863f08327d6d7d410e2ce3a
parent048b5bd9ee04e8d234d60f02c274b88a82edf550
rxrpc: Fix decision on when to generate an IDLE ACK

Fix the decision on when to generate an IDLE ACK by keeping a count of the
number of packets we've received, but not yet soft-ACK'd, and the number of
packets we've processed, but not yet hard-ACK'd, rather than trying to keep
track of which DATA sequence numbers correspond to those points.

We then generate an ACK when either counter exceeds 2.  The counters are
both cleared when we transcribe the information into any sort of ACK packet
for transmission.  IDLE and DELAY ACKs are skipped if both counters are 0
(ie. no change).

Fixes: b18aaa4b6b6b ("rxrpc: Send an ACK after every few DATA packets we receive")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/rxrpc.h
net/rxrpc/ar-internal.h
net/rxrpc/input.c
net/rxrpc/output.c
net/rxrpc/recvmsg.c