diff options
author | David S. Miller <davem@davemloft.net> | 2021-03-25 16:30:46 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-25 16:30:46 -0700 |
commit | 241949e488f38a192f2359dbb21d80e08173eb60 (patch) | |
tree | 5a8975683f2ccadfbba7ebeb55db482e605581bb /tools/lib/bpf/strset.h | |
parent | efd13b71a3fa31413f8d15342e01d44b60b0a432 (diff) | |
parent | e2c69f3a5b4edfbcade2c38862c1839fc371c5d5 (diff) | |
download | linux-241949e488f38a192f2359dbb21d80e08173eb60.tar.bz2 |
Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Alexei Starovoitov says:
====================
pull-request: bpf-next 2021-03-24
The following pull-request contains BPF updates for your *net-next* tree.
We've added 37 non-merge commits during the last 15 day(s) which contain
a total of 65 files changed, 3200 insertions(+), 738 deletions(-).
The main changes are:
1) Static linking of multiple BPF ELF files, from Andrii.
2) Move drop error path to devmap for XDP_REDIRECT, from Lorenzo.
3) Spelling fixes from various folks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/lib/bpf/strset.h')
-rw-r--r-- | tools/lib/bpf/strset.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/lib/bpf/strset.h b/tools/lib/bpf/strset.h new file mode 100644 index 000000000000..b6ddf77a83c2 --- /dev/null +++ b/tools/lib/bpf/strset.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ + +/* Copyright (c) 2021 Facebook */ +#ifndef __LIBBPF_STRSET_H +#define __LIBBPF_STRSET_H + +#include <stdbool.h> +#include <stddef.h> + +struct strset; + +struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz); +void strset__free(struct strset *set); + +const char *strset__data(const struct strset *set); +size_t strset__data_size(const struct strset *set); + +int strset__find_str(struct strset *set, const char *s); +int strset__add_str(struct strset *set, const char *s); + +#endif /* __LIBBPF_STRSET_H */ |