X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Feal_memalloc.h;h=6736fa3d4f0767ef66b7d84fcc41c4e11e821796;hb=7f0bb634a1406b132ff15c9cd56a0a9f33e5f11d;hp=8616793e3d12464ee6f9d6c36f1557fbb1795a6e;hpb=a5ff05d60fc59c90b2cfd65613eee39af9c0e33e;p=dpdk.git diff --git a/lib/librte_eal/common/eal_memalloc.h b/lib/librte_eal/common/eal_memalloc.h index 8616793e3d..6736fa3d4f 100644 --- a/lib/librte_eal/common/eal_memalloc.h +++ b/lib/librte_eal/common/eal_memalloc.h @@ -8,6 +8,7 @@ #include #include +#include /* * Allocate segment of specified page size. @@ -42,4 +43,37 @@ eal_memalloc_free_seg(struct rte_memseg *ms); int eal_memalloc_free_seg_bulk(struct rte_memseg **ms, int n_segs); +/* + * Check if memory pointed to by `start` and of `length` that resides in + * memseg list `msl` is IOVA-contiguous. + */ +bool +eal_memalloc_is_contig(const struct rte_memseg_list *msl, void *start, + size_t len); + +/* synchronize local memory map to primary process */ +int +eal_memalloc_sync_with_primary(void); + +int +eal_memalloc_mem_event_callback_register(const char *name, + rte_mem_event_callback_t clb); + +int +eal_memalloc_mem_event_callback_unregister(const char *name); + +void +eal_memalloc_mem_event_notify(enum rte_mem_event event, const void *start, + size_t len); + +int +eal_memalloc_mem_alloc_validator_register(const char *name, + rte_mem_alloc_validator_t clb, int socket_id, size_t limit); + +int +eal_memalloc_mem_alloc_validator_unregister(const char *name, int socket_id); + +int +eal_memalloc_mem_alloc_validate(int socket_id, size_t new_len); + #endif /* EAL_MEMALLOC_H */