tp.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*****************************************************************************
  2. * *
  3. * File: tp.h *
  4. * $Revision: 1.3 $ *
  5. * $Date: 2005/03/23 07:15:59 $ *
  6. * Description: *
  7. * part of the Chelsio 10Gb Ethernet Driver. *
  8. * *
  9. * This program is free software; you can redistribute it and/or modify *
  10. * it under the terms of the GNU General Public License, version 2, as *
  11. * published by the Free Software Foundation. *
  12. * *
  13. * You should have received a copy of the GNU General Public License along *
  14. * with this program; if not, write to the Free Software Foundation, Inc., *
  15. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  16. * *
  17. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
  18. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
  19. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
  20. * *
  21. * http://www.chelsio.com *
  22. * *
  23. * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
  24. * All rights reserved. *
  25. * *
  26. * Maintainers: maintainers@chelsio.com *
  27. * *
  28. * Authors: Dimitrios Michailidis <dm@chelsio.com> *
  29. * Tina Yang <tainay@chelsio.com> *
  30. * Felix Marti <felix@chelsio.com> *
  31. * Scott Bardone <sbardone@chelsio.com> *
  32. * Kurt Ottaway <kottaway@chelsio.com> *
  33. * Frank DiMambro <frank@chelsio.com> *
  34. * *
  35. * History: *
  36. * *
  37. ****************************************************************************/
  38. #ifndef CHELSIO_TP_H
  39. #define CHELSIO_TP_H
  40. #include "common.h"
  41. #define TP_MAX_RX_COALESCING_SIZE 16224U
  42. struct tp_mib_statistics {
  43. /* IP */
  44. u32 ipInReceive_hi;
  45. u32 ipInReceive_lo;
  46. u32 ipInHdrErrors_hi;
  47. u32 ipInHdrErrors_lo;
  48. u32 ipInAddrErrors_hi;
  49. u32 ipInAddrErrors_lo;
  50. u32 ipInUnknownProtos_hi;
  51. u32 ipInUnknownProtos_lo;
  52. u32 ipInDiscards_hi;
  53. u32 ipInDiscards_lo;
  54. u32 ipInDelivers_hi;
  55. u32 ipInDelivers_lo;
  56. u32 ipOutRequests_hi;
  57. u32 ipOutRequests_lo;
  58. u32 ipOutDiscards_hi;
  59. u32 ipOutDiscards_lo;
  60. u32 ipOutNoRoutes_hi;
  61. u32 ipOutNoRoutes_lo;
  62. u32 ipReasmTimeout;
  63. u32 ipReasmReqds;
  64. u32 ipReasmOKs;
  65. u32 ipReasmFails;
  66. u32 reserved[8];
  67. /* TCP */
  68. u32 tcpActiveOpens;
  69. u32 tcpPassiveOpens;
  70. u32 tcpAttemptFails;
  71. u32 tcpEstabResets;
  72. u32 tcpOutRsts;
  73. u32 tcpCurrEstab;
  74. u32 tcpInSegs_hi;
  75. u32 tcpInSegs_lo;
  76. u32 tcpOutSegs_hi;
  77. u32 tcpOutSegs_lo;
  78. u32 tcpRetransSeg_hi;
  79. u32 tcpRetransSeg_lo;
  80. u32 tcpInErrs_hi;
  81. u32 tcpInErrs_lo;
  82. u32 tcpRtoMin;
  83. u32 tcpRtoMax;
  84. };
  85. struct petp;
  86. struct tp_params;
  87. struct petp *t1_tp_create(adapter_t *adapter, struct tp_params *p);
  88. void t1_tp_destroy(struct petp *tp);
  89. void t1_tp_intr_disable(struct petp *tp);
  90. void t1_tp_intr_enable(struct petp *tp);
  91. void t1_tp_intr_clear(struct petp *tp);
  92. int t1_tp_intr_handler(struct petp *tp);
  93. void t1_tp_get_mib_statistics(adapter_t *adap, struct tp_mib_statistics *tps);
  94. void t1_tp_set_udp_checksum_offload(struct petp *tp, int enable);
  95. void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable);
  96. void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable);
  97. int t1_tp_set_coalescing_size(struct petp *tp, unsigned int size);
  98. int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk);
  99. #endif