[V2] examples/pipeline: fix include path for rte_log.h

Message ID 20240213173809.1536955-1-cristian.dumitrescu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [V2] examples/pipeline: fix include path for rte_log.h |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Cristian Dumitrescu Feb. 13, 2024, 5:38 p.m. UTC
  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>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 2 ++
 examples/pipeline/cli.c                   | 2 ++
 2 files changed, 4 insertions(+)
  

Comments

Ferruh Yigit Feb. 14, 2024, 11:22 a.m. UTC | #1
On 2/13/2024 5:38 PM, Cristian Dumitrescu 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
> 

Hi Cristian,

How can I verify the fix? Can you please list the required steps?


And I wonder how this skipped the testing, I guess v23.11 released with
this defect. Is there a gap in the CI or internal build/test scripts?


> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
>  drivers/net/softnic/rte_eth_softnic_cli.c | 2 ++
>  examples/pipeline/cli.c                   | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
> index 085523fe03..95e705c553 100644
> --- a/drivers/net/softnic/rte_eth_softnic_cli.c
> +++ b/drivers/net/softnic/rte_eth_softnic_cli.c
> @@ -337,6 +337,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
>  		 "-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 "
> @@ -361,6 +362,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
>  		 install_dir,
>  		 install_dir,
>  		 install_dir,
> +		 install_dir,
>  		 log_file,
>  		 obj_file,
>  		 lib_file,
> 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,
  
Aaron Conole Feb. 14, 2024, 4:25 p.m. UTC | #2
Ferruh Yigit <ferruh.yigit@amd.com> writes:

> On 2/13/2024 5:38 PM, Cristian Dumitrescu 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
>> 
>
> Hi Cristian,
>
> How can I verify the fix? Can you please list the required steps?

I guess maybe (?) with the pipeline DTS case, but I'm not sure that
would be sufficient.

> And I wonder how this skipped the testing, I guess v23.11 released with
> this defect. Is there a gap in the CI or internal build/test scripts?

I don't know that softnic driver is used in the lab.  Actually, would
DTS suite even have triggered this issue?  I'm not sure if there is a
set of tests which covers the case.  Maybe Patrick can confirm about the
pipeline test?

>> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>> ---
>>  drivers/net/softnic/rte_eth_softnic_cli.c | 2 ++
>>  examples/pipeline/cli.c                   | 2 ++
>>  2 files changed, 4 insertions(+)
>> 
>> diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
>> index 085523fe03..95e705c553 100644
>> --- a/drivers/net/softnic/rte_eth_softnic_cli.c
>> +++ b/drivers/net/softnic/rte_eth_softnic_cli.c
>> @@ -337,6 +337,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
>>  		 "-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 "
>> @@ -361,6 +362,7 @@ cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
>>  		 install_dir,
>>  		 install_dir,
>>  		 install_dir,
>> +		 install_dir,
>>  		 log_file,
>>  		 obj_file,
>>  		 lib_file,
>> 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,
  
Cristian Dumitrescu Feb. 14, 2024, 5:22 p.m. UTC | #3
Hi Ferruh,

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: Wednesday, February 14, 2024 11:22 AM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Marchand, David <david.marchand@redhat.com>; Aaron
> Conole <aconole@redhat.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [PATCH V2] examples/pipeline: fix include path for rte_log.h
> 
> On 2/13/2024 5:38 PM, Cristian Dumitrescu 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
> >
> 
> Hi Cristian,
> 
> How can I verify the fix? Can you please list the required steps?
> 

Just build the examples/pipeline app and the run this app with the command line below (you can use l2fwd.cli or any other .cli file from the same folder):
	./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd.cli

If everything works, then you should:
	i) not get any error message, especially for the "pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so" line from l2fwd.cli script).
	ii) have the file "/tmp/l2fwd.so" created.
	iii) get the traffic flowing (if you have the NICs working)

Note: you would need to adjust the ethdev BFDs to those in your setup in the .cli file and the ethdev.io file from the same folder. Just read through the .cli file.

Ping me if you get into trouble.

> 
> And I wonder how this skipped the testing, I guess v23.11 released with
> this defect. Is there a gap in the CI or internal build/test scripts?
> 

Regards,
Cristian
  
Patrick Robb Feb. 14, 2024, 7:32 p.m. UTC | #4
Hi Aaron/Cristian,

On Wed, Feb 14, 2024 at 11:25 AM Aaron Conole <aconole@redhat.com> wrote:

> Ferruh Yigit <ferruh.yigit@amd.com> writes:
>
> > On 2/13/2024 5:38 PM, Cristian Dumitrescu 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
> >>
> >
> > Hi Cristian,
> >
> > How can I verify the fix? Can you please list the required steps?
>
> I guess maybe (?) with the pipeline DTS case, but I'm not sure that
> would be sufficient.
>
> > And I wonder how this skipped the testing, I guess v23.11 released with
> > this defect. Is there a gap in the CI or internal build/test scripts?
>
> I don't know that softnic driver is used in the lab.  Actually, would
> DTS suite even have triggered this issue?  I'm not sure if there is a
> set of tests which covers the case.  Maybe Patrick can confirm about the
> pipeline test?
>

So, based on what Cristian stated (passing in any of the .cli files when
starting the pipeline example app would show it is fixed), yes I assume the
DTS testsuite would have caught this, as I can see the testsuite does do
that. But, yes it's also true that the pipeline testsuites are not run at
UNH or the Intel Lab (the two labs which publicly report DTS results), so
that's how this gets through CI Testing. It is not possible (testing
capacity wise) to run every testsuite, and I don't think there has been
conversation between the lab and our vendor contacts about this specific
coverage (at least not while I've been working here).

However, based on the physical testplan requirements (4 10G tester ports to
4 10G DUT ports), we could bring the testsuite online if there is
interest(and the testsuite hasn't broken since it dropped in 2020). One of
our Intel testbeds which we run currently has exactly that NIC topology,
and it also doesn't have bad testing capacity concerns as compared to some
other testbeds. Let me know if there is an interest in this coverage and
I'll make a ticket for the team to take a look. At a minimum we could dry
run the framework on the testbed I'm thinking of and provide feedback,
which I suppose would take only a couple minutes/hours. Christian let me
know if that's a value - it's a low barrier of entry to dry run.

https://git.dpdk.org/tools/dts/tree/test_plans/pipeline_test_plan.rst
  
Cristian Dumitrescu Feb. 14, 2024, 8 p.m. UTC | #5
Hi Patrick,

See my comment below under your reply.

From: Patrick Robb <probb@iol.unh.edu> 
Sent: Wednesday, February 14, 2024 7:32 PM
To: Aaron Conole <aconole@redhat.com>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org; stable@dpdk.org; Marchand, David <david.marchand@redhat.com>; Richardson, Bruce <bruce.richardson@intel.com>
Subject: Re: [PATCH V2] examples/pipeline: fix include path for rte_log.h

Hi Aaron/Cristian,

On Wed, Feb 14, 2024 at 11:25 AM Aaron Conole <mailto:aconole@redhat.com> wrote:
Ferruh Yigit <mailto:ferruh.yigit@amd.com> writes:

> On 2/13/2024 5:38 PM, Cristian Dumitrescu 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: mailto:stable@dpdk.org
>> 
>
> Hi Cristian,
>
> How can I verify the fix? Can you please list the required steps?

I guess maybe (?) with the pipeline DTS case, but I'm not sure that
would be sufficient.

> And I wonder how this skipped the testing, I guess v23.11 released with
> this defect. Is there a gap in the CI or internal build/test scripts?

I don't know that softnic driver is used in the lab.  Actually, would
DTS suite even have triggered this issue?  I'm not sure if there is a
set of tests which covers the case.  Maybe Patrick can confirm about the
pipeline test?

So, based on what Cristian stated (passing in any of the .cli files when starting the pipeline example app would show it is fixed), yes I assume the DTS testsuite would have caught this, as I can see the testsuite does do that. But, yes it's also true that the pipeline testsuites are not run at UNH or the Intel Lab (the two labs which publicly report DTS results), so that's how this gets through CI Testing. It is not possible (testing capacity wise) to run every testsuite, and I don't think there has been conversation between the lab and our vendor contacts about this specific coverage (at least not while I've been working here).

However, based on the physical testplan requirements (4 10G tester ports to 4 10G DUT ports), we could bring the testsuite online if there is interest(and the testsuite hasn't broken since it dropped in 2020). One of our Intel testbeds which we run currently has exactly that NIC topology, and it also doesn't have bad testing capacity concerns as compared to some other testbeds. Let me know if there is an interest in this coverage and I'll make a ticket for the team to take a look. At a minimum we could dry run the framework on the testbed I'm thinking of and provide feedback, which I suppose would take only a couple minutes/hours. Christian let me know if that's a value - it's a low barrier of entry to dry run.

https://git.dpdk.org/tools/dts/tree/test_plans/pipeline_test_plan.rst


[Cristian]
Yes, you are right, we do have a DTS test suite for the pipeline library.

It would be great to run it automatically as part of the CI testing. Just a word of caution though: I am not the owner of those tests, and also not intimately familiar with them, so it might be hard to find volunteers to setup the test suite, that the only problem that I see unfortunately. But we should try and see if there are any issues at all.

Thanks,
Cristian
  
Patrick Robb Feb. 14, 2024, 8:17 p.m. UTC | #6
On Wed, Feb 14, 2024 at 3:00 PM Dumitrescu, Cristian <
cristian.dumitrescu@intel.com> wrote:

>
>
> [Cristian]
> Yes, you are right, we do have a DTS test suite for the pipeline library.
>
> It would be great to run it automatically as part of the CI testing. Just
> a word of caution though: I am not the owner of those tests, and also not
> intimately familiar with them, so it might be hard to find volunteers to
> setup the test suite, that the only problem that I see unfortunately. But
> we should try and see if there are any issues at all.
>
> Thanks,
> Cristian
>

Okay, the setup doesn't look too burdensome anyhow so we should be alright
with just the team here at UNH. I'll let you know how it goes.
  
Ferruh Yigit Feb. 15, 2024, 12:17 p.m. UTC | #7
On 2/14/2024 5:22 PM, Dumitrescu, Cristian wrote:
> Hi Ferruh,
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@amd.com>
>> Sent: Wednesday, February 14, 2024 11:22 AM
>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org
>> Cc: stable@dpdk.org; Marchand, David <david.marchand@redhat.com>; Aaron
>> Conole <aconole@redhat.com>; Richardson, Bruce
>> <bruce.richardson@intel.com>
>> Subject: Re: [PATCH V2] examples/pipeline: fix include path for rte_log.h
>>
>> On 2/13/2024 5:38 PM, Cristian Dumitrescu 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
>>>
>>
>> Hi Cristian,
>>
>> How can I verify the fix? Can you please list the required steps?
>>
> 
> Just build the examples/pipeline app and the run this app with the command line below (you can use l2fwd.cli or any other .cli file from the same folder):
> 	./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/l2fwd.cli
> 
> If everything works, then you should:
> 	i) not get any error message, especially for the "pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so" line from l2fwd.cli script).
> 	ii) have the file "/tmp/l2fwd.so" created.
> 	iii) get the traffic flowing (if you have the NICs working)
> 
> Note: you would need to adjust the ethdev BFDs to those in your setup in the .cli file and the ethdev.io file from the same folder. Just read through the .cli file.
> 

Thanks, I just tested the /tmp/l2fwd.so build, and confirmed the fix.

But it is hard to script this testcase. If 'dpdk-pipeline' exits with
failure when building ' /tmp/l2fwd.so' fails, at least this can be
tested easier in a script, does this make sense?
  
Ferruh Yigit Feb. 15, 2024, 1:32 p.m. UTC | #8
On 2/13/2024 5:38 PM, Cristian Dumitrescu 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>
> 

Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>


Patch has both net/softnic and examples/pipeline update, since update is
trivial and for exact same issue, instead of requesting a patch split I
am getting it directly to next-net to not create more overhead.

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c
index 085523fe03..95e705c553 100644
--- a/drivers/net/softnic/rte_eth_softnic_cli.c
+++ b/drivers/net/softnic/rte_eth_softnic_cli.c
@@ -337,6 +337,7 @@  cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
 		 "-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 "
@@ -361,6 +362,7 @@  cmd_softnic_pipeline_libbuild(struct pmd_internals *softnic __rte_unused,
 		 install_dir,
 		 install_dir,
 		 install_dir,
+		 install_dir,
 		 log_file,
 		 obj_file,
 		 lib_file,
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,