]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/examples/ip_pipeline/mempool.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / spdk / dpdk / examples / ip_pipeline / mempool.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2018 Intel Corporation
3 */
4
5 #ifndef _INCLUDE_MEMPOOL_H_
6 #define _INCLUDE_MEMPOOL_H_
7
8 #include <stdint.h>
9 #include <sys/queue.h>
10
11 #include <rte_mempool.h>
12
13 #include "common.h"
14
15 struct mempool {
16 TAILQ_ENTRY(mempool) node;
17 char name[NAME_SIZE];
18 struct rte_mempool *m;
19 uint32_t buffer_size;
20 };
21
22 TAILQ_HEAD(mempool_list, mempool);
23
24 int
25 mempool_init(void);
26
27 struct mempool *
28 mempool_find(const char *name);
29
30 struct mempool_params {
31 uint32_t buffer_size;
32 uint32_t pool_size;
33 uint32_t cache_size;
34 uint32_t cpu_id;
35 };
36
37 struct mempool *
38 mempool_create(const char *name, struct mempool_params *params);
39
40 #endif /* _INCLUDE_MEMPOOL_H_ */