]> 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)
commit361f53932955440a1955bc6d530fe5f4c24ff6da
tree014d913916b462128863f08327d6d7d410e2ce3a
parenta9a29023d7f50ee5ab0b82679b877e6a595b193d
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: 7389e0e76a23 ("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