1*3833Sxw161283 /* 2*3833Sxw161283 * CDDL HEADER START 3*3833Sxw161283 * 4*3833Sxw161283 * The contents of this file are subject to the terms of the 5*3833Sxw161283 * Common Development and Distribution License (the "License"). 6*3833Sxw161283 * You may not use this file except in compliance with the License. 7*3833Sxw161283 * 8*3833Sxw161283 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3833Sxw161283 * or http://www.opensolaris.org/os/licensing. 10*3833Sxw161283 * See the License for the specific language governing permissions 11*3833Sxw161283 * and limitations under the License. 12*3833Sxw161283 * 13*3833Sxw161283 * When distributing Covered Code, include this CDDL HEADER in each 14*3833Sxw161283 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3833Sxw161283 * If applicable, add the following below this CDDL HEADER, with the 16*3833Sxw161283 * fields enclosed by brackets "[]" replaced with your own identifying 17*3833Sxw161283 * information: Portions Copyright [yyyy] [name of copyright owner] 18*3833Sxw161283 * 19*3833Sxw161283 * CDDL HEADER END 20*3833Sxw161283 */ 21*3833Sxw161283 22*3833Sxw161283 /* 23*3833Sxw161283 * Copyright (C) 2003-2005 Chelsio Communications. All rights reserved. 24*3833Sxw161283 */ 25*3833Sxw161283 26*3833Sxw161283 #pragma ident "%Z%%M% %I% %E% SMI" /* tp.h */ 27*3833Sxw161283 28*3833Sxw161283 #ifndef CHELSIO_TP_H 29*3833Sxw161283 #define CHELSIO_TP_H 30*3833Sxw161283 31*3833Sxw161283 #include "common.h" 32*3833Sxw161283 33*3833Sxw161283 #define TP_MAX_RX_COALESCING_SIZE 16224U 34*3833Sxw161283 35*3833Sxw161283 struct tp_mib_statistics { 36*3833Sxw161283 37*3833Sxw161283 /* IP */ 38*3833Sxw161283 u32 ipInReceive_hi; 39*3833Sxw161283 u32 ipInReceive_lo; 40*3833Sxw161283 u32 ipInHdrErrors_hi; 41*3833Sxw161283 u32 ipInHdrErrors_lo; 42*3833Sxw161283 u32 ipInAddrErrors_hi; 43*3833Sxw161283 u32 ipInAddrErrors_lo; 44*3833Sxw161283 u32 ipInUnknownProtos_hi; 45*3833Sxw161283 u32 ipInUnknownProtos_lo; 46*3833Sxw161283 u32 ipInDiscards_hi; 47*3833Sxw161283 u32 ipInDiscards_lo; 48*3833Sxw161283 u32 ipInDelivers_hi; 49*3833Sxw161283 u32 ipInDelivers_lo; 50*3833Sxw161283 u32 ipOutRequests_hi; 51*3833Sxw161283 u32 ipOutRequests_lo; 52*3833Sxw161283 u32 ipOutDiscards_hi; 53*3833Sxw161283 u32 ipOutDiscards_lo; 54*3833Sxw161283 u32 ipOutNoRoutes_hi; 55*3833Sxw161283 u32 ipOutNoRoutes_lo; 56*3833Sxw161283 u32 ipReasmTimeout; 57*3833Sxw161283 u32 ipReasmReqds; 58*3833Sxw161283 u32 ipReasmOKs; 59*3833Sxw161283 u32 ipReasmFails; 60*3833Sxw161283 61*3833Sxw161283 /* reserved */ 62*3833Sxw161283 u32 reserved[8]; 63*3833Sxw161283 64*3833Sxw161283 /* TCP */ 65*3833Sxw161283 u32 tcpActiveOpens; 66*3833Sxw161283 u32 tcpPassiveOpens; 67*3833Sxw161283 u32 tcpAttemptFails; 68*3833Sxw161283 u32 tcpEstabResets; 69*3833Sxw161283 u32 tcpOutRsts; 70*3833Sxw161283 u32 tcpCurrEstab; 71*3833Sxw161283 u32 tcpInSegs_hi; 72*3833Sxw161283 u32 tcpInSegs_lo; 73*3833Sxw161283 u32 tcpOutSegs_hi; 74*3833Sxw161283 u32 tcpOutSegs_lo; 75*3833Sxw161283 u32 tcpRetransSeg_hi; 76*3833Sxw161283 u32 tcpRetransSeg_lo; 77*3833Sxw161283 u32 tcpInErrs_hi; 78*3833Sxw161283 u32 tcpInErrs_lo; 79*3833Sxw161283 u32 tcpRtoMin; 80*3833Sxw161283 u32 tcpRtoMax; 81*3833Sxw161283 }; 82*3833Sxw161283 83*3833Sxw161283 struct petp; 84*3833Sxw161283 struct tp_params; 85*3833Sxw161283 86*3833Sxw161283 struct petp *t1_tp_create(adapter_t *adapter, struct tp_params *p); 87*3833Sxw161283 void t1_tp_destroy(struct petp *tp); 88*3833Sxw161283 89*3833Sxw161283 void t1_tp_intr_disable(struct petp *tp); 90*3833Sxw161283 void t1_tp_intr_enable(struct petp *tp); 91*3833Sxw161283 void t1_tp_intr_clear(struct petp *tp); 92*3833Sxw161283 int t1_tp_intr_handler(struct petp *tp); 93*3833Sxw161283 94*3833Sxw161283 void t1_tp_get_mib_statistics(adapter_t *adap, struct tp_mib_statistics *tps); 95*3833Sxw161283 void t1_tp_set_udp_checksum_offload(struct petp *tp, int enable); 96*3833Sxw161283 void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable); 97*3833Sxw161283 void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable); 98*3833Sxw161283 int t1_tp_set_coalescing_size(struct petp *tp, unsigned int size); 99*3833Sxw161283 int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk); 100*3833Sxw161283 #endif 101