1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _LINUX_XDP_DIAG_H 8 #define _LINUX_XDP_DIAG_H 9 #include <linux/types.h> 10 struct xdp_diag_req { 11 __u8 sdiag_family; 12 __u8 sdiag_protocol; 13 __u16 pad; 14 __u32 xdiag_ino; 15 __u32 xdiag_show; 16 __u32 xdiag_cookie[2]; 17 }; 18 struct xdp_diag_msg { 19 __u8 xdiag_family; 20 __u8 xdiag_type; 21 __u16 pad; 22 __u32 xdiag_ino; 23 __u32 xdiag_cookie[2]; 24 }; 25 #define XDP_SHOW_INFO (1 << 0) 26 #define XDP_SHOW_RING_CFG (1 << 1) 27 #define XDP_SHOW_UMEM (1 << 2) 28 #define XDP_SHOW_MEMINFO (1 << 3) 29 #define XDP_SHOW_STATS (1 << 4) 30 enum { 31 XDP_DIAG_NONE, 32 XDP_DIAG_INFO, 33 XDP_DIAG_UID, 34 XDP_DIAG_RX_RING, 35 XDP_DIAG_TX_RING, 36 XDP_DIAG_UMEM, 37 XDP_DIAG_UMEM_FILL_RING, 38 XDP_DIAG_UMEM_COMPLETION_RING, 39 XDP_DIAG_MEMINFO, 40 XDP_DIAG_STATS, 41 __XDP_DIAG_MAX, 42 }; 43 #define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1) 44 struct xdp_diag_info { 45 __u32 ifindex; 46 __u32 queue_id; 47 }; 48 struct xdp_diag_ring { 49 __u32 entries; 50 }; 51 #define XDP_DU_F_ZEROCOPY (1 << 0) 52 struct xdp_diag_umem { 53 __u64 size; 54 __u32 id; 55 __u32 num_pages; 56 __u32 chunk_size; 57 __u32 headroom; 58 __u32 ifindex; 59 __u32 queue_id; 60 __u32 flags; 61 __u32 refs; 62 }; 63 struct xdp_diag_stats { 64 __u64 n_rx_dropped; 65 __u64 n_rx_invalid; 66 __u64 n_rx_full; 67 __u64 n_fill_ring_empty; 68 __u64 n_tx_invalid; 69 __u64 n_tx_ring_empty; 70 }; 71 #endif 72