diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2018-06-04 14:05:53 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-06-05 15:46:04 +0200 |
commit | 74515c5750f30244a901c3c0c82a2fe534b3c9c5 (patch) | |
tree | 678b921836c762ea358663945c57c041af43f35f /include/linux/netdevice.h | |
parent | 8aef7340ae9695912a411886452ae9773206e845 (diff) | |
download | linux-stable-74515c5750f30244a901c3c0c82a2fe534b3c9c5.tar.gz linux-stable-74515c5750f30244a901c3c0c82a2fe534b3c9c5.tar.bz2 linux-stable-74515c5750f30244a901c3c0c82a2fe534b3c9c5.zip |
net: xdp: added bpf_netdev_command XDP_{QUERY, SETUP}_XSK_UMEM
Extend ndo_bpf with two new commands used for query zero-copy support
and register an UMEM to a queue_id of a netdev.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 42c6ea35a6f2..cc4ea7ab6d24 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -817,10 +817,13 @@ enum bpf_netdev_command { BPF_OFFLOAD_DESTROY, BPF_OFFLOAD_MAP_ALLOC, BPF_OFFLOAD_MAP_FREE, + XDP_QUERY_XSK_UMEM, + XDP_SETUP_XSK_UMEM, }; struct bpf_prog_offload_ops; struct netlink_ext_ack; +struct xdp_umem; struct netdev_bpf { enum bpf_netdev_command command; @@ -851,6 +854,11 @@ struct netdev_bpf { struct { struct bpf_offloaded_map *offmap; }; + /* XDP_SETUP_XSK_UMEM */ + struct { + struct xdp_umem *umem; + u16 queue_id; + } xsk; }; }; |