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 enum { 42 XDP_DIAG_NONE, 43 XDP_DIAG_INFO, 44 XDP_DIAG_UID, 45 XDP_DIAG_RX_RING, 46 XDP_DIAG_TX_RING, 47 XDP_DIAG_UMEM, 48 XDP_DIAG_UMEM_FILL_RING, 49 XDP_DIAG_UMEM_COMPLETION_RING, 50 XDP_DIAG_MEMINFO, 51 __XDP_DIAG_MAX, 52 }; 53 #define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1) 54 struct xdp_diag_info { 55 __u32 ifindex; 56 __u32 queue_id; 57 }; 58 struct xdp_diag_ring { 59 __u32 entries; 60 }; 61 #define XDP_DU_F_ZEROCOPY (1 << 0) 62 struct xdp_diag_umem { 63 __u64 size; 64 __u32 id; 65 __u32 num_pages; 66 __u32 chunk_size; 67 __u32 headroom; 68 __u32 ifindex; 69 __u32 queue_id; 70 __u32 flags; 71 __u32 refs; 72 }; 73 #endif 74