Commit a7056c5b authored by David Howells's avatar David Howells

rxrpc: Send an immediate ACK if we fill in a hole

Send an immediate ACK if we fill in a hole in the buffer left by an
out-of-sequence packet.  This may allow the congestion management in the peer
to avoid a retransmission if packets got reordered on the wire.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 805b21b9
...@@ -331,8 +331,16 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb, ...@@ -331,8 +331,16 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb,
call->rxtx_annotations[ix] = annotation; call->rxtx_annotations[ix] = annotation;
smp_wmb(); smp_wmb();
call->rxtx_buffer[ix] = skb; call->rxtx_buffer[ix] = skb;
if (after(seq, call->rx_top)) if (after(seq, call->rx_top)) {
smp_store_release(&call->rx_top, seq); smp_store_release(&call->rx_top, seq);
} else if (before(seq, call->rx_top)) {
/* Send an immediate ACK if we fill in a hole */
if (!ack) {
ack = RXRPC_ACK_DELAY;
ack_serial = serial;
}
immediate_ack = true;
}
if (flags & RXRPC_LAST_PACKET) { if (flags & RXRPC_LAST_PACKET) {
set_bit(RXRPC_CALL_RX_LAST, &call->flags); set_bit(RXRPC_CALL_RX_LAST, &call->flags);
trace_rxrpc_receive(call, rxrpc_receive_queue_last, serial, seq); trace_rxrpc_receive(call, rxrpc_receive_queue_last, serial, seq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment