diff options
author | glebius <glebius@FreeBSD.org> | 2014-05-06 00:00:07 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-05-06 00:00:07 +0000 |
commit | 68ca190323e7bcd6d570e89b1cfd93450a605c07 (patch) | |
tree | dd1a2c6cbad8a9e354c9484957d5117bb33e9693 | |
parent | aa70881c34edaff767bc4cad64b636161cb4dc0b (diff) | |
download | FreeBSD-src-68ca190323e7bcd6d570e89b1cfd93450a605c07.zip FreeBSD-src-68ca190323e7bcd6d570e89b1cfd93450a605c07.tar.gz |
- Remove net.inet.tcp.reass.overflows sysctl. It counts exactly
same events that tcpstat's tcps_rcvmemdrop counter counts.
- Rename tcps_rcvmemdrop to tcps_rcvreassfull and improve its
description in netstat(1) output.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
-rw-r--r-- | sys/netinet/tcp_reass.c | 13 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 2 | ||||
-rw-r--r-- | usr.bin/netstat/inet.c | 3 |
3 files changed, 4 insertions, 14 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index c8bd4b1..14f0e93 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -72,16 +72,6 @@ __FBSDID("$FreeBSD$"); #include <netinet6/tcp6_var.h> #include <netinet/tcpip.h> -static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, - "TCP Segment Reassembly Queue"); - -static VNET_DEFINE(int, tcp_reass_overflows) = 0; -#define V_tcp_reass_overflows VNET(tcp_reass_overflows) -SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, - CTLTYPE_INT | CTLFLAG_RD, - &VNET_NAME(tcp_reass_overflows), 0, - "Global number of TCP Segment Reassembly Queue Overflows"); - void tcp_reass_flush(struct tcpcb *tp) { @@ -142,8 +132,7 @@ tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m) tp->t_segqlen + m->m_pkthdr.len >= sbspace(&so->so_rcv)) { char *s; - V_tcp_reass_overflows++; - TCPSTAT_INC(tcps_rcvmemdrop); + TCPSTAT_INC(tcps_rcvreassfull); *tlenp = 0; if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 3577bed..4d7074a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -426,7 +426,7 @@ struct tcpstat { uint64_t tcps_rcvbyte; /* bytes received in sequence */ uint64_t tcps_rcvbadsum; /* packets received with ccksum errs */ uint64_t tcps_rcvbadoff; /* packets received with bad offset */ - uint64_t tcps_rcvmemdrop; /* packets dropped for lack of memory */ + uint64_t tcps_rcvreassfull; /* packets dropped for no reass space */ uint64_t tcps_rcvshort; /* packets received too short */ uint64_t tcps_rcvduppack; /* duplicate-only packets received */ uint64_t tcps_rcvdupbyte; /* duplicate-only bytes received */ diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 09b3110..9f8f1d2 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -660,7 +660,8 @@ tcp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) p(tcps_rcvbadsum, "\t\t%ju discarded for bad checksum%s\n"); p(tcps_rcvbadoff, "\t\t%ju discarded for bad header offset field%s\n"); p1a(tcps_rcvshort, "\t\t%ju discarded because packet too short\n"); - p1a(tcps_rcvmemdrop, "\t\t%ju discarded due to memory problems\n"); + p1a(tcps_rcvreassfull, + "\t\t%ju discarded due to no space in reassembly queue\n"); p(tcps_connattempt, "\t%ju connection request%s\n"); p(tcps_accepts, "\t%ju connection accept%s\n"); p(tcps_badsyn, "\t%ju bad connection attempt%s\n"); |