#include <linux/bpf.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/btf_ids.h>
#include "percpu_freelist.h"
#define QUEUE_STACK_CREATE_FLAG_MASK …
struct bpf_queue_stack { … };
static struct bpf_queue_stack *bpf_queue_stack(struct bpf_map *map)
{ … }
static bool queue_stack_map_is_empty(struct bpf_queue_stack *qs)
{ … }
static bool queue_stack_map_is_full(struct bpf_queue_stack *qs)
{ … }
static int queue_stack_map_alloc_check(union bpf_attr *attr)
{ … }
static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr)
{ … }
static void queue_stack_map_free(struct bpf_map *map)
{ … }
static long __queue_map_get(struct bpf_map *map, void *value, bool delete)
{ … }
static long __stack_map_get(struct bpf_map *map, void *value, bool delete)
{ … }
static long queue_map_peek_elem(struct bpf_map *map, void *value)
{ … }
static long stack_map_peek_elem(struct bpf_map *map, void *value)
{ … }
static long queue_map_pop_elem(struct bpf_map *map, void *value)
{ … }
static long stack_map_pop_elem(struct bpf_map *map, void *value)
{ … }
static long queue_stack_map_push_elem(struct bpf_map *map, void *value,
u64 flags)
{ … }
static void *queue_stack_map_lookup_elem(struct bpf_map *map, void *key)
{ … }
static long queue_stack_map_update_elem(struct bpf_map *map, void *key,
void *value, u64 flags)
{ … }
static long queue_stack_map_delete_elem(struct bpf_map *map, void *key)
{ … }
static int queue_stack_map_get_next_key(struct bpf_map *map, void *key,
void *next_key)
{ … }
static u64 queue_stack_map_mem_usage(const struct bpf_map *map)
{ … }
BTF_ID_LIST_SINGLE(queue_map_btf_ids, struct, bpf_queue_stack)
const struct bpf_map_ops queue_map_ops = …;
const struct bpf_map_ops stack_map_ops = …;