svn commit: r249274 - projects/counters/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Mon Apr 8 19:53:03 UTC 2013


Author: glebius
Date: Mon Apr  8 19:53:02 2013
New Revision: 249274
URL: http://svnweb.freebsd.org/changeset/base/249274

Log:
  Update comments.

Modified:
  projects/counters/sys/netinet/ip_input.c
  projects/counters/sys/netinet/tcp_input.c

Modified: projects/counters/sys/netinet/ip_input.c
==============================================================================
--- projects/counters/sys/netinet/ip_input.c	Mon Apr  8 19:51:46 2013	(r249273)
+++ projects/counters/sys/netinet/ip_input.c	Mon Apr  8 19:53:02 2013	(r249274)
@@ -208,8 +208,9 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, 
 static void	ip_freef(struct ipqhead *, struct ipq *);
 
 /*
- * ipstat
- * XXXGL: more words here.
+ * IP statistics are stored in struct ipstat_p, which is
+ * an "array" of counter(9)s.  Although it isn't a real
+ * array, we treat it as array to reduce code bloat.
  */
 VNET_DEFINE(struct ipstat_p, ipstatp);
 
@@ -275,12 +276,8 @@ SYSCTL_VNET_PROC(_net_inet_ip, IPCTL_STA
     "IP statistics (struct ipstat, netinet/ip_var.h)");
 
 /*
- * XXXGL!
  * Kernel module interface for updating ipstat.  The argument is an index
- * into ipstat treated as an array of u_long.  While this encodes the general
- * layout of ipstat into the caller, it doesn't encode its location, so that
- * future changes to add, for example, per-CPU stats support won't cause
- * binary compatibility problems for kernel modules.
+ * into ipstat treated as an array.
  */
 void
 kmod_ipstat_inc(int statnum)

Modified: projects/counters/sys/netinet/tcp_input.c
==============================================================================
--- projects/counters/sys/netinet/tcp_input.c	Mon Apr  8 19:51:46 2013	(r249273)
+++ projects/counters/sys/netinet/tcp_input.c	Mon Apr  8 19:53:02 2013	(r249274)
@@ -240,8 +240,9 @@ static void inline	hhook_run_tcp_est_in(
 			    struct tcphdr *th, struct tcpopt *to);
 
 /*
- * tcpstat
- * XXXGL: more words here.
+ * TCP statistics are stored in struct tcpstat_p, which is
+ * an "array" of counter(9)s.  Although it isn't a real
+ * array, we treat it as array to reduce code bloat.
  */
 VNET_DEFINE(struct tcpstat_p, tcpstatp);
 
@@ -301,13 +302,8 @@ SYSCTL_VNET_PROC(_net_inet_tcp, TCPCTL_S
     "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
 
 /*
- * XXXGL
- *
  * Kernel module interface for updating tcpstat.  The argument is an index
- * into tcpstat treated as an array of u_long.  While this encodes the
- * general layout of tcpstat into the caller, it doesn't encode its location,
- * so that future changes to add, for example, per-CPU stats support won't
- * cause binary compatibility problems for kernel modules.
+ * into tcpstat treated as an array.
  */
 void
 kmod_tcpstat_inc(int statnum)


More information about the svn-src-projects mailing list