- Rename cc.h to more meaningful tcp_cc.h.

- Declare it a kernel only include, which it already is.
- Don't include tcp.h implicitly from tcp_cc.h
This commit is contained in:
Gleb Smirnoff 2016-01-21 22:34:51 +00:00
parent b66d74c138
commit 2de3e790f5
16 changed files with 36 additions and 29 deletions

View File

@ -65,10 +65,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
#include <netinet/tcp.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>

View File

@ -65,11 +65,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
#include <netinet/khelp/h_ertt.h> #include <netinet/khelp/h_ertt.h>

View File

@ -67,11 +67,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
#include <netinet/khelp/h_ertt.h> #include <netinet/khelp/h_ertt.h>

View File

@ -59,11 +59,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_cubic.h> #include <netinet/cc/cc_cubic.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>

View File

@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
#define CAST_PTR_INT(X) (*((int*)(X))) #define CAST_PTR_INT(X) (*((int*)(X)))

View File

@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
#include <netinet/khelp/h_ertt.h> #include <netinet/khelp/h_ertt.h>

View File

@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
/* Fixed point math shifts. */ /* Fixed point math shifts. */

View File

@ -62,10 +62,10 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
static void newreno_ack_received(struct cc_var *ccv, uint16_t type); static void newreno_ack_received(struct cc_var *ccv, uint16_t type);

View File

@ -69,11 +69,10 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h> #include <netinet/tcp.h>
#include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#include <netinet/cc/cc_module.h> #include <netinet/cc/cc_module.h>
#include <netinet/khelp/h_ertt.h> #include <netinet/khelp/h_ertt.h>

View File

@ -48,11 +48,12 @@
* http://caia.swin.edu.au/urp/newtcp/ * http://caia.swin.edu.au/urp/newtcp/
*/ */
#ifndef _NETINET_CC_H_ #ifndef _NETINET_TCP_CC_H_
#define _NETINET_CC_H_ #define _NETINET_TCP_CC_H_
/* XXX: TCP_CA_NAME_MAX define lives in tcp.h for compat reasons. */ #if !defined(_KERNEL)
#include <netinet/tcp.h> #error "no user-servicable parts inside"
#endif
/* Global CC vars. */ /* Global CC vars. */
extern STAILQ_HEAD(cc_head, cc_algo) cc_list; extern STAILQ_HEAD(cc_head, cc_algo) cc_list;
@ -171,4 +172,4 @@ extern struct rwlock cc_list_lock;
#define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock) #define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock)
#define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED) #define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED)
#endif /* _NETINET_CC_H_ */ #endif /* _NETINET_TCP_CC_H_ */

View File

@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$");
#define TCPSTATES /* for logging */ #define TCPSTATES /* for logging */
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
@ -101,12 +100,14 @@ __FBSDID("$FreeBSD$");
#ifdef TCP_RFC7413 #ifdef TCP_RFC7413
#include <netinet/tcp_fastopen.h> #include <netinet/tcp_fastopen.h>
#endif #endif
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet6/tcp6_var.h> #include <netinet6/tcp6_var.h>
#include <netinet/tcpip.h> #include <netinet/tcpip.h>
#include <netinet/tcp_cc.h>
#ifdef TCPPCAP #ifdef TCPPCAP
#include <netinet/tcp_pcap.h> #include <netinet/tcp_pcap.h>
#endif #endif

View File

@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include <net/route.h> #include <net/route.h>
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_systm.h> #include <netinet/in_systm.h>
@ -71,12 +70,14 @@ __FBSDID("$FreeBSD$");
#ifdef TCP_RFC7413 #ifdef TCP_RFC7413
#include <netinet/tcp_fastopen.h> #include <netinet/tcp_fastopen.h>
#endif #endif
#include <netinet/tcp.h>
#define TCPOUTFLAGS #define TCPOUTFLAGS
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcpip.h> #include <netinet/tcpip.h>
#include <netinet/tcp_cc.h>
#ifdef TCPPCAP #ifdef TCPPCAP
#include <netinet/tcp_pcap.h> #include <netinet/tcp_pcap.h>
#endif #endif

View File

@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$");
#define TCPSTATES /* for logging */ #define TCPSTATES /* for logging */
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
@ -100,6 +99,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/icmp6.h> #include <netinet/icmp6.h>
#include <netinet6/in6_pcb.h> #include <netinet6/in6_pcb.h>
#include <netinet6/ip6_var.h> #include <netinet6/ip6_var.h>
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
@ -107,6 +107,7 @@ __FBSDID("$FreeBSD$");
#include <netinet6/tcp6_var.h> #include <netinet6/tcp6_var.h>
#include <netinet/tcpip.h> #include <netinet/tcpip.h>
#include <netinet/tcp_syncache.h> #include <netinet/tcp_syncache.h>
#include <netinet/tcp_cc.h>
#ifdef TCPDEBUG #ifdef TCPDEBUG
#include <netinet/tcp_debug.h> #include <netinet/tcp_debug.h>
#endif /* TCPDEBUG */ #endif /* TCPDEBUG */

View File

@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
#include <net/if_var.h> #include <net/if_var.h>
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
@ -88,11 +87,13 @@ __FBSDID("$FreeBSD$");
#ifdef TCP_RFC7413 #ifdef TCP_RFC7413
#include <netinet/tcp_fastopen.h> #include <netinet/tcp_fastopen.h>
#endif #endif
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_syncache.h> #include <netinet/tcp_syncache.h>
#include <netinet/tcp_cc.h>
#ifdef INET6 #ifdef INET6
#include <netinet6/tcp6_var.h> #include <netinet6/tcp6_var.h>
#endif #endif

View File

@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h> #include <net/vnet.h>
#include <net/netisr.h> #include <net/netisr.h>
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
@ -65,9 +64,11 @@ __FBSDID("$FreeBSD$");
#include <netinet6/in6_pcb.h> #include <netinet6/in6_pcb.h>
#endif #endif
#include <netinet/ip_var.h> #include <netinet/ip_var.h>
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcp_cc.h>
#ifdef INET6 #ifdef INET6
#include <netinet6/tcp6_var.h> #include <netinet6/tcp6_var.h>
#endif #endif

View File

@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$");
#include <net/route.h> #include <net/route.h>
#include <net/vnet.h> #include <net/vnet.h>
#include <netinet/cc.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_kdtrace.h> #include <netinet/in_kdtrace.h>
#include <netinet/in_pcb.h> #include <netinet/in_pcb.h>
@ -85,11 +84,13 @@ __FBSDID("$FreeBSD$");
#ifdef TCP_RFC7413 #ifdef TCP_RFC7413
#include <netinet/tcp_fastopen.h> #include <netinet/tcp_fastopen.h>
#endif #endif
#include <netinet/tcp.h>
#include <netinet/tcp_fsm.h> #include <netinet/tcp_fsm.h>
#include <netinet/tcp_seq.h> #include <netinet/tcp_seq.h>
#include <netinet/tcp_timer.h> #include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h> #include <netinet/tcp_var.h>
#include <netinet/tcpip.h> #include <netinet/tcpip.h>
#include <netinet/tcp_cc.h>
#ifdef TCPPCAP #ifdef TCPPCAP
#include <netinet/tcp_pcap.h> #include <netinet/tcp_pcap.h>
#endif #endif