]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
rxrpc: Expedite ping response transmission
authorDavid Howells <dhowells@redhat.com>
Wed, 21 Sep 2016 23:29:31 +0000 (00:29 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 22 Sep 2016 07:21:24 +0000 (08:21 +0100)
Expedite the transmission of a response to a PING ACK by sending it from
sendmsg if one is pending.  We're most likely to see a PING ACK during the
client call Tx phase as the other side may use it to determine a number of
parameters, such as the client's receive window size, the RTT and whether
the client is doing slow start (similar to RFC5681).

If we don't expedite it, it's left to the background processing thread to
transmit.

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

index 814b17f239710c77f173129ff4d5d9b69e176386..3c969de3ef05a2e03eb3161046ef6fe3a7a2668a 100644 (file)
@@ -180,6 +180,10 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
 
        copied = 0;
        do {
+               /* Check to see if there's a ping ACK to reply to. */
+               if (call->ackr_reason == RXRPC_ACK_PING_RESPONSE)
+                       rxrpc_send_call_packet(call, RXRPC_PACKET_TYPE_ACK);
+
                if (!skb) {
                        size_t size, chunk, max, space;