1 /* $Date: 2005/03/07 23:59:05 $ $RCSfile: tp.h,v $ $Revision: 1.20 $ */
2 #ifndef CHELSIO_TP_H
3 #define CHELSIO_TP_H
4 
5 #include "common.h"
6 
7 #define TP_MAX_RX_COALESCING_SIZE 16224U
8 
9 struct tp_mib_statistics {
10 
11 	/* IP */
12 	u32 ipInReceive_hi;
13 	u32 ipInReceive_lo;
14 	u32 ipInHdrErrors_hi;
15 	u32 ipInHdrErrors_lo;
16 	u32 ipInAddrErrors_hi;
17 	u32 ipInAddrErrors_lo;
18 	u32 ipInUnknownProtos_hi;
19 	u32 ipInUnknownProtos_lo;
20 	u32 ipInDiscards_hi;
21 	u32 ipInDiscards_lo;
22 	u32 ipInDelivers_hi;
23 	u32 ipInDelivers_lo;
24 	u32 ipOutRequests_hi;
25 	u32 ipOutRequests_lo;
26 	u32 ipOutDiscards_hi;
27 	u32 ipOutDiscards_lo;
28 	u32 ipOutNoRoutes_hi;
29 	u32 ipOutNoRoutes_lo;
30 	u32 ipReasmTimeout;
31 	u32 ipReasmReqds;
32 	u32 ipReasmOKs;
33 	u32 ipReasmFails;
34 
35 	u32 reserved[8];
36 
37 	/* TCP */
38 	u32 tcpActiveOpens;
39 	u32 tcpPassiveOpens;
40 	u32 tcpAttemptFails;
41 	u32 tcpEstabResets;
42 	u32 tcpOutRsts;
43 	u32 tcpCurrEstab;
44 	u32 tcpInSegs_hi;
45 	u32 tcpInSegs_lo;
46 	u32 tcpOutSegs_hi;
47 	u32 tcpOutSegs_lo;
48 	u32 tcpRetransSeg_hi;
49 	u32 tcpRetransSeg_lo;
50 	u32 tcpInErrs_hi;
51 	u32 tcpInErrs_lo;
52 	u32 tcpRtoMin;
53 	u32 tcpRtoMax;
54 };
55 
56 struct petp;
57 struct tp_params;
58 
59 struct petp *t1_tp_create(adapter_t *adapter, struct tp_params *p);
60 void t1_tp_destroy(struct petp *tp);
61 
62 void t1_tp_intr_disable(struct petp *tp);
63 void t1_tp_intr_enable(struct petp *tp);
64 void t1_tp_intr_clear(struct petp *tp);
65 int t1_tp_intr_handler(struct petp *tp);
66 
67 void t1_tp_get_mib_statistics(adapter_t *adap, struct tp_mib_statistics *tps);
68 void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable);
69 void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable);
70 int t1_tp_set_coalescing_size(struct petp *tp, unsigned int size);
71 int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk);
72 #endif
73