struct qinit *q_qinfo; /* procs and limits for queue [I]*/
struct msgb *q_first; /* first data block [Z]*/
struct msgb *q_last; /* last data block [Z]*/
struct queue *q_next; /* next Q of stream [Z]*/
struct queue *q_link; /* to next Q for the scan list [Z]*/
void *q_ptr; /* module private data for free */
ulong q_count; /* number of bytes on Q [Z]*/
volatile ulong q_flag; /* queue state [Z]*/
long q_minpsz; /* min packet size accepted [I]*/
long q_maxpsz; /* max packet size accepted [I]*/
ulong q_hiwat; /* queue high water mark [I]*/
ulong q_lowat;
If you use the routines putnext(), canputnext(), putq(), putbq(), getq(), WR(), RD(), OTHER() and so forth your driver is NOT dependent on the size of the structure. Some STREAMS implementations use array indexing (q[1], q[-1]) to implement RD() and WR(). LiS has a pointer in each queue structure 'q_other' that points to the other queue of the pair so it does not have to use indexing for these.
You would just about have to declare a queue structure (not a pointer to a queue) in a structure of your own in order to have a size dependency.
I want to work on an optimization that will involve changing the size of the queue structure. If your drivers don't depend on the size then you will be able to use the new code with no recompilation of your drivers.
Thanks,
Dave
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 4/8/2004
