Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2014 19:17:10 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266852 - head/sys/netpfil/pf
Message-ID:  <201405291917.s4TJHAmN067425@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu May 29 19:17:10 2014
New Revision: 266852
URL: http://svnweb.freebsd.org/changeset/base/266852

Log:
  Fix pf(4) to build with MAXCPU set to 256.  MAXCPU is actually a count,
  not a maximum ID value (so it is a cap on mp_ncpus, not mp_maxid).

Modified:
  head/sys/netpfil/pf/pf.c

Modified: head/sys/netpfil/pf/pf.c
==============================================================================
--- head/sys/netpfil/pf/pf.c	Thu May 29 18:05:03 2014	(r266851)
+++ head/sys/netpfil/pf/pf.c	Thu May 29 19:17:10 2014	(r266852)
@@ -196,7 +196,7 @@ VNET_DEFINE(uint64_t, pf_stateid[MAXCPU]
 #define	PFID_CPUSHIFT	(sizeof(uint64_t) * NBBY - PFID_CPUBITS)
 #define	PFID_CPUMASK	((uint64_t)((1 << PFID_CPUBITS) - 1) <<	PFID_CPUSHIFT)
 #define	PFID_MAXID	(~PFID_CPUMASK)
-CTASSERT((1 << PFID_CPUBITS) > MAXCPU);
+CTASSERT((1 << PFID_CPUBITS) >= MAXCPU);
 
 static void		 pf_src_tree_remove_state(struct pf_state *);
 static void		 pf_init_threshold(struct pf_threshold *, u_int32_t,



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