1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _LINUX_XDP_DIAG_H 20 #define _LINUX_XDP_DIAG_H 21 #include <linux/types.h> 22 struct xdp_diag_req { 23 __u8 sdiag_family; 24 __u8 sdiag_protocol; 25 __u16 pad; 26 __u32 xdiag_ino; 27 __u32 xdiag_show; 28 __u32 xdiag_cookie[2]; 29 }; 30 struct xdp_diag_msg { 31 __u8 xdiag_family; 32 __u8 xdiag_type; 33 __u16 pad; 34 __u32 xdiag_ino; 35 __u32 xdiag_cookie[2]; 36 }; 37 #define XDP_SHOW_INFO (1 << 0) 38 #define XDP_SHOW_RING_CFG (1 << 1) 39 #define XDP_SHOW_UMEM (1 << 2) 40 #define XDP_SHOW_MEMINFO (1 << 3) 41 #define XDP_SHOW_STATS (1 << 4) 42 enum { 43 XDP_DIAG_NONE, 44 XDP_DIAG_INFO, 45 XDP_DIAG_UID, 46 XDP_DIAG_RX_RING, 47 XDP_DIAG_TX_RING, 48 XDP_DIAG_UMEM, 49 XDP_DIAG_UMEM_FILL_RING, 50 XDP_DIAG_UMEM_COMPLETION_RING, 51 XDP_DIAG_MEMINFO, 52 XDP_DIAG_STATS, 53 __XDP_DIAG_MAX, 54 }; 55 #define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1) 56 struct xdp_diag_info { 57 __u32 ifindex; 58 __u32 queue_id; 59 }; 60 struct xdp_diag_ring { 61 __u32 entries; 62 }; 63 #define XDP_DU_F_ZEROCOPY (1 << 0) 64 struct xdp_diag_umem { 65 __u64 size; 66 __u32 id; 67 __u32 num_pages; 68 __u32 chunk_size; 69 __u32 headroom; 70 __u32 ifindex; 71 __u32 queue_id; 72 __u32 flags; 73 __u32 refs; 74 }; 75 struct xdp_diag_stats { 76 __u64 n_rx_dropped; 77 __u64 n_rx_invalid; 78 __u64 n_rx_full; 79 __u64 n_fill_ring_empty; 80 __u64 n_tx_invalid; 81 __u64 n_tx_ring_empty; 82 }; 83 #endif 84