Skip to content

Commit

Permalink
net: xdp: added bpf_netdev_command XDP_{QUERY, SETUP}_XSK_UMEM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Björn Töpel authored and Daniel Borkmann committed Jun 5, 2018
1 parent 8aef734 commit 74515c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
@@ -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;
};
};

0 comments on commit 74515c5

Please sign in to comment.