rxrpc: Implement slow-start

Implement RxRPC slow-start, which is similar to RFC 5681 for TCP.  A
tracepoint is added to log the state of the congestion management algorithm
and the decisions it makes.

Notes:

 (1) Since we send fixed-size DATA packets (apart from the final packet in
     each phase), counters and calculations are in terms of packets rather
     than bytes.

 (2) The ACK packet carries the equivalent of TCP SACK.

 (3) The FLIGHT_SIZE calculation in RFC 5681 doesn't seem particularly
     suited to SACK of a small number of packets.  It seems that, almost
     inevitably, by the time three 'duplicate' ACKs have been seen, we have
     narrowed the loss down to one or two missing packets, and the
     FLIGHT_SIZE calculation ends up as 2.

 (4) In rxrpc_resend(), if there was no data that apparently needed
     retransmission, we transmit a PING ACK to ask the peer to tell us what
     its Rx window state is.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2016-09-24 18:05:27 +01:00
parent 0d967960d3
commit 57494343cb
9 changed files with 339 additions and 13 deletions

View File

@@ -200,6 +200,7 @@ const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = {
const char rxrpc_propose_ack_traces[rxrpc_propose_ack__nr_trace][8] = {
[rxrpc_propose_ack_client_tx_end] = "ClTxEnd",
[rxrpc_propose_ack_input_data] = "DataIn ",
[rxrpc_propose_ack_ping_for_lost_ack] = "LostAck",
[rxrpc_propose_ack_ping_for_lost_reply] = "LostRpl",
[rxrpc_propose_ack_ping_for_params] = "Params ",
[rxrpc_propose_ack_respond_to_ack] = "Rsp2Ack",
@@ -214,3 +215,21 @@ const char *const rxrpc_propose_ack_outcomes[rxrpc_propose_ack__nr_outcomes] = {
[rxrpc_propose_ack_update] = " Update",
[rxrpc_propose_ack_subsume] = " Subsume",
};
const char rxrpc_congest_modes[NR__RXRPC_CONGEST_MODES][10] = {
[RXRPC_CALL_SLOW_START] = "SlowStart",
[RXRPC_CALL_CONGEST_AVOIDANCE] = "CongAvoid",
[RXRPC_CALL_PACKET_LOSS] = "PktLoss ",
[RXRPC_CALL_FAST_RETRANSMIT] = "FastReTx ",
};
const char rxrpc_congest_changes[rxrpc_congest__nr_change][9] = {
[rxrpc_cong_begin_retransmission] = " Retrans",
[rxrpc_cong_cleared_nacks] = " Cleared",
[rxrpc_cong_new_low_nack] = " NewLowN",
[rxrpc_cong_no_change] = "",
[rxrpc_cong_progress] = " Progres",
[rxrpc_cong_retransmit_again] = " ReTxAgn",
[rxrpc_cong_rtt_window_end] = " RttWinE",
[rxrpc_cong_saw_nack] = " SawNack",
};