DPDK
19.05.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eal
common
include
rte_memzone.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
5
#ifndef _RTE_MEMZONE_H_
6
#define _RTE_MEMZONE_H_
7
25
#include <stdio.h>
26
#include <rte_compat.h>
27
#include <
rte_memory.h
>
28
#include <
rte_common.h
>
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
34
#define RTE_MEMZONE_2MB 0x00000001
35
#define RTE_MEMZONE_1GB 0x00000002
36
#define RTE_MEMZONE_16MB 0x00000100
37
#define RTE_MEMZONE_16GB 0x00000200
38
#define RTE_MEMZONE_256KB 0x00010000
39
#define RTE_MEMZONE_256MB 0x00020000
40
#define RTE_MEMZONE_512MB 0x00040000
41
#define RTE_MEMZONE_4GB 0x00080000
42
#define RTE_MEMZONE_SIZE_HINT_ONLY 0x00000004
43
#define RTE_MEMZONE_IOVA_CONTIG 0x00100000
49
struct rte_memzone {
50
51
#define RTE_MEMZONE_NAMESIZE 32
52
char name[RTE_MEMZONE_NAMESIZE];
54
RTE_STD_C11
55
union
{
56
phys_addr_t
phys_addr
;
57
rte_iova_t
iova
;
58
};
59
RTE_STD_C11
60
union
{
61
void
*
addr
;
62
uint64_t
addr_64
;
63
};
64
size_t
len
;
66
uint64_t
hugepage_sz
;
68
int32_t
socket_id
;
70
uint32_t
flags
;
71
} __attribute__((__packed__));
72
131
const
struct
rte_memzone
*
rte_memzone_reserve
(
const
char
*
name
,
132
size_t
len
,
int
socket_id
,
133
unsigned
flags
);
134
197
const
struct
rte_memzone
*
rte_memzone_reserve_aligned
(
const
char
*
name
,
198
size_t
len
,
int
socket_id
,
199
unsigned
flags
,
unsigned
align);
200
269
const
struct
rte_memzone
*
rte_memzone_reserve_bounded
(
const
char
*
name
,
270
size_t
len
,
int
socket_id
,
271
unsigned
flags
,
unsigned
align,
unsigned
bound);
272
282
int
rte_memzone_free
(
const
struct
rte_memzone
*mz);
283
295
const
struct
rte_memzone
*
rte_memzone_lookup
(
const
char
*
name
);
296
303
void
rte_memzone_dump
(FILE *f);
304
313
void
rte_memzone_walk
(
void
(*func)(
const
struct
rte_memzone
*,
void
*arg),
314
void
*arg);
315
316
#ifdef __cplusplus
317
}
318
#endif
319
320
#endif
/* _RTE_MEMZONE_H_ */
Generated by
1.8.1.2