From c94587563504a0f8f51cfd22ef1aa264e0e22ee0 Mon Sep 17 00:00:00 2001 From: "Samuel J. Greear" Date: Sun, 5 Dec 2010 05:09:15 +0000 Subject: [PATCH] kernel - Provide descriptions for many net.inet sysctl's * Switch net.inet.ip.dispatch_* to RD from RW Submitted-by: Taras Klaskovsky Sponsored-by: Google Code-In --- sys/kern/uipc_usrreq.c | 11 ++++++----- sys/netinet/igmp.c | 2 +- sys/netinet/in.c | 3 ++- sys/netinet/in_gif.c | 2 +- sys/netinet/ip_icmp.c | 16 ++++++++-------- sys/netinet/ip_input.c | 18 ++++++++++-------- sys/netinet/tcp_timer.c | 6 +++--- sys/netinet/udp_usrreq.c | 2 +- 8 files changed, 32 insertions(+), 28 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index fdf9fa8dc9..1cdc6cc139 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -684,18 +684,19 @@ static struct spinlock unp_spin = SPINLOCK_INITIALIZER(&unp_spin); SYSCTL_DECL(_net_local_seqpacket); SYSCTL_DECL(_net_local_stream); SYSCTL_INT(_net_local_stream, OID_AUTO, sendspace, CTLFLAG_RW, - &unpst_sendspace, 0, ""); + &unpst_sendspace, 0, "Size of stream socket send buffer"); SYSCTL_INT(_net_local_stream, OID_AUTO, recvspace, CTLFLAG_RW, - &unpst_recvspace, 0, ""); + &unpst_recvspace, 0, "Size of stream socket receive buffer"); SYSCTL_DECL(_net_local_dgram); SYSCTL_INT(_net_local_dgram, OID_AUTO, maxdgram, CTLFLAG_RW, - &unpdg_sendspace, 0, ""); + &unpdg_sendspace, 0, "Max datagram socket size"); SYSCTL_INT(_net_local_dgram, OID_AUTO, recvspace, CTLFLAG_RW, - &unpdg_recvspace, 0, ""); + &unpdg_recvspace, 0, "Size of datagram socket receive buffer"); SYSCTL_DECL(_net_local); -SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, ""); +SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, + "File descriptors in flight"); static int unp_attach(struct socket *so, struct pru_attach_info *ai) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 164c32d658..0710098cab 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -82,7 +82,7 @@ static struct router_info * static struct igmpstat igmpstat; SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RW, - &igmpstat, igmpstat, ""); + &igmpstat, igmpstat, "IGMP statistics"); static int igmp_timers_are_running; static u_long igmp_all_hosts_group; diff --git a/sys/netinet/in.c b/sys/netinet/in.c index bf16151a38..e8ab387e70 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -80,7 +80,8 @@ static void in_scrubprefix(struct in_ifaddr *); static int subnetsarelocal = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, - &subnetsarelocal, 0, ""); + &subnetsarelocal, 0, + "Count all internet addresses of subnets of the local net as local"); struct in_multihead in_multihead; /* XXX BSS initialization */ diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index f351990856..ce27fe5e0a 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -93,7 +93,7 @@ const struct protosw in_gif_protosw = int ip_gif_ttl = GIF_TTL; SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, - &ip_gif_ttl, 0, ""); + &ip_gif_ttl, 0, "TTL of GIF packet"); int in_gif_output(struct ifnet *ifp, int family, struct mbuf *m) diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 1945f897b6..36842ff721 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -82,19 +82,19 @@ struct icmpstat icmpstat; SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, - &icmpstat, icmpstat, ""); + &icmpstat, icmpstat, "ICMP statistics"); static int icmpmaskrepl = 0; SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, - &icmpmaskrepl, 0, ""); + &icmpmaskrepl, 0, "Allow replies to netmask requests"); static int drop_redirect = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, - &drop_redirect, 0, ""); + &drop_redirect, 0, "Ignore ICMP redirects"); static int log_redirect = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, - &log_redirect, 0, ""); + &log_redirect, 0, "Enable output about ICMP redirects"); #ifdef ICMP_BANDLIM @@ -105,18 +105,18 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, static int icmplim = 200; SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, - &icmplim, 0, ""); + &icmplim, 0, "ICMP bandwidth limit"); #else static int icmplim = -1; SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RD, - &icmplim, 0, ""); + &icmplim, 0, "ICMP bandwidth limit"); #endif static int icmplim_output = 1; SYSCTL_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, - &icmplim_output, 0, ""); + &icmplim_output, 0, "Enable output about ICMP bandwidth limits"); /* * ICMP broadcast echo sysctl @@ -124,7 +124,7 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, static int icmpbmcastecho = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, - &icmpbmcastecho, 0, ""); + &icmpbmcastecho, 0, ""); static char icmp_reply_src[IFNAMSIZ]; SYSCTL_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 3f6a6fd580..4415d7f9b5 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -207,14 +207,16 @@ static int ip_dispatch_fast = 0; static int ip_dispatch_slow = 0; static int ip_dispatch_recheck = 0; static int ip_dispatch_software = 0; -SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_fast_count, CTLFLAG_RW, - &ip_dispatch_fast, 0, ""); -SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_slow_count, CTLFLAG_RW, - &ip_dispatch_slow, 0, ""); -SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_software_count, CTLFLAG_RW, - &ip_dispatch_software, 0, ""); -SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_recheck_count, CTLFLAG_RW, - &ip_dispatch_recheck, 0, ""); +SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_fast_count, CTLFLAG_RD, + &ip_dispatch_fast, 0, + "Number of IP dispatches handled on current CPU"); +SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_slow_count, CTLFLAG_RD, + &ip_dispatch_slow, 0, + "Number of IP dispatches messaged to another CPU"); +SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_software_count, CTLFLAG_RD, + &ip_dispatch_software, 0, ""); +SYSCTL_INT(_net_inet_ip, OID_AUTO, dispatch_recheck_count, CTLFLAG_RD, + &ip_dispatch_recheck, 0, ""); static struct lwkt_token ipq_token = LWKT_TOKEN_MP_INITIALIZER(ipq_token); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 444cf828e5..bb83021003 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -154,15 +154,15 @@ sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS) int tcp_keepinit; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", "Time to establish TCP connection"); int tcp_keepidle; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPIDLE, keepidle, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepidle, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepidle, 0, sysctl_msec_to_ticks, "I", "Time before TCP keepalive probes begin"); int tcp_keepintvl; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINTVL, keepintvl, CTLTYPE_INT|CTLFLAG_RW, - &tcp_keepintvl, 0, sysctl_msec_to_ticks, "I", ""); + &tcp_keepintvl, 0, sysctl_msec_to_ticks, "I", "Time between TCP keepalive probes"); int tcp_delacktime; SYSCTL_PROC(_net_inet_tcp, TCPCTL_DELACKTIME, delacktime, diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 77bf95a6fd..41ffb52d45 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -130,7 +130,7 @@ static int udpcksum = 1; static int udpcksum = 0; /* XXX */ #endif SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW, - &udpcksum, 0, ""); + &udpcksum, 0, "Enable checksumming of UDP packets"); int log_in_vain = 0; SYSCTL_INT(_net_inet_udp, OID_AUTO, log_in_vain, CTLFLAG_RW, -- 2.41.0