From: Björn Töpel Date: Mon, 4 Jun 2018 12:05:53 +0000 (+0200) Subject: net: xdp: added bpf_netdev_command XDP_{QUERY, SETUP}_XSK_UMEM X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=74515c5750f30244a901c3c0c82a2fe534b3c9c5;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Daniel Borkmann --- 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; }; };