[dpdk-dev] [PATCH v9 3/3] Move common functions in eal_memory.c

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Jul 27 02:35:44 CEST 2015


2015-07-25 12:36, Ravi Kerur:
> --- a/lib/librte_eal/bsdapp/eal/eal_memory.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
[...]
> +/*
> + * Wrapper function to initialize contigmem.
> + */
> +int
> +rte_eal_hugepage_init(void)
> +{
> +	return rte_eal_contigmem_init();
> +}

The useless wrapper can be avoid by renaming the function: contigmem_init to
hugepage_init.

> +/*
> + * Wrapper function, no-op here.
> + */
> +void
> +test_proc_pagemap_readable(void)
>  {
> +	return;
>  }
[...]
> --- a/lib/librte_eal/common/eal_private.h
> +++ b/lib/librte_eal/common/eal_private.h
[...]
> +/**
> + * This function checks /proc filesystem
> + * on Linux.
> + *
> + * This function is private to the EAL.
> + */
> +void
> +test_proc_pagemap_readable(void);

This check is specific to Linux. So it should not be in the common file.


More information about the dev mailing list