logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

xdp_diag.h (1468B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * xdp_diag: interface for query/monitor XDP sockets
  4. * Copyright(c) 2019 Intel Corporation.
  5. */
  6. #ifndef _LINUX_XDP_DIAG_H
  7. #define _LINUX_XDP_DIAG_H
  8. #include <linux/types.h>
  9. struct xdp_diag_req {
  10. __u8 sdiag_family;
  11. __u8 sdiag_protocol;
  12. __u16 pad;
  13. __u32 xdiag_ino;
  14. __u32 xdiag_show;
  15. __u32 xdiag_cookie[2];
  16. };
  17. struct xdp_diag_msg {
  18. __u8 xdiag_family;
  19. __u8 xdiag_type;
  20. __u16 pad;
  21. __u32 xdiag_ino;
  22. __u32 xdiag_cookie[2];
  23. };
  24. #define XDP_SHOW_INFO (1 << 0) /* Basic information */
  25. #define XDP_SHOW_RING_CFG (1 << 1)
  26. #define XDP_SHOW_UMEM (1 << 2)
  27. #define XDP_SHOW_MEMINFO (1 << 3)
  28. #define XDP_SHOW_STATS (1 << 4)
  29. enum {
  30. XDP_DIAG_NONE,
  31. XDP_DIAG_INFO,
  32. XDP_DIAG_UID,
  33. XDP_DIAG_RX_RING,
  34. XDP_DIAG_TX_RING,
  35. XDP_DIAG_UMEM,
  36. XDP_DIAG_UMEM_FILL_RING,
  37. XDP_DIAG_UMEM_COMPLETION_RING,
  38. XDP_DIAG_MEMINFO,
  39. XDP_DIAG_STATS,
  40. __XDP_DIAG_MAX,
  41. };
  42. #define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1)
  43. struct xdp_diag_info {
  44. __u32 ifindex;
  45. __u32 queue_id;
  46. };
  47. struct xdp_diag_ring {
  48. __u32 entries; /*num descs */
  49. };
  50. #define XDP_DU_F_ZEROCOPY (1 << 0)
  51. struct xdp_diag_umem {
  52. __u64 size;
  53. __u32 id;
  54. __u32 num_pages;
  55. __u32 chunk_size;
  56. __u32 headroom;
  57. __u32 ifindex;
  58. __u32 queue_id;
  59. __u32 flags;
  60. __u32 refs;
  61. };
  62. struct xdp_diag_stats {
  63. __u64 n_rx_dropped;
  64. __u64 n_rx_invalid;
  65. __u64 n_rx_full;
  66. __u64 n_fill_ring_empty;
  67. __u64 n_tx_invalid;
  68. __u64 n_tx_ring_empty;
  69. };
  70. #endif /* _LINUX_XDP_DIAG_H */