|
|
1.1 root 1: /*
2: * definitions for the DEBNA driver
3: *
4: * each hardware device has eight channels;
5: * each channel dedicated to a particular Ethernet protocol
6: * one bnachan per channel
7: */
8: #define BNACHAN 8
9:
10: struct bnachan {
11: short proto; /* our protocol */
12: char needst; /* channel needs stptdb */
13: unsigned char dcnt; /* number of queued packets */
14: char unit; /* which controller is ours */
15: struct queue *rq;
16: };
17:
18: /*
19: * one bnactl per controller
20: */
21: struct bnactl {
22: struct bvp bvp; /* general port stuff */
23: struct dgi *xfree; /* free xmit buffers */
24: char lastx; /* last channel transmitted -- fairness */
25: char needst; /* at least one channel needs STPTDB */
26: char myaddr[6]; /* 6 slightly magic */
27: struct bnachan chan[BNACHAN];
28: };
29:
30: /*
31: * our buffers
32: * BNASLOP is there to allow two kinds of alignment in memory:
33: * 1. interlocked queue instructions require quadword-aligned headers.
34: * 2. a bug in the DEBNA causes it to choke if a BVP message or datagram
35: * header crosses a page boundary; the longest such header is 28 bytes
36: * it is assumed that a header misalignment can happen only once per
37: * set of buffers, because the numbers happen to make it true
38: * it would be easier, but more wasteful of memory, to make BNABSIZE
39: * an even multiple of the page size
40: * we have to allow slop and fix it up at runtime because the
41: * VAX loader guarantees no more than longword alignment
42: */
43: #define BNABSIZE 1600 /* must be multiple of eight -- quad-align */
44: #define BNASLOP (8+28)
45: #define BNAXBUF 8
46: #define BNARBUF 8
47:
48: struct bnabuf {
49: char rbuf[BNARBUF*BNABSIZE + BNASLOP];
50: char xbuf[BNAXBUF*BNABSIZE + BNASLOP];
51: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.