Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/tcp(buffered): upgraded the Fast Retransmit algorithm from RFC 2001 to RFC 5681 #5598

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-lunev
Copy link
Contributor

@a-lunev a-lunev commented Feb 24, 2022

Summary

net/tcp(buffered): upgraded the Fast Retransmit algorithm from RFC 2001 to RFC 5681.
This PR is similar to tcp_send_unbuffered (PR #5137) and tcp_sendfile (PR #5311), however it replaces the implementation of PR #2414.

Impact

net/tcp(buffered)

Testing

(tcp->flags & (TCP_SYN | TCP_FIN)) == 0 &&
ackno == conn->snd_prev_ack &&
conn->snd_wnd == conn->snd_prev_wnd)
{
Copy link
Contributor

@anchao anchao Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another problem here. If the segment loss occurs before multiple segments are sent, it will trigger more invalid retransmissions:

e.g:

1     ->   good
2     ->   lost
3     ->   good
4     ->   good
5     ->   good
6     ->   good
7     ->   good
8     ->   good
9     ->   good
10     ->   good

snd_dup_acks 0    <-  1 (ACK 1)
snd_dup_acks 1    <-  2 (DUP ACK 1)
snd_dup_acks 2    <-  3 (DUP ACK 1)
snd_dup_acks 3    <-  4 (DUP ACK 1)
2     -> rexmit(snd_dup_acks = 0)
...
snd_dup_acks 1    <-  5 (DUP ACK 1)
snd_dup_acks 2    <-  6 (DUP ACK 1)
snd_dup_acks 3    <-  7 (DUP ACK 1)
2     -> rexmit(snd_dup_acks = 0)
...
snd_dup_acks 1    <-  8 (DUP ACK 1)
snd_dup_acks 2    <-  9 (DUP ACK 1)
snd_dup_acks 3    <-  10 (DUP ACK 1)
2     -> rexmit(snd_dup_acks = 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants