2 * A filtering function. There are two filters/port. Filter "0"
3 * is the input filter, and filter "1" is the output filter.
5 typedef int (FILTER_FUNC
)(uchar
*pktp
, int pktlen
, ulong
*scratch
, int port
);
9 * The per port structure
13 int chan
; /* Channel number (0-3) */
14 ulong portaddr
; /* address of 596 port register */
15 volatile ulong
*ca
; /* address of 596 chan attention */
16 ulong intmask
; /* Interrupt mask for this port */
17 ulong intack
; /* Ack bit for this port */
19 uchar ethaddr
[6]; /* Ethernet address of this port */
20 int is_promisc
; /* Port is promiscuous */
22 int debug
; /* Debugging turned on */
24 I596_ISCP
*iscpp
; /* Uncached ISCP pointer */
25 I596_SCP
*scpp
; /* Uncached SCP pointer */
26 I596_SCB
*scbp
; /* Uncached SCB pointer */
48 int buf_size
; /* Size of an RBD buffer */
49 int buf_cnt
; /* Total RBD's allocated */
52 ulong cnt_rx_cnt
; /* Total packets rcvd, good and bad */
53 ulong cnt_rx_good
; /* Total good packets rcvd */
54 ulong cnt_rx_bad
; /* Total of all bad packets rcvd */
55 /* Subtotals can be gotten from SCB */
56 ulong cnt_rx_nores
; /* No resources */
57 ulong cnt_rx_bytes
; /* Total bytes rcvd */
63 ulong cnt_tx_nores
; /* No resources */
66 ulong cnt_tx_err_late
;
67 ulong cnt_tx_err_nocrs
;
68 ulong cnt_tx_err_nocts
;
69 ulong cnt_tx_err_under
;
70 ulong cnt_tx_err_maxcol
;
71 ulong cnt_tx_collisions
;
73 /* Special stuff for host */
74 # define rfd_freed cnt_rx_cnt
78 /* Added after first beta */
79 ulong cnt_tx_races
; /* Counts race conditions */
81 ulong cnt_st_tx
; /* send span tree pkts */
82 ulong cnt_st_fail_tx
; /* Failures to send span tree pkts */
83 ulong cnt_st_fail_rbd
;/* Failures to send span tree pkts */
84 ulong cnt_st_rx
; /* rcv span tree pkts */
85 ulong cnt_st_rx_bad
; /* bogus st packets rcvd */
86 ulong cnt_rx_fwd
; /* Rcvd packets that were forwarded */
88 ulong cnt_rx_mcast
; /* Multicast pkts received */
89 ulong cnt_tx_mcast
; /* Multicast pkts transmitted */
90 ulong cnt_tx_bytes
; /* Bytes transmitted */
94 * Filter 0: input filter
95 * Filter 1: output filter
98 ulong
*filter_space
[NFILTERS
];
99 FILTER_FUNC
*filter_func
[NFILTERS
];
100 ulong filter_cnt
[NFILTERS
];
101 ulong filter_len
[NFILTERS
];
103 ulong pad
[ (512-300) / 4];
107 * Port[0] is host interface
108 * Port[1..SE_NPORTS] are external 10 Base T ports. Fewer may be in
109 * use, depending on whether this is an SE-4 or
111 * Port[SE_NPORTS] Pseudo-port for Spanning tree and SNMP
113 extern PORT Port
[1+SE_NPORTS
+1];
115 extern int Nports
; /* Number of genuine ethernet controllers */
116 extern int Nchan
; /* ... plus one for host interface */
118 extern int FirstChan
; /* 0 or 1, depedning on whether host is used */
119 extern int NumChan
; /* 4 or 5 */
124 extern int IsPromisc
;
125 extern int MultiNicMode
;
130 extern void eth_xmit_spew_on(PORT
*p
, int cnt
);
131 extern void eth_xmit_spew_off(PORT
*p
);
133 extern I596_RBD
*alloc_rbds(PORT
*p
, int num
);
135 extern I596_CB
* eth_cb_alloc(PORT
*p
);