*
* stream -- stream tunable parameters and data structures
*

%PARAM

**********************************************************************
* The following entries form the tunable parameter table.
*

NQUEUE		(NSTREAM*7+8)	# size of queue_t pool
NSTREAM		4		# size of stream head pool
NSTRPUSH	4		# max modules allowed to be pushed on a stream
NSTREVENT	(NQUEUE+16)	# max number of pending stream events
MAXSEPGCNT	4		# max pages that can be used for more NSTREVENTs
NMUXLINK	4		# max stream multiplexer links
STRMSGSZ	4096		# maximum stream data portion size
STRCTLSZ	1024		# maximum stream control portion size
NBLK4096	2		# number of 4096 byte stream buffers
NBLK2048	2		# number of 2048 byte stream buffers
NBLK1024	8		# number of 1024 byte stream buffers
NBLK512		4		# number of 512 byte stream buffers
NBLK256		8		# number of 256 byte stream buffers
NBLK128	        8		# number of 128 byte stream buffers
NBLK64		16		# number of 64 byte stream buffers
NBLK16		16		# number of 16 byte stream buffers
NBLK4		16		# number of 4 byte stream buffers
STRLOFRAC	80		# fraction of buffers for low priority messages
STRMEDFRAC	90		# fraction of buffers for medium priority msgs

%CONFIG					# code added to conf.c

		/* N_MSG_BLKS macro - Number of message blocks */
#define	N_MSG_BLKS (NBLK4096+NBLK2048+NBLK1024+ \
			    NBLK512+NBLK256+NBLK128+NBLK64+NBLK16+NBLK4)
#ifndef NEL
#define NEL(x)	(sizeof(x) / sizeof(*x))
#endif

queue_t queue[NQUEUE];			/* table of queues */
struct stdata streams[NSTREAM];		/* table of streams */
mblk_t mblock[(N_MSG_BLKS * 5) / 4];	/* table of message block descriptors */
					/* (125% of N_MSG_BLKS) 	      */

dblk_t dblock[N_MSG_BLKS];	 	/* table of data blk desc */

int	strbase[NBLK4096*1024 + NBLK2048*512 + NBLK1024*256 + NBLK512*128
		+ NBLK256*64 + NBLK128*32 + NBLK64*16 + NBLK16*4 + NBLK4];

struct linkblk linkblk[NMUXLINK];	/* multiplexor link table */
struct strevent strevent[NSTREVENT];	/* table of stream event cells */

int	nmuxlink	= NEL(linkblk);	/* number of multiplexor links */
int	nstrpush  	= NSTRPUSH;	/* maxmimum number of pushes allowed */
int	nstrevent	= NEL(strevent);/* # of stream events */
int	maxsepgcnt  	= MAXSEPGCNT;	/* page limit for event cell alloc */
int	strmsgsz  	= STRMSGSZ;	/* maximum stream message size */
int	strctlsz  	= STRCTLSZ;	/* max size of ctl part of message */
char	strlofrac  	= STRLOFRAC;	/* # of buffers fo low pri. msgs. */
char	strmedfrac  	= STRMEDFRAC;	/* # of buffers fo high pri. msgs. */
int	nmblock		= NEL(mblock);	/* number of msg blk desc */

