mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
0d967960d3
commit
57494343cb
9 changed files with 339 additions and 13 deletions
|
@ -45,7 +45,9 @@ static int rxrpc_wait_for_tx_window(struct rxrpc_sock *rx,
|
|||
for (;;) {
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
ret = 0;
|
||||
if (call->tx_top - call->tx_hard_ack < call->tx_winsize)
|
||||
if (call->tx_top - call->tx_hard_ack <
|
||||
min_t(unsigned int, call->tx_winsize,
|
||||
call->cong_cwnd + call->cong_extra))
|
||||
break;
|
||||
if (call->state >= RXRPC_CALL_COMPLETE) {
|
||||
ret = -call->error;
|
||||
|
@ -203,7 +205,8 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
|
|||
_debug("alloc");
|
||||
|
||||
if (call->tx_top - call->tx_hard_ack >=
|
||||
call->tx_winsize) {
|
||||
min_t(unsigned int, call->tx_winsize,
|
||||
call->cong_cwnd + call->cong_extra)) {
|
||||
ret = -EAGAIN;
|
||||
if (msg->msg_flags & MSG_DONTWAIT)
|
||||
goto maybe_error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue