[dpdk-dev] [PATCH v6 8/8] mempool: notify memory area to pool

santosh santosh.shukla at caviumnetworks.com
Tue Sep 26 00:18:17 CEST 2017


On Monday 25 September 2017 12:41 PM, Olivier MATZ wrote:
> On Thu, Sep 07, 2017 at 09:00:42PM +0530, Santosh Shukla wrote:
>> HW pool manager e.g. Octeontx SoC demands s/w to program start and end
>> address of pool. Currently, there is no such api in external mempool.
>> Introducing rte_mempool_ops_register_memory_area api which will let HW(pool
>> manager) to know when common layer selects hugepage:
>> For each hugepage - Notify its start/end address to HW pool manager.
>>
>> Signed-off-by: Santosh Shukla <santosh.shukla at caviumnetworks.com>
>> Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
>>
>> [...]
>>
>> +/**
>> + * @internal wrapper for mempool_ops register_memory_area callback.
>> + * API to notify the mempool handler if a new memory area is added to pool.
>> + *
> if -> when

ok.

>> + * Mempool handler usually get notified once for the case of mempool get full
>> + * range of memory area. However, if several memory areas exist then mempool
>> + * handler gets notified each time.
> Not sure I understand this last paragraph.

Refer v5 history [1] for same.

[1] http://dpdk.org/dev/patchwork/patch/28419/

there will be a case where mempool handler may have more than one memory example, no-hugepage case.
In that case _register_memory_area() ops will be called for more than once.

In v5, you suggested to mention this case explicitly in api description.

If your not clear with write up then could you propose one and also are you fine
with [8/8] patch beside above note? planning to send v7 by tomorrow, appreciate if you answer question.

>> + *
>> + * @param mp
>> + *   Pointer to the memory pool.
>> + * @param vaddr
>> + *   Pointer to the buffer virtual address
>> + * @param paddr
>> + *   Pointer to the buffer physical address
>> + * @param len
>> + *   Pool size
> Minor: missing dot at the end

ok.

>> + * @return
>> + *  - 0: Success;
>> + *  - ENOTSUP: doesn't support register_memory_area ops (valid error case).
> Missing minus before ENOTSUP.
> The dot should be a semicolon instead.
>
ok.

Thanks.



More information about the dev mailing list