git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: remove deprecated cpuflag macros
[dpdk.git]
/
lib
/
librte_eal
/
common
/
malloc_elem.h
diff --git
a/lib/librte_eal/common/malloc_elem.h
b/lib/librte_eal/common/malloc_elem.h
index
34bd268
..
a1e5f7f
100644
(file)
--- a/
lib/librte_eal/common/malloc_elem.h
+++ b/
lib/librte_eal/common/malloc_elem.h
@@
-7,7
+7,7
@@
#include <stdbool.h>
#include <stdbool.h>
-#
include <rte_memory.h>
+#
define MIN_DATA_SIZE (RTE_CACHE_LINE_SIZE)
/* dummy definition of struct so we can use pointers to it in malloc_elem struct */
struct malloc_heap;
/* dummy definition of struct so we can use pointers to it in malloc_elem struct */
struct malloc_heap;
@@
-26,10
+26,12
@@
struct malloc_elem {
/**< points to next elem in memseg */
LIST_ENTRY(malloc_elem) free_list;
/**< list of free elements in heap */
/**< points to next elem in memseg */
LIST_ENTRY(malloc_elem) free_list;
/**< list of free elements in heap */
-
const struct rte_memseg *ms
;
+
struct rte_memseg_list *msl
;
volatile enum elem_state state;
uint32_t pad;
size_t size;
volatile enum elem_state state;
uint32_t pad;
size_t size;
+ struct malloc_elem *orig_elem;
+ size_t orig_size;
#ifdef RTE_MALLOC_DEBUG
uint64_t header_cookie; /* Cookie marking start of data */
/* trailer cookie at start + size */
#ifdef RTE_MALLOC_DEBUG
uint64_t header_cookie; /* Cookie marking start of data */
/* trailer cookie at start + size */
@@
-113,8
+115,10
@@
malloc_elem_from_data(const void *data)
void
malloc_elem_init(struct malloc_elem *elem,
struct malloc_heap *heap,
void
malloc_elem_init(struct malloc_elem *elem,
struct malloc_heap *heap,
- const struct rte_memseg *ms,
- size_t size);
+ struct rte_memseg_list *msl,
+ size_t size,
+ struct malloc_elem *orig_elem,
+ size_t orig_size);
void
malloc_elem_insert(struct malloc_elem *elem);
void
malloc_elem_insert(struct malloc_elem *elem);
@@
-153,6
+157,9
@@
malloc_elem_join_adjacent_free(struct malloc_elem *elem);
int
malloc_elem_resize(struct malloc_elem *elem, size_t size);
int
malloc_elem_resize(struct malloc_elem *elem, size_t size);
+void
+malloc_elem_hide_region(struct malloc_elem *elem, void *start, size_t len);
+
void
malloc_elem_free_list_remove(struct malloc_elem *elem);
void
malloc_elem_free_list_remove(struct malloc_elem *elem);
@@
-174,4
+181,10
@@
malloc_elem_free_list_index(size_t size);
void
malloc_elem_free_list_insert(struct malloc_elem *elem);
void
malloc_elem_free_list_insert(struct malloc_elem *elem);
+/*
+ * Find biggest IOVA-contiguous zone within an element with specified alignment.
+ */
+size_t
+malloc_elem_find_max_iova_contig(struct malloc_elem *elem, size_t align);
+
#endif /* MALLOC_ELEM_H_ */
#endif /* MALLOC_ELEM_H_ */