Skip to content

Commit

Permalink
rxrpc: Expedite ping response transmission
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells committed Sep 22, 2016
1 parent 8e83134 commit 7aa51da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/rxrpc/sendmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7aa51da

Please sign in to comment.