ch_ethtool.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*****************************************************************************
  2. * *
  3. * File: ch_ethtool.h *
  4. * $Revision: 1.5 $ *
  5. * $Date: 2005/03/23 07:15:58 $ *
  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 __CHETHTOOL_LINUX_H__
  39. #define __CHETHTOOL_LINUX_H__
  40. /* TCB size in 32-bit words */
  41. #define TCB_WORDS (TCB_SIZE / 4)
  42. enum {
  43. ETHTOOL_SETREG,
  44. ETHTOOL_GETREG,
  45. ETHTOOL_SETTPI,
  46. ETHTOOL_GETTPI,
  47. ETHTOOL_DEVUP,
  48. ETHTOOL_GETMTUTAB,
  49. ETHTOOL_SETMTUTAB,
  50. ETHTOOL_GETMTU,
  51. ETHTOOL_SET_PM,
  52. ETHTOOL_GET_PM,
  53. ETHTOOL_GET_TCAM,
  54. ETHTOOL_SET_TCAM,
  55. ETHTOOL_GET_TCB,
  56. ETHTOOL_READ_TCAM_WORD,
  57. };
  58. struct ethtool_reg {
  59. uint32_t cmd;
  60. uint32_t addr;
  61. uint32_t val;
  62. };
  63. struct ethtool_mtus {
  64. uint32_t cmd;
  65. uint16_t mtus[NMTUS];
  66. };
  67. struct ethtool_pm {
  68. uint32_t cmd;
  69. uint32_t tx_pg_sz;
  70. uint32_t tx_num_pg;
  71. uint32_t rx_pg_sz;
  72. uint32_t rx_num_pg;
  73. uint32_t pm_total;
  74. };
  75. struct ethtool_tcam {
  76. uint32_t cmd;
  77. uint32_t tcam_size;
  78. uint32_t nservers;
  79. uint32_t nroutes;
  80. };
  81. struct ethtool_tcb {
  82. uint32_t cmd;
  83. uint32_t tcb_index;
  84. uint32_t tcb_data[TCB_WORDS];
  85. };
  86. struct ethtool_tcam_word {
  87. uint32_t cmd;
  88. uint32_t addr;
  89. uint32_t buf[3];
  90. };
  91. #define SIOCCHETHTOOL SIOCDEVPRIVATE
  92. #endif