svn commit: r266852 - head/sys/netpfil/pf

John Baldwin jhb at FreeBSD.org
Thu May 29 19:17:11 UTC 2014


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,


More information about the svn-src-all mailing list