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: add window scale support #4070

Merged
merged 4 commits into from
Jul 7, 2021
Merged

Conversation

anchao
Copy link
Contributor

@anchao anchao commented Jul 5, 2021

Summary

net/tcp: add window scale support
net/tcp: change the tcp optdata to dynamic arrays
net/tcp: remove the invalid break during tcp option loop

Reference here:
https://tools.ietf.org/html/rfc1323

Impact

High performance network throughput request if the receiving window exceeds 64K

Testing

HTTP streaming

@anchao anchao requested a review from yamt July 5, 2021 09:35
@anchao anchao force-pushed the 21070502 branch 2 times, most recently from e88deff to 229e67e Compare July 5, 2021 09:40
net/tcp/tcp_send.c Show resolved Hide resolved
net/tcp/tcp_send.c Outdated Show resolved Hide resolved
Copy link
Contributor

@yamt yamt left a comment

Choose a reason for hiding this comment

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

lgtm

net/tcp/Kconfig Outdated Show resolved Hide resolved
@anchao
Copy link
Contributor Author

anchao commented Jul 6, 2021

@yamt

I upload a new commit. When the window scale is enabled, the received buffer is easily over 64K. I modified the related data type to uint32_t to avoid the TCP window overflow. Please review again. Thank you.

@anchao anchao force-pushed the 21070502 branch 2 times, most recently from 2877a46 to f5d8ae3 Compare July 6, 2021 07:34
@anchao anchao requested a review from yamt July 6, 2021 07:50
net/sixlowpan/sixlowpan_tcpsend.c Show resolved Hide resolved
net/tcp/tcp_send.c Show resolved Hide resolved
@anchao anchao force-pushed the 21070502 branch 2 times, most recently from d8707f4 to 29f54e1 Compare July 6, 2021 12:53
Signed-off-by: chao.an <anchao@xiaomi.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
net/tcp/tcp_recvwindow.c Outdated Show resolved Hide resolved
net/tcp/tcp_input.c Outdated Show resolved Hide resolved
net/tcp/tcp_send.c Outdated Show resolved Hide resolved
net/tcp/tcp.h Show resolved Hide resolved
net/tcp/tcp_recvwindow.c Outdated Show resolved Hide resolved
net/tcp/tcp_recvwindow.c Outdated Show resolved Hide resolved
net/tcp/tcp_send.c Outdated Show resolved Hide resolved
net/tcp/tcp_recvwindow.c Outdated Show resolved Hide resolved
net/tcp/tcp_recvwindow.c Outdated Show resolved Hide resolved
Reference here:
https://tools.ietf.org/html/rfc1323

Signed-off-by: chao.an <anchao@xiaomi.com>
1. change all window relative value type to uint32_t
2. move window range validity check(UINT16_MAX) before assembling TCP header

Signed-off-by: chao.an <anchao@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

LGTM, @yamt please take a look.

@xiaoxiang781216 xiaoxiang781216 merged commit d4ce709 into apache:master Jul 7, 2021
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.

4 participants