[dpdk-dev] [PATCH v8 1/9] eal: move OS common functions to single file
Thomas Monjalon
thomas at monjalon.net
Mon Jun 22 16:54:40 CEST 2020
Can we reduce the scope in the title?
This patch is about EAL config in general,
so I would reword it to:
eal: move OS common config objects
22/06/2020 09:55, talshn at mellanox.com:
> +#include <rte_os.h>
> +
> +#include <eal_private.h>
> +#include <eal_memcfg.h>
Local files, like eal_*, are usually included with "".
[...]
> +/* Allow the application to print its usage message too if set */
> +static rte_usage_hook_t rte_application_usage_hook;
This is not config-related.
Could it be in a separate patch?
Moved to lib/librte_eal/common/eal_common_options.c?
[...]
> +void
> +rte_eal_set_runtime_dir(char *run_dir, size_t size)
> +{
> + strncpy(runtime_dir, run_dir, size);
> +}
This function should be private to EAL, no rte_ prefix.
[...]
> +/* Return a pointer to theinternal configuration structure */
Space missing
> +struct internal_config *
> +rte_eal_get_internal_configuration(void)
> +{
> + return &internal_config;
> +}
This function should be private to EAL, no rte_ prefix.
[...]
> --- a/lib/librte_eal/include/rte_eal.h
> +++ b/lib/librte_eal/include/rte_eal.h
> +void
> +rte_eal_set_runtime_dir(char *run_dir, size_t size);
> +
> +void
> +rte_eal_config_remap(void *mem_cfg_addr);
> +
> +struct internal_config *
> +rte_eal_get_internal_configuration(void);
> +
> +rte_usage_hook_t *
> +rte_eal_get_application_usage_hook(void);
If some new function must be added in the API,
they must be clearly documented with doxygen.
But as part of this refactoring, I guess we should have zero new API.
Probably that those 4 functions are candidate to internal header files.
More information about the dev
mailing list