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