linux/kernel/bpf/bpf_lru_list.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2016 Facebook
 */
#ifndef __BPF_LRU_LIST_H_
#define __BPF_LRU_LIST_H_

#include <linux/cache.h>
#include <linux/list.h>
#include <linux/spinlock_types.h>

#define NR_BPF_LRU_LIST_T
#define NR_BPF_LRU_LIST_COUNT
#define NR_BPF_LRU_LOCAL_LIST_T
#define BPF_LOCAL_LIST_T_OFFSET

enum bpf_lru_list_type {};

struct bpf_lru_node {};

struct bpf_lru_list {};

struct bpf_lru_locallist {};

struct bpf_common_lru {};

del_from_htab_func;

struct bpf_lru {};

static inline void bpf_lru_node_set_ref(struct bpf_lru_node *node)
{}

int bpf_lru_init(struct bpf_lru *lru, bool percpu, u32 hash_offset,
		 del_from_htab_func del_from_htab, void *delete_arg);
void bpf_lru_populate(struct bpf_lru *lru, void *buf, u32 node_offset,
		      u32 elem_size, u32 nr_elems);
void bpf_lru_destroy(struct bpf_lru *lru);
struct bpf_lru_node *bpf_lru_pop_free(struct bpf_lru *lru, u32 hash);
void bpf_lru_push_free(struct bpf_lru *lru, struct bpf_lru_node *node);

#endif