Blame include/uapi/linux/xdp_diag.h

Packit d3f73b
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
Packit d3f73b
/*
Packit d3f73b
 * xdp_diag: interface for query/monitor XDP sockets
Packit d3f73b
 * Copyright(c) 2019 Intel Corporation.
Packit d3f73b
 */
Packit d3f73b
Packit d3f73b
#ifndef _LINUX_XDP_DIAG_H
Packit d3f73b
#define _LINUX_XDP_DIAG_H
Packit d3f73b
Packit d3f73b
#include <linux/types.h>
Packit d3f73b
Packit d3f73b
struct xdp_diag_req {
Packit d3f73b
	__u8	sdiag_family;
Packit d3f73b
	__u8	sdiag_protocol;
Packit d3f73b
	__u16	pad;
Packit d3f73b
	__u32	xdiag_ino;
Packit d3f73b
	__u32	xdiag_show;
Packit d3f73b
	__u32	xdiag_cookie[2];
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
struct xdp_diag_msg {
Packit d3f73b
	__u8	xdiag_family;
Packit d3f73b
	__u8	xdiag_type;
Packit d3f73b
	__u16	pad;
Packit d3f73b
	__u32	xdiag_ino;
Packit d3f73b
	__u32	xdiag_cookie[2];
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
#define XDP_SHOW_INFO		(1 << 0) /* Basic information */
Packit d3f73b
#define XDP_SHOW_RING_CFG	(1 << 1)
Packit d3f73b
#define XDP_SHOW_UMEM		(1 << 2)
Packit d3f73b
#define XDP_SHOW_MEMINFO	(1 << 3)
Packit d3f73b
Packit d3f73b
enum {
Packit d3f73b
	XDP_DIAG_NONE,
Packit d3f73b
	XDP_DIAG_INFO,
Packit d3f73b
	XDP_DIAG_UID,
Packit d3f73b
	XDP_DIAG_RX_RING,
Packit d3f73b
	XDP_DIAG_TX_RING,
Packit d3f73b
	XDP_DIAG_UMEM,
Packit d3f73b
	XDP_DIAG_UMEM_FILL_RING,
Packit d3f73b
	XDP_DIAG_UMEM_COMPLETION_RING,
Packit d3f73b
	XDP_DIAG_MEMINFO,
Packit d3f73b
	__XDP_DIAG_MAX,
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
#define XDP_DIAG_MAX (__XDP_DIAG_MAX - 1)
Packit d3f73b
Packit d3f73b
struct xdp_diag_info {
Packit d3f73b
	__u32	ifindex;
Packit d3f73b
	__u32	queue_id;
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
struct xdp_diag_ring {
Packit d3f73b
	__u32	entries; /*num descs */
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
#define XDP_DU_F_ZEROCOPY (1 << 0)
Packit d3f73b
Packit d3f73b
struct xdp_diag_umem {
Packit d3f73b
	__u64	size;
Packit d3f73b
	__u32	id;
Packit d3f73b
	__u32	num_pages;
Packit d3f73b
	__u32	chunk_size;
Packit d3f73b
	__u32	headroom;
Packit d3f73b
	__u32	ifindex;
Packit d3f73b
	__u32	queue_id;
Packit d3f73b
	__u32	flags;
Packit d3f73b
	__u32	refs;
Packit d3f73b
};
Packit d3f73b
Packit d3f73b
#endif /* _LINUX_XDP_DIAG_H */