On 09/03/2017 04:48, Yerden Zhumabekov wrote:
Hello,
Can anybody explain why rte_malloc_heap.h is advertised as a public
interface? It only contains malloc_heap struct which is used
internally and violates DPDK naming conventions for public struct. I
haven't found any use of it outside of EAL and it's undocumented. If
it is in fact public, will it continue to be?
As you point out, the struct name does not follow dpdk conventions for
public structs, that is how it was historically and was never changed.
IMHO the struct itself is not meant to be public (probably we should add
some comments) but it needs to be as it is a field in public 'struct
rte_mem_config' which is also a field in public 'struct rte_config'.
That being said, it doesn't look like rte_mem_config should be a public
struct at all, although there are a couple of PMDs (virtio_user and ena)
accessing mem_config info through rte_config.
I cannot guarantee that would remain public, but there should be at
least a notice in case of any changes.
Sergio
I'd like to use it (and some code in librte_eal/common) for
region-based allocation in a secondary process for easy memory
reclamation in case of failure. Is it safe to reuse malloc_heap struct?