vnic_stats.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2014 Cisco Systems, Inc. All rights reserved.
  3. *
  4. * This program is free software; you may redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; version 2 of the License.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  9. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  11. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  12. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  13. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  14. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  15. * SOFTWARE.
  16. */
  17. #ifndef _VNIC_STATS_H_
  18. #define _VNIC_STATS_H_
  19. /* Tx statistics */
  20. struct vnic_tx_stats {
  21. u64 tx_frames_ok;
  22. u64 tx_unicast_frames_ok;
  23. u64 tx_multicast_frames_ok;
  24. u64 tx_broadcast_frames_ok;
  25. u64 tx_bytes_ok;
  26. u64 tx_unicast_bytes_ok;
  27. u64 tx_multicast_bytes_ok;
  28. u64 tx_broadcast_bytes_ok;
  29. u64 tx_drops;
  30. u64 tx_errors;
  31. u64 tx_tso;
  32. u64 rsvd[16];
  33. };
  34. /* Rx statistics */
  35. struct vnic_rx_stats {
  36. u64 rx_frames_ok;
  37. u64 rx_frames_total;
  38. u64 rx_unicast_frames_ok;
  39. u64 rx_multicast_frames_ok;
  40. u64 rx_broadcast_frames_ok;
  41. u64 rx_bytes_ok;
  42. u64 rx_unicast_bytes_ok;
  43. u64 rx_multicast_bytes_ok;
  44. u64 rx_broadcast_bytes_ok;
  45. u64 rx_drop;
  46. u64 rx_no_bufs;
  47. u64 rx_errors;
  48. u64 rx_rss;
  49. u64 rx_crc_errors;
  50. u64 rx_frames_64;
  51. u64 rx_frames_127;
  52. u64 rx_frames_255;
  53. u64 rx_frames_511;
  54. u64 rx_frames_1023;
  55. u64 rx_frames_1518;
  56. u64 rx_frames_to_max;
  57. u64 rsvd[16];
  58. };
  59. struct vnic_stats {
  60. struct vnic_tx_stats tx;
  61. struct vnic_rx_stats rx;
  62. };
  63. #endif /* _VNIC_STATS_H_ */