svn commit: r283303 - in stable/10/sys: amd64/include netpfil/pf
John Baldwin
jhb at FreeBSD.org
Fri May 22 21:51:38 UTC 2015
Author: jhb
Date: Fri May 22 21:51:36 2015
New Revision: 283303
URL: https://svnweb.freebsd.org/changeset/base/283303
Log:
MFC 266852,270223:
- 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).
- Bump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255
CPUs (IDs 0 through 254). Getting above that limit requires x2APIC.
Modified:
stable/10/sys/amd64/include/param.h
stable/10/sys/netpfil/pf/pf.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/amd64/include/param.h
==============================================================================
--- stable/10/sys/amd64/include/param.h Fri May 22 21:38:11 2015 (r283302)
+++ stable/10/sys/amd64/include/param.h Fri May 22 21:51:36 2015 (r283303)
@@ -65,7 +65,7 @@
#if defined(SMP) || defined(KLD_MODULE)
#ifndef MAXCPU
-#define MAXCPU 64
+#define MAXCPU 256
#endif
#else
#define MAXCPU 1
Modified: stable/10/sys/netpfil/pf/pf.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf.c Fri May 22 21:38:11 2015 (r283302)
+++ stable/10/sys/netpfil/pf/pf.c Fri May 22 21:51:36 2015 (r283303)
@@ -195,7 +195,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