examples/pipeline: fix include path for rte_log.h
Checks
Commit Message
When rte_log.h was moved to a new directory, the include path was not
updated for the generated C code produced by the pipeline library,
which results in build failure for this code.
Fixes: 09ce41310930 ("log: separate logging functions out of EAL")
Cc: stable@dpdk.org
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/pipeline/cli.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Tue, Feb 13, 2024 at 3:52 PM Cristian Dumitrescu
<cristian.dumitrescu@intel.com> wrote:
>
> When rte_log.h was moved to a new directory, the include path was not
> updated for the generated C code produced by the pipeline library,
> which results in build failure for this code.
>
> Fixes: 09ce41310930 ("log: separate logging functions out of EAL")
> Cc: stable@dpdk.org
>
> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
> examples/pipeline/cli.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
> index 2ae6cc579f..afb143c01f 100644
> --- a/examples/pipeline/cli.c
> +++ b/examples/pipeline/cli.c
> @@ -714,6 +714,7 @@ cmd_pipeline_libbuild(char **tokens,
> "-I %s/lib/eal/include "
> "-I %s/lib/eal/x86/include "
> "-I %s/lib/eal/include/generic "
> + "-I %s/lib/log "
> "-I %s/lib/meter "
> "-I %s/lib/port "
> "-I %s/lib/table "
> @@ -738,6 +739,7 @@ cmd_pipeline_libbuild(char **tokens,
> install_dir,
> install_dir,
> install_dir,
> + install_dir,
> log_file,
> obj_file,
> lib_file,
Wrt $Subject, copy/paste code in drivers/net/softnic is broken too.
Some comments on this code:
- putting compilation commands seems a rather strange idea in C code,
but at least, why not invoke an external tool/script that makes use of
existing build framework?
- RTE_INSTALL_DIR is undocumented,
- this implementation (passing -I <some_directory>/lib/eal/include) is
broken with a system-installed dpdk,
Hi David,
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Tuesday, February 13, 2024 4:19 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH] examples/pipeline: fix include path for rte_log.h
>
>
> Wrt $Subject, copy/paste code in drivers/net/softnic is broken too.
You're right, let me fix this in V2.
>
> Some comments on this code:
> - putting compilation commands seems a rather strange idea in C code,
> but at least, why not invoke an external tool/script that makes use of
> existing build framework?
Yes, I am thinking of transitioning the pipeline app from the examples
folder to the apps folder, as it is way more than an example at this point,
and also add a script/tool to generate the C code in a more configurable
way. For now, the examples/pipeline contains just the default way to do
this, but of course a standalone tool would be better. On my ToDo list.
Thanks for providing this input!
> - RTE_INSTALL_DIR is undocumented,
This option is not supposed to be broadly used, but it is there just in case.
When the tool mentioned above will be ready, this will be moved into that
tool.
> - this implementation (passing -I <some_directory>/lib/eal/include) is
> broken with a system-installed dpdk,
Yes, this is expected. For the purpose of the pipeline C code generation,
we need the path to the full DPDK folder, not just the public header files.
There is one internal DPDK internal header file (rte_pipeline_internal.h)
which is needed for code generation purposes, but it should not be
made a public header, as it does not contain the pipeline API that apps
are using.
>
> --
> David Marchand
Regard,
Cristian
@@ -714,6 +714,7 @@ cmd_pipeline_libbuild(char **tokens,
"-I %s/lib/eal/include "
"-I %s/lib/eal/x86/include "
"-I %s/lib/eal/include/generic "
+ "-I %s/lib/log "
"-I %s/lib/meter "
"-I %s/lib/port "
"-I %s/lib/table "
@@ -738,6 +739,7 @@ cmd_pipeline_libbuild(char **tokens,
install_dir,
install_dir,
install_dir,
+ install_dir,
log_file,
obj_file,
lib_file,