#include <linux/bitmap.h>
#include <linux/bpf.h>
#include <linux/btf.h>
#include <linux/err.h>
#include <linux/jhash.h>
#include <linux/random.h>
#include <linux/btf_ids.h>
#define BLOOM_CREATE_FLAG_MASK …
struct bpf_bloom_filter { … };
static u32 hash(struct bpf_bloom_filter *bloom, void *value,
u32 value_size, u32 index)
{ … }
static long bloom_map_peek_elem(struct bpf_map *map, void *value)
{ … }
static long bloom_map_push_elem(struct bpf_map *map, void *value, u64 flags)
{ … }
static long bloom_map_pop_elem(struct bpf_map *map, void *value)
{ … }
static long bloom_map_delete_elem(struct bpf_map *map, void *value)
{ … }
static int bloom_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
{ … }
static int bloom_map_alloc_check(union bpf_attr *attr)
{ … }
static struct bpf_map *bloom_map_alloc(union bpf_attr *attr)
{ … }
static void bloom_map_free(struct bpf_map *map)
{ … }
static void *bloom_map_lookup_elem(struct bpf_map *map, void *key)
{ … }
static long bloom_map_update_elem(struct bpf_map *map, void *key,
void *value, u64 flags)
{ … }
static int bloom_map_check_btf(const struct bpf_map *map,
const struct btf *btf,
const struct btf_type *key_type,
const struct btf_type *value_type)
{ … }
static u64 bloom_map_mem_usage(const struct bpf_map *map)
{ … }
BTF_ID_LIST_SINGLE(bpf_bloom_map_btf_ids, struct, bpf_bloom_filter)
const struct bpf_map_ops bloom_filter_map_ops = …;