diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2016-04-28 13:27:12 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2016-04-28 13:27:12 +0000 |
commit | e5ad64562a541c3b882789adec036387efd2986c (patch) | |
tree | c82ebe02d26bb553d2eb18b0db5e5a73bb688e89 /sys/netinet/tcp_var.h | |
parent | 329ee7e3dc2632c941ac63ad70833a95b91527e7 (diff) | |
download | src-e5ad64562a541c3b882789adec036387efd2986c.tar.gz src-e5ad64562a541c3b882789adec036387efd2986c.zip |
This cleans up the timers code in TCP to start using the new
async_drain functionality. This as been tested in NF as well as
by Verisign. Still to do in here is to remove all the old flags. They
are currently left being maintained but probably are no longer needed.
Sponsored by: Netflix Inc.
Differential Revision: http://reviews.freebsd.org/D5924
Notes
Notes:
svn path=/head/; revision=298743
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index d60ad9f50d3d..f2c76a889553 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -106,6 +106,17 @@ struct inpcb; struct sockopt; struct socket; +/* + * If defining the optional tcp_timers, in the + * tfb_tcp_timer_stop call you must use the + * callout_async_drain() function with the + * tcp_timer_discard callback. You should check + * the return of callout_async_drain() and if 0 + * increment tt_draincnt. Since the timer sub-system + * does not know your callbacks you must provide a + * stop_all function that loops through and calls + * tcp_timer_stop() with each of your defined timers. + */ struct tcp_function_block { char tfb_tcp_block_name[TCP_FUNCTION_NAME_LEN_MAX]; int (*tfb_tcp_output)(struct tcpcb *); @@ -120,7 +131,6 @@ struct tcp_function_block { void (*tfb_tcp_fb_fini)(struct tcpcb *); /* Optional timers, must define all if you define one */ int (*tfb_tcp_timer_stop_all)(struct tcpcb *); - int (*tfb_tcp_timers_left)(struct tcpcb *); void (*tfb_tcp_timer_activate)(struct tcpcb *, uint32_t, u_int); int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); |