gen_stats.h 923 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef __LINUX_GEN_STATS_H
  2. #define __LINUX_GEN_STATS_H
  3. enum {
  4. TCA_STATS_UNSPEC,
  5. TCA_STATS_BASIC,
  6. TCA_STATS_RATE_EST,
  7. TCA_STATS_QUEUE,
  8. TCA_STATS_APP,
  9. __TCA_STATS_MAX,
  10. };
  11. #define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
  12. /**
  13. * @bytes: number of seen bytes
  14. * @packets: number of seen packets
  15. */
  16. struct gnet_stats_basic
  17. {
  18. __u64 bytes;
  19. __u32 packets;
  20. };
  21. /**
  22. * @bps: current byte rate
  23. * @pps: current packet rate
  24. */
  25. struct gnet_stats_rate_est
  26. {
  27. __u32 bps;
  28. __u32 pps;
  29. };
  30. /**
  31. * @qlen: queue length
  32. * @backlog: backlog size of queue
  33. * @drops: number of dropped packets
  34. * @requeues: number of requeues
  35. */
  36. struct gnet_stats_queue
  37. {
  38. __u32 qlen;
  39. __u32 backlog;
  40. __u32 drops;
  41. __u32 requeues;
  42. __u32 overlimits;
  43. };
  44. /**
  45. * @interval: sampling period
  46. * @ewma_log: the log of measurement window weight
  47. */
  48. struct gnet_estimator
  49. {
  50. signed char interval;
  51. unsigned char ewma_log;
  52. };
  53. #endif /* __LINUX_GEN_STATS_H */