diff options
author | David Howells <dhowells@redhat.com> | 2016-09-22 02:29:31 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-22 10:21:24 +0300 |
commit | 7aa51da7c88d42cc0bb85ab7d01429fbd4e51282 (patch) | |
tree | 7bf36f9dbaf413cb3a7f45d17ac978dec2882602 /net/rxrpc/sendmsg.c | |
parent | 8e83134db4ecb77a1dc3390b60ddeea840a5afbc (diff) | |
download | linux-7aa51da7c88d42cc0bb85ab7d01429fbd4e51282.tar.xz |
rxrpc: Expedite ping response transmission
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>
Diffstat (limited to 'net/rxrpc/sendmsg.c')
-rw-r--r-- | net/rxrpc/sendmsg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 814b17f23971..3c969de3ef05 100644 --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -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; |