examples/bpf: move struct bpf_elf_map defined maps to legacy folder
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Hangbin Liu <haliu@redhat.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
6d61a2b557
commit
1ac8285a69
|
|
@ -1,8 +1,12 @@
|
||||||
eBPF toy code examples (running in kernel) to familiarize yourself
|
eBPF toy code examples (running in kernel) to familiarize yourself
|
||||||
with syntax and features:
|
with syntax and features:
|
||||||
|
|
||||||
- bpf_shared.c -> Ingress/egress map sharing example
|
- legacy/bpf_shared.c -> Ingress/egress map sharing example
|
||||||
- bpf_tailcall.c -> Using tail call chains
|
- legacy/bpf_tailcall.c -> Using tail call chains
|
||||||
- bpf_cyclic.c -> Simple cycle as tail calls
|
- legacy/bpf_cyclic.c -> Simple cycle as tail calls
|
||||||
- bpf_graft.c -> Demo on altering runtime behaviour
|
- legacy/bpf_graft.c -> Demo on altering runtime behaviour
|
||||||
- bpf_map_in_map.c -> Using map in map example
|
- legacy/bpf_map_in_map.c -> Using map in map example
|
||||||
|
|
||||||
|
Note: Users should use new BTF way to defined the maps, the examples
|
||||||
|
in legacy folder which is using struct bpf_elf_map defined maps is not
|
||||||
|
recommanded.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../../include/bpf_api.h"
|
#include "../../../include/bpf_api.h"
|
||||||
|
|
||||||
/* Cyclic dependency example to test the kernel's runtime upper
|
/* Cyclic dependency example to test the kernel's runtime upper
|
||||||
* bound on loops. Also demonstrates on how to use direct-actions,
|
* bound on loops. Also demonstrates on how to use direct-actions,
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../../include/bpf_api.h"
|
#include "../../../include/bpf_api.h"
|
||||||
|
|
||||||
/* This example demonstrates how classifier run-time behaviour
|
/* This example demonstrates how classifier run-time behaviour
|
||||||
* can be altered with tail calls. We start out with an empty
|
* can be altered with tail calls. We start out with an empty
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../../include/bpf_api.h"
|
#include "../../../include/bpf_api.h"
|
||||||
|
|
||||||
#define MAP_INNER_ID 42
|
#define MAP_INNER_ID 42
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../../include/bpf_api.h"
|
#include "../../../include/bpf_api.h"
|
||||||
|
|
||||||
/* Minimal, stand-alone toy map pinning example:
|
/* Minimal, stand-alone toy map pinning example:
|
||||||
*
|
*
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#include "../../include/bpf_api.h"
|
#include "../../../include/bpf_api.h"
|
||||||
|
|
||||||
#define ENTRY_INIT 3
|
#define ENTRY_INIT 3
|
||||||
#define ENTRY_0 0
|
#define ENTRY_0 0
|
||||||
Loading…
Reference in New Issue