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