bfa_defs_ethport.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 <protocol/types.h>
  21. #include <cna/pstats/phyport_defs.h>
  22. #include <cna/pstats/ethport_defs.h>
  23. struct bna_tx_info_s {
  24. u32 miniport_state;
  25. u32 adapter_state;
  26. u64 tx_count;
  27. u64 tx_wi;
  28. u64 tx_sg;
  29. u64 tx_tcp_chksum;
  30. u64 tx_udp_chksum;
  31. u64 tx_ip_chksum;
  32. u64 tx_lsov1;
  33. u64 tx_lsov2;
  34. u64 tx_max_sg_len ;
  35. };
  36. struct bna_rx_queue_info_s {
  37. u16 q_id ;
  38. u16 buf_size ;
  39. u16 buf_count ;
  40. u16 rsvd ;
  41. u64 rx_count ;
  42. u64 rx_dropped ;
  43. u64 rx_unsupported ;
  44. u64 rx_internal_err ;
  45. u64 rss_count ;
  46. u64 vlan_count ;
  47. u64 rx_tcp_chksum ;
  48. u64 rx_udp_chksum ;
  49. u64 rx_ip_chksum ;
  50. u64 rx_hds ;
  51. };
  52. struct bna_rx_q_set_s {
  53. u16 q_set_type;
  54. u32 miniport_state;
  55. u32 adapter_state;
  56. struct bna_rx_queue_info_s rx_queue[2];
  57. };
  58. struct bna_port_stats_s {
  59. struct bna_tx_info_s tx_stats;
  60. u16 qset_count ;
  61. struct bna_rx_q_set_s rx_qset[8];
  62. };
  63. struct bfa_ethport_stats_s {
  64. struct bna_stats_txf txf_stats[1];
  65. struct bna_stats_rxf rxf_stats[1];
  66. struct bnad_drv_stats drv_stats;
  67. };
  68. /**
  69. * Ethernet port events
  70. * Arguments below are in BFAL context from Mgmt
  71. * BFA_PORT_AEN_ETH_LINKUP: [in]: mac [out]: mac
  72. * BFA_PORT_AEN_ETH_LINKDOWN: [in]: mac [out]: mac
  73. * BFA_PORT_AEN_ETH_ENABLE: [in]: mac [out]: mac
  74. * BFA_PORT_AEN_ETH_DISABLE: [in]: mac [out]: mac
  75. *
  76. */
  77. enum bfa_ethport_aen_event {
  78. BFA_ETHPORT_AEN_LINKUP = 1, /* Base Port Ethernet link up event */
  79. BFA_ETHPORT_AEN_LINKDOWN = 2, /* Base Port Ethernet link down event */
  80. BFA_ETHPORT_AEN_ENABLE = 3, /* Base Port Ethernet link enable event */
  81. BFA_ETHPORT_AEN_DISABLE = 4, /* Base Port Ethernet link disable
  82. * event */
  83. };
  84. struct bfa_ethport_aen_data_s {
  85. mac_t mac; /* MAC address of the physical port */
  86. };
  87. #endif /* __BFA_DEFS_ETHPORT_H__ */