From 054ef37088aeb0e310b5edb1d5eebe47b2c3a973 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Wed, 1 Nov 1995 17:18:27 +0000 Subject: [PATCH] Instrument the IP input queue with two new read-only MIB entries: net.inet.ip.intr-queue-maxlen (=== ipintrq.ifq_maxlen) and net.inet.ip.intr-queue-drops (=== ipintrq.ifq_drops) There should probably be a standard way of getting the same information going the other way. --- sys/netinet/in.h | 8 ++++++-- sys/netinet/ip_input.c | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 53fd10305be7..09e5bc958987 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.h 8.3 (Berkeley) 1/3/94 - * $Id: in.h,v 1.10 1995/06/13 17:51:08 wollman Exp $ + * $Id: in.h,v 1.11 1995/07/18 09:56:42 peter Exp $ */ #ifndef _NETINET_IN_H_ @@ -233,7 +233,9 @@ struct ip_mreq { #define IPCTL_RTMAXCACHE 7 /* trigger level for dynamic expire */ #define IPCTL_SOURCEROUTE 8 /* may perform source routes */ #define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */ -#define IPCTL_MAXID 10 +#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */ +#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */ +#define IPCTL_MAXID 12 #define IPCTL_NAMES { \ { 0, 0 }, \ @@ -246,6 +248,8 @@ struct ip_mreq { { "rtmaxcache", CTLTYPE_INT }, \ { "sourceroute", CTLTYPE_INT }, \ { "directed-broadcast", CTLTYPE_INT }, \ + { "intr-queue-maxlen", CTLTYPE_INT }, \ + { "intr-queue-drops", CTLTYPE_INT }, \ } diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index b514ca7592a6..383573b79694 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_input.c,v 1.25 1995/07/09 14:29:46 davidg Exp $ + * $Id: ip_input.c,v 1.26 1995/07/18 09:56:44 peter Exp $ */ #include @@ -1228,6 +1228,11 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen) case IPCTL_RTMAXCACHE: return (sysctl_int(oldp, oldlenp, newp, newlen, &rtq_toomany)); + case IPCTL_INTRQMAXLEN: + return (sysctl_rdint(oldp, oldlenp, newp, + ipintrq.ifq_maxlen)); + case IPCTL_INTRQDROPS: + return (sysctl_rdint(oldp, oldlenp, newp, ipintrq.ifq_drops)); default: return (EOPNOTSUPP); }