mirror of https://github.com/F-Stack/f-stack.git
Support extra tcp stacks, rack and bbr.
This commit is contained in:
parent
8a60d0f5fe
commit
77ab9738ba
|
@ -188,11 +188,15 @@ __FBSDID("$FreeBSD$");
|
|||
#endif
|
||||
|
||||
MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts");
|
||||
#ifndef FSTACK
|
||||
#ifdef RSS
|
||||
static int tcp_bind_threads = 1;
|
||||
#else
|
||||
static int tcp_bind_threads = 2;
|
||||
#endif
|
||||
#else
|
||||
static int tcp_bind_threads = 1;
|
||||
#endif
|
||||
TUNABLE_INT("net.inet.tcp.bind_hptss", &tcp_bind_threads);
|
||||
|
||||
static struct tcp_hptsi tcp_pace;
|
||||
|
@ -1971,6 +1975,7 @@ tcp_init_hptsi(void *st)
|
|||
if (intr_event_bind(hpts->ie, i) == 0)
|
||||
bound++;
|
||||
} else if (tcp_bind_threads == 2) {
|
||||
#ifndef FSTACK
|
||||
pc = pcpu_find(i);
|
||||
domain = pc->pc_domain;
|
||||
CPU_COPY(&cpuset_domain[domain], &cs);
|
||||
|
@ -1981,6 +1986,7 @@ tcp_init_hptsi(void *st)
|
|||
hpts_domains[domain].cpu[count] = i;
|
||||
hpts_domains[domain].count++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = hpts->p_hpts_sleep_time * HPTS_TICKS_PER_USEC;
|
||||
|
|
|
@ -147,6 +147,11 @@ struct sysctl_oid *bbr_sysctl_root;
|
|||
|
||||
/*#define BBR_INVARIANT 1*/
|
||||
|
||||
#ifdef FSTACK
|
||||
#define MODNAME tcp_bbr
|
||||
#define STACKNAME bbr
|
||||
#endif
|
||||
|
||||
/*
|
||||
* initial window
|
||||
*/
|
||||
|
|
|
@ -139,6 +139,11 @@ struct sysctl_oid *rack_sysctl_root;
|
|||
#define CUM_ACKED 1
|
||||
#define SACKED 2
|
||||
|
||||
#ifdef FSTACK
|
||||
#define MODNAME tcp_rack
|
||||
#define STACKNAME rack
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The RACK module incorporates a number of
|
||||
* TCP ideas that have been put out into the IETF
|
||||
|
|
30
lib/Makefile
30
lib/Makefile
|
@ -27,12 +27,20 @@ HOST_OS:=$(shell uname -s)
|
|||
DEBUG=-O0 -gdwarf-2 -g3 -Wno-format-truncation
|
||||
|
||||
FF_KNI=1
|
||||
|
||||
#FF_FLOW_ISOLATE=1
|
||||
|
||||
# NETGRAPH drivers ipfw
|
||||
#FF_NETGRAPH=1
|
||||
#FF_IPFW=1
|
||||
|
||||
#FF_USE_PAGE_ARRAY=1
|
||||
|
||||
FF_INET6=1
|
||||
|
||||
# TCPHPTS drivers rack and bbr
|
||||
FF_TCPHPTS=1
|
||||
FF_EXTRA_TCP_STACKS=1
|
||||
|
||||
include ${TOPDIR}/mk/kern.pre.mk
|
||||
|
||||
|
@ -88,6 +96,10 @@ HOST_CFLAGS+= -DINET6
|
|||
CFLAGS+= -DINET6
|
||||
endif
|
||||
|
||||
ifdef FF_TCPHPTS
|
||||
CFLAGS+= -DTCPHPTS -DRATELIMIT
|
||||
endif
|
||||
|
||||
HOST_C= ${CC} -c $(HOST_CFLAGS) ${HOST_INCLUDES} ${WERROR} ${PROF} $<
|
||||
|
||||
|
||||
|
@ -171,6 +183,9 @@ VPATH+= $S/netinet/cc
|
|||
ifdef FF_INET6
|
||||
VPATH+= $S/netinet6
|
||||
endif
|
||||
ifdef FF_EXTRA_TCP_STACKS
|
||||
VPATH+= $S/netinet/tcp_stacks
|
||||
endif
|
||||
VPATH+= $S/netipsec
|
||||
ifdef FF_IPFW
|
||||
VPATH+= $S/netpfil/ipfw
|
||||
|
@ -489,6 +504,19 @@ NETINET6_SRCS+= \
|
|||
#ip6_ipsec.c
|
||||
#sctp6_usrreq.c
|
||||
#in6_rss.c
|
||||
|
||||
ifdef FF_EXTRA_TCP_STACKS
|
||||
EXTRA_TCP_STACKS_SRCS+= \
|
||||
subr_filter.c \
|
||||
tcp_hpts.c \
|
||||
tcp_ratelimit.c \
|
||||
arc4random_uniform.c \
|
||||
sack_filter.c \
|
||||
rack_bbr_common.c \
|
||||
rack.c \
|
||||
bbr.c
|
||||
endif
|
||||
|
||||
ifndef FF_KNI
|
||||
FF_HOST_SRCS+= \
|
||||
ff_dpdk_kni.c
|
||||
|
@ -568,7 +596,7 @@ MSRCS+= $(patsubst %.m,%.c,${OPENCRYPTO_MSRCS})
|
|||
ASM_SRCS = ${CRYPTO_ASM_SRCS}
|
||||
|
||||
SRCS= ${FF_SRCS} ${CRYPTO_SRCS} ${KERN_SRCS} ${LIBKERN_SRCS} ${MACHINE_SRCS}
|
||||
SRCS+= ${MSRCS} ${NET_SRCS} ${NETGRAPH_SRCS} ${NETINET_SRCS} ${NETINET6_SRCS}
|
||||
SRCS+= ${MSRCS} ${NET_SRCS} ${NETGRAPH_SRCS} ${NETINET_SRCS} ${NETINET6_SRCS} ${EXTRA_TCP_STACKS_SRCS}
|
||||
SRCS+= ${NETIPSEC_SRCS} ${NETIPFW_SRCS} ${OPENCRYPTO_SRCS} ${VM_SRCS}
|
||||
|
||||
# If witness is enabled.
|
||||
|
|
Loading…
Reference in New Issue