diff options
author | andre <andre@FreeBSD.org> | 2004-02-24 15:27:41 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-02-24 15:27:41 +0000 |
commit | 5ef70fe223ecca1ecc385a720742f0b16159e859 (patch) | |
tree | eda4f0335f73851268852863dcbbd967de416d1f /sys/netinet/tcp_var.h | |
parent | e94b95684a67ec548cafe6ed6e753eecec3c60ec (diff) | |
download | FreeBSD-src-5ef70fe223ecca1ecc385a720742f0b16159e859.zip FreeBSD-src-5ef70fe223ecca1ecc385a720742f0b16159e859.tar.gz |
Convert the tcp segment reassembly queue to UMA and limit the maximum
amount of segments it will hold.
The following tuneables and sysctls control the behaviour of the tcp
segment reassembly queue:
net.inet.tcp.reass.maxsegments (loader tuneable)
specifies the maximum number of segments all tcp reassemly queues can
hold (defaults to 1/16 of nmbclusters).
net.inet.tcp.reass.maxqlen
specifies the maximum number of segments any individual tcp session queue
can hold (defaults to 48).
net.inet.tcp.reass.cursegments (readonly)
counts the number of segments currently in all reassembly queues.
net.inet.tcp.reass.overflows (readonly)
counts how often either the global or local queue limit has been reached.
Tested by: bms, silby
Reviewed by: bms, silby
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index e8aa435..07ebd06 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -54,8 +54,9 @@ struct tseg_qent { struct mbuf *tqe_m; /* mbuf contains packet */ }; LIST_HEAD(tsegqe_head, tseg_qent); -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_TSEGQ); +extern int tcp_reass_qsize; +#ifdef VM_UMA_H +extern uma_zone_t tcp_reass_zone; #endif struct tcptemp { @@ -70,7 +71,8 @@ struct tcptemp { * Organized for 16 byte cacheline efficiency. */ struct tcpcb { - struct tsegqe_head t_segq; + struct tsegqe_head t_segq; /* segment reassembly queue */ + int t_segqlen; /* segment reassembly queue length */ int t_dupacks; /* consecutive dup acks recd */ struct tcptemp *unused; /* unused */ @@ -519,6 +521,7 @@ struct tcpcb * void tcp_drain(void); void tcp_fasttimo(void); void tcp_init(void); +void tcp_reass_init(void); void tcp_input(struct mbuf *, int); u_long tcp_maxmtu(struct in_conninfo *); u_long tcp_maxmtu6(struct in_conninfo *); |