svn commit: r265408 - in head: sys/netinet usr.bin/netstat

Gleb Smirnoff glebius at FreeBSD.org
Tue May 6 00:00:08 UTC 2014


Author: glebius
Date: Tue May  6 00:00:07 2014
New Revision: 265408
URL: http://svnweb.freebsd.org/changeset/base/265408

Log:
  - 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.

Modified:
  head/sys/netinet/tcp_reass.c
  head/sys/netinet/tcp_var.h
  head/usr.bin/netstat/inet.c

Modified: head/sys/netinet/tcp_reass.c
==============================================================================
--- head/sys/netinet/tcp_reass.c	Mon May  5 23:54:13 2014	(r265407)
+++ head/sys/netinet/tcp_reass.c	Tue May  6 00:00:07 2014	(r265408)
@@ -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 tcphd
 	    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))) {

Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h	Mon May  5 23:54:13 2014	(r265407)
+++ head/sys/netinet/tcp_var.h	Tue May  6 00:00:07 2014	(r265408)
@@ -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 */

Modified: head/usr.bin/netstat/inet.c
==============================================================================
--- head/usr.bin/netstat/inet.c	Mon May  5 23:54:13 2014	(r265407)
+++ head/usr.bin/netstat/inet.c	Tue May  6 00:00:07 2014	(r265408)
@@ -660,7 +660,8 @@ tcp_stats(u_long off, const char *name, 
 	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");


More information about the svn-src-head mailing list