Page MenuHomeFreeBSD

D36494.diff
No OneTemporary

D36494.diff

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -6685,6 +6685,7 @@
}
rack->r_ctl.rc_hpts_flags &= ~PACE_TMR_RXT;
rack->r_ctl.retran_during_recovery = 0;
+ rack->rc_ack_required = 1;
rack->r_ctl.dsack_byte_cnt = 0;
if (IN_FASTRECOVERY(tp->t_flags))
tp->t_flags |= TF_WASFRECOVERY;
@@ -14068,6 +14069,11 @@
*/
rack = (struct tcp_rack *)tp->t_fb_ptr;
if (m->m_flags & M_ACKCMP) {
+ /*
+ * All compressed ack's are ack's by definition so
+ * remove any ack required flag and then do the processing.
+ */
+ rack->rc_ack_required = 0;
return (rack_do_compressed_ack_processing(tp, so, m, nxt_pkt, tv));
}
if (m->m_flags & M_ACKCMP) {
@@ -14238,6 +14244,9 @@
TCP_LOG_EVENTP(tp, th, &so->so_rcv, &so->so_snd, TCP_LOG_IN, 0,
tlen, &log, true, &ltv);
}
+ /* Remove ack required flag if set, we have one */
+ if (thflags & TH_ACK)
+ rack->rc_ack_required = 0;
if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) {
way_out = 4;
retval = 0;
@@ -16798,6 +16807,18 @@
}
#ifdef TCP_ACCOUNTING
sched_unpin();
+#endif
+ return (0);
+ }
+ if ((rack->rc_ack_required == 1) &&
+ (rack->r_timer_override == 0)){
+ /* A timeout occurred and no ack has arrived */
+ if (tcp_in_hpts(rack->rc_inp) == 0) {
+ /* Timer is not running */
+ rack_start_hpts_timer(rack, tp, cts, 0, 0, 0);
+ }
+#ifdef TCP_ACCOUNTING
+ sched_unpin();
#endif
return (0);
}
diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h
--- a/sys/netinet/tcp_stacks/tcp_rack.h
+++ b/sys/netinet/tcp_stacks/tcp_rack.h
@@ -549,7 +549,7 @@
struct inpcb *rc_inp; /* The inpcb Lock(a) */
uint8_t rc_free_cnt; /* Number of free entries on the rc_free list
* Lock(a) */
- uint8_t client_bufferlvl : 4, /* Expected range [0,5]: 0=unset, 1=low/empty */
+ uint8_t client_bufferlvl : 3, /* Expected range [0,5]: 0=unset, 1=low/empty */
rack_deferred_inited : 1,
/* ******************************************************************** */
/* Note for details of next two fields see rack_init_retransmit_rate() */
@@ -557,6 +557,7 @@
full_size_rxt: 1,
shape_rxt_to_pacing_min : 1,
/* ******************************************************************** */
+ rc_ack_required: 1,
spare : 1;
uint8_t no_prr_addback : 1,
gp_ready : 1,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 8:58 PM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14704607
Default Alt Text
D36494.diff (2 KB)

Event Timeline