Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2013 19:53:03 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r249274 - projects/counters/sys/netinet
Message-ID:  <201304081953.r38Jr3di000327@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304081953.r38Jr3di000327>