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