Move user-visible MBUF constant here. Define MAXPHYS. Include DEV_BSIZE

This commit is contained in:
matt 2001-07-13 19:43:15 +00:00
parent 366971a414
commit c5e61ec6d5
1 changed files with 21 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.1 2001/06/23 13:25:19 bjh21 Exp $ */
/* $NetBSD: param.h,v 1.2 2001/07/13 19:43:15 matt Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@ -58,6 +58,14 @@
#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1 << DEV_BSHIFT)
#define BLKDEV_IOSIZE 2048
#ifndef MAXPHYS
#define MAXPHYS 65536 /* max I/O transfer size */
#endif
/* pages ("clicks") to disk blocks */
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
@ -81,4 +89,16 @@
*/
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
/*
* 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 */
#endif /* _ARM_PARAM_H_ */