Page MenuHomeFreeBSD

D24515.id71172.diff
No OneTemporary

D24515.id71172.diff

Index: head/sys/netinet/tcp_output.c
===================================================================
--- head/sys/netinet/tcp_output.c
+++ head/sys/netinet/tcp_output.c
@@ -1238,8 +1238,11 @@
if (flags & TH_SYN)
th->th_win = htons((u_short)
(min(sbspace(&so->so_rcv), TCP_MAXWIN)));
- else
+ else {
+ /* Avoid shrinking window with window scaling. */
+ recwin = roundup2(recwin, 1 << tp->rcv_scale);
th->th_win = htons((u_short)(recwin >> tp->rcv_scale));
+ }
/*
* Adjust the RXWIN0SENT flag - indicate that we have advertised
Index: head/sys/netinet/tcp_stacks/bbr.c
===================================================================
--- head/sys/netinet/tcp_stacks/bbr.c
+++ head/sys/netinet/tcp_stacks/bbr.c
@@ -13756,8 +13756,11 @@
if (flags & TH_SYN)
th->th_win = htons((u_short)
(min(sbspace(&so->so_rcv), TCP_MAXWIN)));
- else
+ else {
+ /* Avoid shrinking window with window scaling. */
+ recwin = roundup2(recwin, 1 << tp->rcv_scale);
th->th_win = htons((u_short)(recwin >> tp->rcv_scale));
+ }
/*
* Adjust the RXWIN0SENT flag - indicate that we have advertised a 0
* window. This may cause the remote transmitter to stall. This
Index: head/sys/netinet/tcp_stacks/rack.c
===================================================================
--- head/sys/netinet/tcp_stacks/rack.c
+++ head/sys/netinet/tcp_stacks/rack.c
@@ -9572,8 +9572,11 @@
if (flags & TH_SYN)
th->th_win = htons((u_short)
(min(sbspace(&so->so_rcv), TCP_MAXWIN)));
- else
+ else {
+ /* Avoid shrinking window with window scaling. */
+ recwin = roundup2(recwin, 1 << tp->rcv_scale);
th->th_win = htons((u_short)(recwin >> tp->rcv_scale));
+ }
/*
* Adjust the RXWIN0SENT flag - indicate that we have advertised a 0
* window. This may cause the remote transmitter to stall. This

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 26, 10:54 AM (17 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39648290
Default Alt Text
D24515.id71172.diff (1 KB)

Event Timeline