Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163634251
D19000.id70998.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D19000.id70998.diff
View Options
Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c
+++ sys/netinet/tcp_input.c
@@ -1469,7 +1469,7 @@
tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos)
{
- int thflags, acked, ourfinisacked, needoutput = 0, sack_changed;
+ int thflags, acked = 0, ourfinisacked, needoutput = 0, sack_changed;
int rstreason, todrop, win;
uint32_t tiwin;
uint16_t nsegs;
@@ -2374,12 +2374,6 @@
if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) {
tcp_fastopen_decrement_counter(tp->t_tfo_pending);
tp->t_tfo_pending = NULL;
-
- /*
- * Account for the ACK of our SYN prior to
- * regular ACK processing below.
- */
- tp->snd_una++;
}
if (tp->t_flags & TF_NEEDFIN) {
tcp_state_change(tp, TCPS_FIN_WAIT_1);
@@ -2399,6 +2393,13 @@
cc_conn_init(tp);
tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp));
}
+ /*
+ * Account for the ACK of our SYN prior to
+ * regular ACK processing below, except for
+ * simultaneous SYN, which is handled later.
+ */
+ if (SEQ_GT(th->th_ack, tp->snd_una) && !(tp->t_flags & TF_NEEDSYN))
+ acked = -1;
/*
* If segment contains data or ACK, will call tcp_reass()
* later; if not, do so now to pass queued data to user.
@@ -2693,7 +2694,7 @@
process_ACK:
INP_WLOCK_ASSERT(tp->t_inpcb);
- acked = BYTES_THIS_ACK(tp, th);
+ acked += BYTES_THIS_ACK(tp, th);
KASSERT(acked >= 0, ("%s: acked unexepectedly negative "
"(tp->snd_una=%u, th->th_ack=%u, tp=%p, m=%p)", __func__,
tp->snd_una, th->th_ack, tp, m));
Index: sys/netinet/tcp_stacks/bbr.c
===================================================================
--- sys/netinet/tcp_stacks/bbr.c
+++ sys/netinet/tcp_stacks/bbr.c
@@ -9325,11 +9325,6 @@
tcp_fastopen_decrement_counter(tp->t_tfo_pending);
tp->t_tfo_pending = NULL;
- /*
- * Account for the ACK of our SYN prior to regular
- * ACK processing below.
- */
- tp->snd_una++;
}
/*
* Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* ->
@@ -9352,6 +9347,13 @@
if (!IS_FASTOPEN(tp->t_flags))
cc_conn_init(tp);
}
+ /*
+ * Account for the ACK of our SYN prior to
+ * regular ACK processing below, except for
+ * simultaneous SYN, which is handled later.
+ */
+ if (SEQ_GT(th->th_ack, tp->snd_una) && !(tp->t_flags & TF_NEEDSYN))
+ tp->snd_una++;
/*
* If segment contains data or ACK, will call tcp_reass() later; if
* not, do so now to pass queued data to user.
Index: sys/netinet/tcp_stacks/rack.c
===================================================================
--- sys/netinet/tcp_stacks/rack.c
+++ sys/netinet/tcp_stacks/rack.c
@@ -6539,12 +6539,6 @@
if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) {
tcp_fastopen_decrement_counter(tp->t_tfo_pending);
tp->t_tfo_pending = NULL;
-
- /*
- * Account for the ACK of our SYN prior to
- * regular ACK processing below.
- */
- tp->snd_una++;
}
if (tp->t_flags & TF_NEEDFIN) {
tcp_state_change(tp, TCPS_FIN_WAIT_1);
@@ -6562,6 +6556,13 @@
if (!IS_FASTOPEN(tp->t_flags))
cc_conn_init(tp);
}
+ /*
+ * Account for the ACK of our SYN prior to
+ * regular ACK processing below, except for
+ * simultaneous SYN, which is handled later.
+ */
+ if (SEQ_GT(th->th_ack, tp->snd_una) && !(tp->t_flags & TF_NEEDSYN))
+ tp->snd_una++;
/*
* If segment contains data or ACK, will call tcp_reass() later; if
* not, do so now to pass queued data to user.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 26, 1:11 AM (19 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35507637
Default Alt Text
D19000.id70998.diff (3 KB)
Attached To
Mode
D19000: Avoid cwnd update for SYN sequence space
Attached
Detach File
Event Timeline
Log In to Comment