bfa_defs_ethport.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFA_DEFS_ETHPORT_H__
  18. #define __BFA_DEFS_ETHPORT_H__
  19. #include <defs/bfa_defs_status.h>
  20. #include <defs/bfa_defs_port.h>
  21. #include <protocol/types.h>
  22. #include <cna/pstats/phyport_defs.h>
  23. #include <cna/pstats/ethport_defs.h>
  24. struct bna_tx_info_s {
  25. u32 miniport_state;
  26. u32 adapter_state;
  27. u64 tx_count;
  28. u64 tx_wi;
  29. u64 tx_sg;
  30. u64 tx_tcp_chksum;
  31. u64 tx_udp_chksum;
  32. u64 tx_ip_chksum;
  33. u64 tx_lsov1;
  34. u64 tx_lsov2;
  35. u64 tx_max_sg_len ;
  36. };
  37. struct bna_rx_queue_info_s {
  38. u16 q_id ;
  39. u16 buf_size ;
  40. u16 buf_count ;
  41. u16 rsvd ;
  42. u64 rx_count ;
  43. u64 rx_dropped ;
  44. u64 rx_unsupported ;
  45. u64 rx_internal_err ;
  46. u64 rss_count ;
  47. u64 vlan_count ;
  48. u64 rx_tcp_chksum ;
  49. u64 rx_udp_chksum ;
  50. u64 rx_ip_chksum ;
  51. u64 rx_hds ;
  52. };
  53. struct bna_rx_q_set_s {
  54. u16 q_set_type;
  55. u32 miniport_state;
  56. u32 adapter_state;
  57. struct bna_rx_queue_info_s rx_queue[2];
  58. };
  59. struct bna_port_stats_s {
  60. struct bna_tx_info_s tx_stats;
  61. u16 qset_count ;
  62. struct bna_rx_q_set_s rx_qset[8];
  63. };
  64. struct bfa_ethport_stats_s {
  65. struct bna_stats_txf txf_stats[1];
  66. struct bna_stats_rxf rxf_stats[1];
  67. struct bnad_drv_stats drv_stats;
  68. };
  69. /**
  70. * Ethernet port events
  71. * Arguments below are in BFAL context from Mgmt
  72. * BFA_PORT_AEN_ETH_LINKUP: [in]: mac [out]: mac
  73. * BFA_PORT_AEN_ETH_LINKDOWN: [in]: mac [out]: mac
  74. * BFA_PORT_AEN_ETH_ENABLE: [in]: mac [out]: mac
  75. * BFA_PORT_AEN_ETH_DISABLE: [in]: mac [out]: mac
  76. *
  77. */
  78. enum bfa_ethport_aen_event {
  79. BFA_ETHPORT_AEN_LINKUP = 1, /* Base Port Ethernet link up event */
  80. BFA_ETHPORT_AEN_LINKDOWN = 2, /* Base Port Ethernet link down event */
  81. BFA_ETHPORT_AEN_ENABLE = 3, /* Base Port Ethernet link enable event */
  82. BFA_ETHPORT_AEN_DISABLE = 4, /* Base Port Ethernet link disable
  83. * event */
  84. };
  85. struct bfa_ethport_aen_data_s {
  86. mac_t mac; /* MAC address of the physical port */
  87. };
  88. #endif /* __BFA_DEFS_ETHPORT_H__ */