diff options
| author | Brenden Blanco <bblanco@plumgrid.com> | 2016-07-19 12:16:46 -0700 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:50:24 +0300 |
| commit | 6bff0d68d68f17a56ff85d6396e22fa85a3e1ad6 (patch) | |
| tree | 1fdd2fa75adecaf6b8c85f31e7fa98b5c501e536 /include/linux/bpf.h | |
| parent | 7eca70725f8ae82609b9fec7473911c93ad153e4 (diff) | |
bpf: add bpf_prog_add api for bulk prog refcnt
A subsystem may need to store many copies of a bpf program, each
deserving its own reference. Rather than requiring the caller to loop
one by one (with possible mid-loop failure), add a bulk bpf_prog_add
api.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'include/linux/bpf.h')
| -rw-r--r-- | include/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 9c12179eb85b..aba0ea6df106 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -223,6 +223,7 @@ void bpf_register_map_type(struct bpf_map_type_list *tl); struct bpf_prog *bpf_prog_get(u32 ufd); struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type); +struct bpf_prog *bpf_prog_add(struct bpf_prog *prog, int i); struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog); void bpf_prog_put(struct bpf_prog *prog); |
