This small change adopts the excellent suggestion for using named
structures in the add of a new tcp-stack that came in late to me via email after the last commit. It also makes it so that a new stack may optionally get a callback during a retransmit timeout. This allows the new stack to clear specific state (think sack scoreboards or other such structures). Sponsored by: Netflix Inc. Differential Revision: http://reviews.freebsd.org/D6303
This commit is contained in:
parent
71edebc7d5
commit
5105a92c49
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300042
@ -2375,34 +2375,17 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
}
|
||||
|
||||
struct tcp_function_block __tcp_fastslow = {
|
||||
"fastslow",
|
||||
tcp_output,
|
||||
tcp_do_segment_fastslow,
|
||||
tcp_default_ctloutput,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0
|
||||
|
||||
.tfb_tcp_block_name = "fastslow",
|
||||
.tfb_tcp_output = tcp_output,
|
||||
.tfb_tcp_do_segment = tcp_do_segment_fastslow,
|
||||
.tfb_tcp_ctloutput = tcp_default_ctloutput,
|
||||
};
|
||||
|
||||
struct tcp_function_block __tcp_fastack = {
|
||||
"fastack",
|
||||
tcp_output,
|
||||
tcp_do_segment_fastack,
|
||||
tcp_default_ctloutput,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0
|
||||
.tfb_tcp_block_name = "fastack",
|
||||
.tfb_tcp_output = tcp_output,
|
||||
.tfb_tcp_do_segment = tcp_do_segment_fastack,
|
||||
.tfb_tcp_ctloutput = tcp_default_ctloutput
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -604,6 +604,10 @@ tcp_timer_rexmt(void * xtp)
|
||||
KASSERT((tp->t_timers->tt_flags & TT_REXMT) != 0,
|
||||
("%s: tp %p rexmt callout should be running", __func__, tp));
|
||||
tcp_free_sackholes(tp);
|
||||
if (tp->t_fb->tfb_tcp_rexmit_tmr) {
|
||||
/* The stack has a timer action too. */
|
||||
(*tp->t_fb->tfb_tcp_rexmit_tmr)(tp);
|
||||
}
|
||||
/*
|
||||
* Retransmission timer went off. Message has not
|
||||
* been acked within retransmit interval. Back off
|
||||
|
@ -135,6 +135,7 @@ struct tcp_function_block {
|
||||
uint32_t, u_int);
|
||||
int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t);
|
||||
void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t);
|
||||
void (*tfb_tcp_rexmit_tmr)(struct tcpcb *);
|
||||
volatile uint32_t tfb_refcnt;
|
||||
uint32_t tfb_flags;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user