[v3,10/10] test/bbdev: update python script parameters

Message ID 20231103233413.756110-11-nicolas.chautru@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series test-bbdev changes for 23.11 |

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/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional 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-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Chautru, Nicolas Nov. 3, 2023, 11:34 p.m. UTC
  Update the timeout argument and default values.
Update EAL help message and default value.
Add iter_max and snr arguments.
Until next release we keep -t as a possible command-line argument
for time-out, until -t becomes the argument for iter-max
so that to match the binary command-line argument.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 app/test-bbdev/test-bbdev.py     | 26 +++++++++++++++++++++++---
 app/test-bbdev/test_bbdev_perf.c |  2 +-
 2 files changed, 24 insertions(+), 4 deletions(-)
  

Comments

Maxime Coquelin Nov. 9, 2023, 10:16 a.m. UTC | #1
On 11/4/23 00:34, Nicolas Chautru wrote:
> +# This will become -t option for iter_max in next release
> +parser.add_argument("-x", "--iter-max",
> +                    type=int,
> +                    help="Max iterations",
> +                    default=6)

No need for "-x", it is possible to only have the long name:

parser.add_argument("--iter-max",
                     type=int,
                     help="Max iterations",
                     default=6)

If that works for you, I can do the change while applying.

Regards,
Maxime
  
Chautru, Nicolas Nov. 9, 2023, 3:37 p.m. UTC | #2
OK with me Maxime, thanks. 

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Thursday, November 9, 2023 2:16 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org
> Cc: hemant.agrawal@nxp.com; Marchand, David
> <david.marchand@redhat.com>; Vargas, Hernan
> <hernan.vargas@intel.com>; stable@dpdk.org
> Subject: Re: [PATCH v3 10/10] test/bbdev: update python script parameters
> 
> 
> 
> On 11/4/23 00:34, Nicolas Chautru wrote:
> > +# This will become -t option for iter_max in next release
> > +parser.add_argument("-x", "--iter-max",
> > +                    type=int,
> > +                    help="Max iterations",
> > +                    default=6)
> 
> No need for "-x", it is possible to only have the long name:
> 
> parser.add_argument("--iter-max",
>                      type=int,
>                      help="Max iterations",
>                      default=6)
> 
> If that works for you, I can do the change while applying.
> 
> Regards,
> Maxime
  

Patch

diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
index 02c678a360..463de9ce05 100755
--- a/app/test-bbdev/test-bbdev.py
+++ b/app/test-bbdev/test-bbdev.py
@@ -25,12 +25,18 @@  def kill(process):
                     help="specifies path to the bbdev test app",
                     default=dpdk_path + "/" + dpdk_target + "/app/dpdk-test-bbdev")
 parser.add_argument("-e", "--eal-params",
-                    help="EAL arguments which are passed to the test app",
-                    default="--vdev=baseband_null0")
+                    help="EAL arguments which must be passed to the test app",
+                    default="--vdev=baseband_null0 -a00:00.0")
+# Until deprecated in next release keep -t as an valid argument for timeout, then use -T
 parser.add_argument("-t", "--timeout",
                     type=int,
                     help="Timeout in seconds",
-                    default=300)
+                    default=600)
+# This will become -t option for iter_max in next release
+parser.add_argument("-x", "--iter-max",
+                    type=int,
+                    help="Max iterations",
+                    default=6)
 parser.add_argument("-c", "--test-cases",
                     nargs="+",
                     help="Defines test cases to run. Run all if not specified")
@@ -48,6 +54,10 @@  def kill(process):
                     type=int,
                     help="Operations enqueue/dequeue burst size.",
                     default=[32])
+parser.add_argument("-s", "--snr",
+                    type=int,
+                    help="SNR in dB for BLER tests",
+                    default=0)
 parser.add_argument("-l", "--num-lcores",
                     type=int,
                     help="Number of lcores to run.",
@@ -68,6 +78,16 @@  def kill(process):
 
 params.extend(["--"])
 
+if args.snr:
+    params.extend(["-s", str(args.snr)])
+
+if args.iter_max:
+    params.extend(["-t", str(args.iter_max)])
+    print("The argument for iter_max will be -t in next release")
+
+if args.timeout:
+    print("The argument for timeout will be -T in next release")
+
 if args.num_ops:
     params.extend(["-n", str(args.num_ops)])
 
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 426c24a536..67cd429cef 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -26,7 +26,7 @@ 
 
 #define MAX_QUEUES RTE_MAX_LCORE
 #define TEST_REPETITIONS 100
-#define TIME_OUT_POLL 1e8
+#define TIME_OUT_POLL 1e9
 #define WAIT_OFFLOAD_US 1000
 
 #ifdef RTE_BASEBAND_FPGA_LTE_FEC