af_rxrpc: Request an ACK for every alternate DATA packet
authorDavid Howells <dhowells@redhat.com>
Fri, 14 Feb 2014 20:05:32 +0000 (20:05 +0000)
committerDavid Howells <dhowells@redhat.com>
Wed, 26 Feb 2014 17:25:07 +0000 (17:25 +0000)
commite8388eb10371745627d1e538e018cb10ded86aa7
tree4adf9238ecba8a33d74fdbaf5c1b212b5f5324ad
parent817913d8cd7627d9303bce97c3c339ceb0f8e199
af_rxrpc: Request an ACK for every alternate DATA packet

Set the RxRPC header flag to request an ACK packet for every odd-numbered DATA
packet unless it's the last one (which implicitly requests an ACK anyway).
This is similar to how librx appears to work.

If we don't do this, we'll send out a full window of packets and then just sit
there until the other side gets bored and sends an ACK to indicate that it's
been idle for a while and has received no new packets.

Requesting a lot of ACKs shouldn't be a problem as ACKs should be merged when
possible.

As AF_RXRPC currently works, it will schedule an ACK to be generated upon
receipt of a DATA packet with the ACK-request packet set - and in the time
taken to schedule this in a work queue, several other packets are likely to
arrive and then all get ACK'd together.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/ar-output.c