Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2012 21:29:46 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r236554 - projects/pf/head/sys/contrib/pf/net
Message-ID:  <20120604210548.Y1459@besplex.bde.org>
In-Reply-To: <201206041009.q54A9v4A019437@svn.freebsd.org>
References:  <201206041009.q54A9v4A019437@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Jun 2012, Gleb Smirnoff wrote:

> Log:
>  Consistent names for pf(4) malloc(9) types.

Many still have spaces in them.  This breaks at least simple parsing
of "vmstat -m" output using columns in awk (and postprocessing of
vmstat -m output is more needed than orginally, since vmstat is now
too stupid to even print the totals).  A few bugs in this area have
been fixed relatively recently.  For example:

   file desc -> filedesc   (matches original naming scheme -- no underscore)
   BIO buffer -> biobuf
   UFS mount -> ufs_mount  (now just a style bug -- underscore)
   VM pgdata -> vm_pgdata
   * ihash -> [went away]
   struct cdev * -> [went away]
   cluster_save buffer -> [went away]  (was also too long)
   [too many] -> [vmstat -z, with worse names and formatting]

Now broken on ref10-i386:

   NFSCL diroffd
   NFS fh

only.

> Modified: projects/pf/head/sys/contrib/pf/net/pf.c
> ==============================================================================
> --- projects/pf/head/sys/contrib/pf/net/pf.c	Mon Jun  4 09:55:47 2012	(r236553)
> +++ projects/pf/head/sys/contrib/pf/net/pf.c	Mon Jun  4 10:09:57 2012	(r236554)
> @@ -155,7 +155,7 @@ VNET_DEFINE(struct pf_anchor_stackframe,
> /*
>  * Queue for pf_intr() sends.
>  */
> -MALLOC_DEFINE(M_PFTEMP, "pf temp", "pf(4) temporary allocations");
> +static MALLOC_DEFINE(M_PFTEMP, "pf(4) temp", "pf(4) temporary allocations");
> struct pf_send_entry {
> 	STAILQ_ENTRY(pf_send_entry)	pfse_next;
> 	struct mbuf			*pfse_m;
> @@ -350,7 +350,7 @@ VNET_DEFINE(struct pf_limit, pf_limits[P
> 		s->rule.ptr->states_cur--;		\
> 	} while (0)
>
> -MALLOC_DEFINE(M_PFHASH, "pf hashes", "pf(4) hash header structures");
> +static MALLOC_DEFINE(M_PFHASH, "pf(4) hash", "pf(4) hash header structures");
> /* XXXGL: make static? */
> VNET_DEFINE(struct pf_keyhash *, pf_keyhash);
> VNET_DEFINE(struct pf_idhash *, pf_idhash);

Space after "pf(4)"

The punctuation might be hard to parse too.

The verbose descriptions made it reasonable for the short descriptions to
be even shorter, but they are mostly longer.

Others similarly.

Bruce



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