Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107892760
D25247.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D25247.diff
View Options
Index: tcp_output.c
===================================================================
--- tcp_output.c
+++ tcp_output.c
@@ -655,7 +655,10 @@
adv = recwin;
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) {
oldwin = (tp->rcv_adv - tp->rcv_nxt);
- adv -= oldwin;
+ if (adv > oldwin)
+ adv -= oldwin;
+ else
+ adv = 0;
} else
oldwin = 0;
Index: tcp_stacks/bbr.c
===================================================================
--- tcp_stacks/bbr.c
+++ tcp_stacks/bbr.c
@@ -8078,7 +8078,7 @@
bbr->r_ctl.rc_bbr_hptsi_gain = bbr->r_ctl.rc_startup_pg;
bbr->r_ctl.rc_bbr_cwnd_gain = bbr->r_ctl.rc_startup_pg;
bbr_log_type_statechange(bbr, cts, __LINE__);
- } else {
+ } else if (bbr->rc_bbr_state == BBR_STATE_PROBE_BW) {
bbr_substate_change(bbr, cts, __LINE__, 1);
}
}
@@ -12000,21 +12000,27 @@
* "adv" is the amount we could increase the window, taking into
* account that we are limited by TCP_MAXWIN << tp->rcv_scale.
*/
- uint32_t adv;
+ int32_t adv;
int32_t oldwin;
- adv = min(recwin, TCP_MAXWIN << tp->rcv_scale);
+ adv = recwin;
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) {
oldwin = (tp->rcv_adv - tp->rcv_nxt);
- adv -= oldwin;
+ if (adv > oldwin)
+ adv -= oldwin;
+ else {
+ /* We can't increase the window */
+ adv = 0;
+ }
} else
oldwin = 0;
/*
- * If the new window size ends up being the same as the old size
- * when it is scaled, then don't force a window update.
+ * If the new window size ends up being the same as or less
+ * than the old size when it is scaled, then don't force
+ * a window update.
*/
- if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale)
+ if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale)
return (0);
if (adv >= (2 * maxseg) &&
Index: tcp_stacks/rack.c
===================================================================
--- tcp_stacks/rack.c
+++ tcp_stacks/rack.c
@@ -12845,18 +12845,24 @@
int32_t adv;
int oldwin;
- adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale);
+ adv = recwin;
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) {
oldwin = (tp->rcv_adv - tp->rcv_nxt);
- adv -= oldwin;
+ if (adv > oldwin)
+ adv -= oldwin;
+ else {
+ /* We can't increase the window */
+ adv = 0;
+ }
} else
oldwin = 0;
/*
- * If the new window size ends up being the same as the old
- * size when it is scaled, then don't force a window update.
+ * If the new window size ends up being the same as or less
+ * than the old size when it is scaled, then don't force
+ * a window update.
*/
- if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale)
+ if (oldwin >> tp->rcv_scale >= (adv + oldwin) >> tp->rcv_scale)
goto dontupdate;
if (adv >= (int32_t)(2 * segsiz) &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 2:28 AM (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15970958
Default Alt Text
D25247.diff (2 KB)
Attached To
Mode
D25247: Incorrect rwnd needs update decision
Attached
Detach File
Event Timeline
Log In to Comment