0001
0002
0003 #ifndef CHELSIO_TP_H
0004 #define CHELSIO_TP_H
0005
0006 #include "common.h"
0007
0008 #define TP_MAX_RX_COALESCING_SIZE 16224U
0009
0010 struct tp_mib_statistics {
0011
0012
0013 u32 ipInReceive_hi;
0014 u32 ipInReceive_lo;
0015 u32 ipInHdrErrors_hi;
0016 u32 ipInHdrErrors_lo;
0017 u32 ipInAddrErrors_hi;
0018 u32 ipInAddrErrors_lo;
0019 u32 ipInUnknownProtos_hi;
0020 u32 ipInUnknownProtos_lo;
0021 u32 ipInDiscards_hi;
0022 u32 ipInDiscards_lo;
0023 u32 ipInDelivers_hi;
0024 u32 ipInDelivers_lo;
0025 u32 ipOutRequests_hi;
0026 u32 ipOutRequests_lo;
0027 u32 ipOutDiscards_hi;
0028 u32 ipOutDiscards_lo;
0029 u32 ipOutNoRoutes_hi;
0030 u32 ipOutNoRoutes_lo;
0031 u32 ipReasmTimeout;
0032 u32 ipReasmReqds;
0033 u32 ipReasmOKs;
0034 u32 ipReasmFails;
0035
0036 u32 reserved[8];
0037
0038
0039 u32 tcpActiveOpens;
0040 u32 tcpPassiveOpens;
0041 u32 tcpAttemptFails;
0042 u32 tcpEstabResets;
0043 u32 tcpOutRsts;
0044 u32 tcpCurrEstab;
0045 u32 tcpInSegs_hi;
0046 u32 tcpInSegs_lo;
0047 u32 tcpOutSegs_hi;
0048 u32 tcpOutSegs_lo;
0049 u32 tcpRetransSeg_hi;
0050 u32 tcpRetransSeg_lo;
0051 u32 tcpInErrs_hi;
0052 u32 tcpInErrs_lo;
0053 u32 tcpRtoMin;
0054 u32 tcpRtoMax;
0055 };
0056
0057 struct petp;
0058 struct tp_params;
0059
0060 struct petp *t1_tp_create(adapter_t *adapter, struct tp_params *p);
0061 void t1_tp_destroy(struct petp *tp);
0062
0063 void t1_tp_intr_disable(struct petp *tp);
0064 void t1_tp_intr_enable(struct petp *tp);
0065 void t1_tp_intr_clear(struct petp *tp);
0066 int t1_tp_intr_handler(struct petp *tp);
0067
0068 void t1_tp_get_mib_statistics(adapter_t *adap, struct tp_mib_statistics *tps);
0069 void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable);
0070 void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable);
0071 int t1_tp_set_coalescing_size(struct petp *tp, unsigned int size);
0072 int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk);
0073 #endif