blob: 73a7d18d1e93ec9ee03a242d7337ab9460d61be0 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 */
Christopher Ferris24f97eb2019-05-20 12:58:13 -07007#ifndef _LINUX_XDP_DIAG_H
8#define _LINUX_XDP_DIAG_H
9#include <linux/types.h>
10struct 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};
18struct 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)
Christopher Ferris25c18d42020-10-14 17:42:58 -070029#define XDP_SHOW_STATS (1 << 4)
Christopher Ferris24f97eb2019-05-20 12:58:13 -070030enum {
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,
Christopher Ferris25c18d42020-10-14 17:42:58 -070040 XDP_DIAG_STATS,
Christopher Ferris24f97eb2019-05-20 12:58:13 -070041 __XDP_DIAG_MAX,
42};
43#define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1)
44struct xdp_diag_info {
45 __u32 ifindex;
46 __u32 queue_id;
47};
48struct xdp_diag_ring {
49 __u32 entries;
50};
51#define XDP_DU_F_ZEROCOPY (1 << 0)
52struct 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};
Christopher Ferris25c18d42020-10-14 17:42:58 -070063struct 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};
Christopher Ferris24f97eb2019-05-20 12:58:13 -070071#endif