diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2019-11-07 18:47:37 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-11-11 04:30:45 +0100 |
commit | 2e5d72c15f0dc713c203464c5c76eb4ec285f598 (patch) | |
tree | f094baeb232a60c362d051de71b827a7d2309bdb /samples/bpf/xdpsock.h | |
parent | libbpf: Support XDP_SHARED_UMEM with external XDP program (diff) | |
download | linux-2e5d72c15f0dc713c203464c5c76eb4ec285f598.tar.xz linux-2e5d72c15f0dc713c203464c5c76eb4ec285f598.zip |
samples/bpf: Add XDP_SHARED_UMEM support to xdpsock
Add support for the XDP_SHARED_UMEM mode to the xdpsock sample
application. As libbpf does not have a built in XDP program for this
mode, we use an explicitly loaded XDP program. This also serves as an
example on how to write your own XDP program that can route to an
AF_XDP socket.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: William Tu <u9012063@gmail.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/bpf/1573148860-30254-3-git-send-email-magnus.karlsson@intel.com
Diffstat (limited to 'samples/bpf/xdpsock.h')
-rw-r--r-- | samples/bpf/xdpsock.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samples/bpf/xdpsock.h b/samples/bpf/xdpsock.h new file mode 100644 index 000000000000..b7eca15c78cc --- /dev/null +++ b/samples/bpf/xdpsock.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Copyright(c) 2019 Intel Corporation. + */ + +#ifndef XDPSOCK_H_ +#define XDPSOCK_H_ + +#define MAX_SOCKS 4 + +#endif /* XDPSOCK_H */ |