DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_malloc_heap usage scenario
@ 2017-03-09  4:48 Yerden Zhumabekov
  2017-03-14 11:53 ` Sergio Gonzalez Monroy
  0 siblings, 1 reply; 2+ messages in thread
From: Yerden Zhumabekov @ 2017-03-09  4:48 UTC (permalink / raw)
  To: dev

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?

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?


-- 

Yerden Zhumabekov

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] rte_malloc_heap usage scenario
  2017-03-09  4:48 [dpdk-dev] rte_malloc_heap usage scenario Yerden Zhumabekov
@ 2017-03-14 11:53 ` Sergio Gonzalez Monroy
  0 siblings, 0 replies; 2+ messages in thread
From: Sergio Gonzalez Monroy @ 2017-03-14 11:53 UTC (permalink / raw)
  To: Yerden Zhumabekov; +Cc: dev, David Marchand

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?
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-14 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09  4:48 [dpdk-dev] rte_malloc_heap usage scenario Yerden Zhumabekov
2017-03-14 11:53 ` Sergio Gonzalez Monroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).