linux/kernel/bpf/queue_stack_maps.c

// SPDX-License-Identifier: GPL-2.0
/*
 * queue_stack_maps.c: BPF queue and stack maps
 *
 * Copyright (c) 2018 Politecnico di Torino
 */
#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)
{}

/* Called from syscall */
static int queue_stack_map_alloc_check(union bpf_attr *attr)
{}

static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr)
{}

/* Called when map->refcnt goes to zero, either from workqueue or from syscall */
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)
{}

/* Called from syscall or from eBPF program */
static long queue_map_peek_elem(struct bpf_map *map, void *value)
{}

/* Called from syscall or from eBPF program */
static long stack_map_peek_elem(struct bpf_map *map, void *value)
{}

/* Called from syscall or from eBPF program */
static long queue_map_pop_elem(struct bpf_map *map, void *value)
{}

/* Called from syscall or from eBPF program */
static long stack_map_pop_elem(struct bpf_map *map, void *value)
{}

/* Called from syscall or from eBPF program */
static long queue_stack_map_push_elem(struct bpf_map *map, void *value,
				      u64 flags)
{}

/* Called from syscall or from eBPF program */
static void *queue_stack_map_lookup_elem(struct bpf_map *map, void *key)
{}

/* Called from syscall or from eBPF program */
static long queue_stack_map_update_elem(struct bpf_map *map, void *key,
					void *value, u64 flags)
{}

/* Called from syscall or from eBPF program */
static long queue_stack_map_delete_elem(struct bpf_map *map, void *key)
{}

/* Called from syscall */
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 =;