xsk: Add getsockopt XDP_OPTIONS
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Wed, 26 Jun 2019 14:35:25 +0000 (17:35 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Jun 2019 20:53:26 +0000 (22:53 +0200)
commit2640d3c8123223e0a205b2a25a446df6f072b3ea
tree363a9ed3c58920994273d03e3c8aa976382f181e
parentd57d76428ae9abca51fb89f9326da9d4b1cf8270
xsk: Add getsockopt XDP_OPTIONS

Make it possible for the application to determine whether the AF_XDP
socket is running in zero-copy mode. To achieve this, add a new
getsockopt option XDP_OPTIONS that returns flags. The only flag
supported for now is the zero-copy mode indicator.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/uapi/linux/if_xdp.h
net/xdp/xsk.c
tools/include/uapi/linux/if_xdp.h