summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2007-05-28 21:02:50 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2007-05-28 21:02:50 +0000
commit09f1040d9f8fbb4c35d79fd518bd64ec62fc9f6d (patch)
tree5b11e6221e6d9b91c808e69b2a1823558ea23cc0 /sys
parentd712b1c30203948ed4094f85fdcd5f1700d1eb9d (diff)
Move the MSIZE, MCLSHIFT, MCLBYTES and the MCLOFSET
mbuf constants from MD param.h to MI param.h. Besides being the same on every arch, things will most probly break if any arch has different values then the others. The NMBCLUSTERS constants needs to be MD though; ok miod@,krw@,claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/param.h13
-rw-r--r--sys/arch/amd64/include/param.h10
-rw-r--r--sys/arch/arm/include/param.h10
-rw-r--r--sys/arch/hppa64/include/param.h10
-rw-r--r--sys/arch/i386/include/param.h10
-rw-r--r--sys/arch/m68k/include/param.h14
-rw-r--r--sys/arch/m88k/include/param.h11
-rw-r--r--sys/arch/mips64/include/param.h12
-rw-r--r--sys/arch/powerpc/include/param.h10
-rw-r--r--sys/arch/sh/include/param.h12
-rw-r--r--sys/arch/solbourne/include/param.h10
-rw-r--r--sys/arch/sparc/include/param.h10
-rw-r--r--sys/arch/sparc64/include/param.h10
-rw-r--r--sys/arch/vax/include/param.h16
-rw-r--r--sys/sys/param.h16
15 files changed, 29 insertions, 145 deletions
diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h
index d9f886ae1c5..b4808698759 100644
--- a/sys/arch/alpha/include/param.h
+++ b/sys/arch/alpha/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.31 2006/08/12 17:54:38 krw Exp $ */
+/* $OpenBSD: param.h,v 1.32 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.30 2000/06/09 16:03:04 thorpej Exp $ */
/*
@@ -93,18 +93,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
- /* 2K cluster can hold Ether frame */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
diff --git a/sys/arch/amd64/include/param.h b/sys/arch/amd64/include/param.h
index fa931fa4d70..520dfd387a5 100644
--- a/sys/arch/amd64/include/param.h
+++ b/sys/arch/amd64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.13 2006/03/19 01:47:23 martin Exp $ */
+/* $OpenBSD: param.h,v 1.14 2007/05/28 21:02:49 thib Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -99,15 +99,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within a m_buf cluster */
#define NMBCLUSTERS 6144 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/arm/include/param.h b/sys/arch/arm/include/param.h
index 4cf1f546468..ae7022c4ead 100644
--- a/sys/arch/arm/include/param.h
+++ b/sys/arch/arm/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.10 2006/03/19 01:47:23 martin Exp $ */
+/* $OpenBSD: param.h,v 1.11 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.9 2002/03/24 03:37:23 thorpej Exp $ */
/*
@@ -169,15 +169,7 @@ void delay (unsigned);
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
- /* 2K cluster can hold Ether frame */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
#define ovbcopy bcopy
diff --git a/sys/arch/hppa64/include/param.h b/sys/arch/hppa64/include/param.h
index 665e4084d81..50f24b47967 100644
--- a/sys/arch/hppa64/include/param.h
+++ b/sys/arch/hppa64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.8 2006/08/12 17:54:38 krw Exp $ */
+/* $OpenBSD: param.h,v 1.9 2007/05/28 21:02:49 thib Exp $ */
/*
* Copyright (c) 1988-1994, The University of Utah and
@@ -70,15 +70,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11
-#define MCLBYTES (1 << MCLSHIFT) /* large enough for ether MTU */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h
index 161973c6f36..99145276a6f 100644
--- a/sys/arch/i386/include/param.h
+++ b/sys/arch/i386/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.39 2007/02/20 21:15:01 tom Exp $ */
+/* $OpenBSD: param.h,v 1.40 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */
/*-
@@ -102,15 +102,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within a m_buf cluster */
#define NMBCLUSTERS 6144 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h
index 5c46893e921..3315b3a56ce 100644
--- a/sys/arch/m68k/include/param.h
+++ b/sys/arch/m68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.21 2007/05/15 13:46:22 martin Exp $ */
+/* $OpenBSD: param.h,v 1.22 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */
/*
@@ -111,19 +111,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than CLBYTES (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#endif /* MCLSHIFT */
-
-#define MCLBYTES (1 << MCLSHIFT)
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 1024 /* map size, max cluster allocation */
/* pages ("clicks") to disk blocks */
diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h
index 09739098a3c..563bf09528a 100644
--- a/sys/arch/m88k/include/param.h
+++ b/sys/arch/m88k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.9 2006/03/19 01:47:24 martin Exp $ */
+/* $OpenBSD: param.h,v 1.10 2007/05/28 21:02:49 thib Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1988 University of Utah.
@@ -83,16 +83,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within a m_buf cluster */
-
#define NMBCLUSTERS 2048 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h
index 0ec0bdc51e2..526d0927187 100644
--- a/sys/arch/mips64/include/param.h
+++ b/sys/arch/mips64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.16 2007/04/16 20:01:00 miod Exp $ */
+/* $OpenBSD: param.h,v 1.17 2007/05/28 21:02:49 thib Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -93,18 +93,8 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than PAGE_SIZE (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11
-#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */
-#define MCLOFSET (MCLBYTES - 1)
-#ifndef NMBCLUSTERS
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
-#endif
#define MSGBUFSIZE 8192
diff --git a/sys/arch/powerpc/include/param.h b/sys/arch/powerpc/include/param.h
index 13416354fa0..dd40e4052fe 100644
--- a/sys/arch/powerpc/include/param.h
+++ b/sys/arch/powerpc/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.28 2006/03/19 22:01:32 miod Exp $ */
+/* $OpenBSD: param.h,v 1.29 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */
/*-
@@ -78,15 +78,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/sh/include/param.h b/sys/arch/sh/include/param.h
index efb8a4b9dbb..b826b6adf8f 100644
--- a/sys/arch/sh/include/param.h
+++ b/sys/arch/sh/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.3 2007/03/03 21:37:27 miod Exp $ */
+/* $OpenBSD: param.h,v 1.4 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.15 2006/08/28 13:43:35 yamt Exp $ */
/*-
@@ -118,17 +118,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
- /* 2K cluster can hold Ether frame */
-#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
-
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
/*
diff --git a/sys/arch/solbourne/include/param.h b/sys/arch/solbourne/include/param.h
index 494010de889..9c535c0c718 100644
--- a/sys/arch/solbourne/include/param.h
+++ b/sys/arch/solbourne/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.5 2006/08/12 17:54:38 krw Exp $ */
+/* $OpenBSD: param.h,v 1.6 2007/05/28 21:02:49 thib Exp $ */
/* OpenBSD: param.h,v 1.29 2004/08/06 22:31:31 mickey Exp */
/*
@@ -87,15 +87,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* log2(MCLBYTES) */
-#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 2048 /* map size, max cluster allocation */
#define MSGBUFSIZE PAGE_SIZE /* larger than on sparc! */
diff --git a/sys/arch/sparc/include/param.h b/sys/arch/sparc/include/param.h
index 6066b108793..95dbcd3ea9d 100644
--- a/sys/arch/sparc/include/param.h
+++ b/sys/arch/sparc/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.38 2007/04/10 16:43:37 miod Exp $ */
+/* $OpenBSD: param.h,v 1.39 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.29 1997/03/10 22:50:37 pk Exp $ */
/*
@@ -92,15 +92,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than the software page size, and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* log2(MCLBYTES) */
-#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 2048 /* map size, max cluster allocation */
#define MSGBUFSIZE 4096 /* cannot be changed without great pain */
diff --git a/sys/arch/sparc64/include/param.h b/sys/arch/sparc64/include/param.h
index 4ba8af45faf..de4d7c0f8d1 100644
--- a/sys/arch/sparc64/include/param.h
+++ b/sys/arch/sparc64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.24 2007/05/02 14:05:39 tom Exp $ */
+/* $OpenBSD: param.h,v 1.25 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.25 2001/05/30 12:28:51 mrg Exp $ */
/*
@@ -173,15 +173,7 @@ extern int nbpg, pgofset, pgshift;
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-#define MSIZE 256 /* size of an mbuf */
-#define MCLSHIFT 11 /* log2(MCLBYTES) */
-#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */
-#define MCLOFSET (MCLBYTES - 1)
#define NMBCLUSTERS 4096 /* map size, max cluster allocation */
#define MSGBUFSIZE NBPG
diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h
index ab1fc45ce4d..789f32c49ba 100644
--- a/sys/arch/vax/include/param.h
+++ b/sys/arch/vax/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.32 2006/05/30 21:25:28 miod Exp $ */
+/* $OpenBSD: param.h,v 1.33 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.39 1999/10/22 21:14:34 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -96,21 +96,7 @@
/*
* Constants related to network buffer management.
- * MCLBYTES must be no larger than NBPG (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
*/
-
-#ifndef MSIZE
-#define MSIZE 256 /* size of an mbuf */
-#endif /* MSIZE */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
#define NMBCLUSTERS 768 /* map size, max cluster allocation */
/*
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 372f3978c77..395e42cafb7 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.69 2007/02/12 13:10:02 henning Exp $ */
+/* $OpenBSD: param.h,v 1.70 2007/05/28 21:02:49 thib Exp $ */
/* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */
/*-
@@ -129,6 +129,20 @@
#define CROUND (CBLOCK - 1) /* Clist rounding. */
/*
+ * Constants related to network buffer management.
+ * MCLBYTES must be no larger than NBPG (the software page size), and,
+ * on machines that exchange pages of input or output buffers with mbuf
+ * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
+ * of the hardware page size.
+ */
+#define MSIZE 256 /* size of an mbuf */
+#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
+ /* 2K cluster can hold Ether frame */
+#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
+#define MCLOFSET (MCLBYTES - 1)
+
+
+/*
* File system parameters and macros.
*
* The file system is made out of blocks of at most MAXBSIZE units, with