xsk: add sock_diag interface for AF_XDP
This patch adds the sock_diag interface for querying sockets from user space. Tools like iproute2 ss(8) can use this interface to list open AF_XDP sockets. The user-space ABI is defined in linux/xdp_diag.h and includes netlink request and response structs. The request can query sockets and the response contains socket information about the rings, umems, inode and more. Signed-off-by:Björn Töpel <bjorn.topel@intel.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- include/uapi/linux/xdp_diag.h 72 additions, 0 deletionsinclude/uapi/linux/xdp_diag.h
- net/xdp/Kconfig 8 additions, 0 deletionsnet/xdp/Kconfig
- net/xdp/Makefile 1 addition, 0 deletionsnet/xdp/Makefile
- net/xdp/xsk.c 1 addition, 5 deletionsnet/xdp/xsk.c
- net/xdp/xsk.h 12 additions, 0 deletionsnet/xdp/xsk.h
- net/xdp/xsk_diag.c 191 additions, 0 deletionsnet/xdp/xsk_diag.c
include/uapi/linux/xdp_diag.h
0 → 100644
net/xdp/xsk.h
0 → 100644
net/xdp/xsk_diag.c
0 → 100644
Please register or sign in to comment