linux/drivers/net/ethernet/mellanox/mlx5/core/en/mapping.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/* Copyright (c) 2018 Mellanox Technologies */

#include <linux/jhash.h>
#include <linux/slab.h>
#include <linux/xarray.h>
#include <linux/hashtable.h>
#include <linux/refcount.h>

#include "mapping.h"

#define MAPPING_GRACE_PERIOD

static LIST_HEAD(shared_ctx_list);
static DEFINE_MUTEX(shared_ctx_lock);

struct mapping_ctx {};

struct mapping_item {};

int mapping_add(struct mapping_ctx *ctx, void *data, u32 *id)
{}

static void mapping_remove_and_free(struct mapping_ctx *ctx,
				    struct mapping_item *mi)
{}

static void mapping_free_item(struct mapping_ctx *ctx,
			      struct mapping_item *mi)
{}

int mapping_remove(struct mapping_ctx *ctx, u32 id)
{}

int mapping_find(struct mapping_ctx *ctx, u32 id, void *data)
{}

static void
mapping_remove_and_free_list(struct mapping_ctx *ctx, struct list_head *list)
{}

static void mapping_work_handler(struct work_struct *work)
{}

static void mapping_flush_work(struct mapping_ctx *ctx)
{}

struct mapping_ctx *
mapping_create(size_t data_size, u32 max_id, bool delayed_removal)
{}

struct mapping_ctx *
mapping_create_for_id(u64 id, u8 type, size_t data_size, u32 max_id, bool delayed_removal)
{}

void mapping_destroy(struct mapping_ctx *ctx)
{}