[dpdk-dev] [PATCH v3 7/9] mem: add external API to retrieve page fd from EAL

Maxime Coquelin maxime.coquelin at redhat.com
Fri Sep 14 10:00:50 CEST 2018



On 09/04/2018 05:15 PM, Anatoly Burakov wrote:
> Now that we can retrieve page fd's internally, we can expose it
> as an external API. This will add two flavors of API - thread-safe
> and non-thread-safe. Fix up internal API's to return values we need
> without modifying rte_errno internally if called from within EAL.
> 
> We do not want calling code to accidentally close an internal fd, so
> we make a duplicate of it before we return it to the user. Caller is
> therefore responsible for closing this fd.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>   lib/librte_eal/bsdapp/eal/eal_memalloc.c   |  5 ++-
>   lib/librte_eal/common/eal_common_memory.c  | 49 ++++++++++++++++++++++
>   lib/librte_eal/common/eal_memalloc.h       |  2 +
>   lib/librte_eal/common/include/rte_memory.h | 48 +++++++++++++++++++++
>   lib/librte_eal/linuxapp/eal/eal_memalloc.c | 21 ++++++----
>   lib/librte_eal/rte_eal_version.map         |  2 +
>   6 files changed, 118 insertions(+), 9 deletions(-)
> 


Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>



More information about the dev mailing list