DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/regex: change default qp configuration flags
@ 2020-10-19  9:26 guyk
  2020-10-19  9:26 ` [dpdk-dev] [PATCH v1] " guyk
  2020-10-19  9:30 ` [dpdk-dev] [PATCH] " Guy Kaneti
  0 siblings, 2 replies; 6+ messages in thread
From: guyk @ 2020-10-19  9:26 UTC (permalink / raw)
  To: orika; +Cc: thomas, guyk, smadarf, dev

From: Guy Kaneti <guyk@marvell.com>

added --cfg_oos argument to config queue
pair out of order scan

Signed-off-by: Guy Kaneti <guyk@marvell.com>
---
 app/test-regex/main.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 0d35f4583..9b19031ea 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -33,6 +33,7 @@ enum app_args {
 	ARG_NUM_OF_JOBS,
 	ARG_PERF_MODE,
 	ARG_NUM_OF_ITERATIONS,
+	ARG_CFG_OOS,
 };
 
 static void
@@ -43,13 +44,15 @@ usage(const char *prog_name)
 		" --data NAME: data file to use\n"
 		" --nb_jobs: number of jobs to use\n"
 		" --perf N: only outputs the performance data\n"
-		" --nb_iter N: number of iteration to run\n",
+		" --nb_iter N: number of iteration to run\n"
+		" --cfg_oos: configure regexdev queue flag out of order scan\n",
 		prog_name);
 }
 
 static void
 args_parse(int argc, char **argv, char *rules_file, char *data_file,
-	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
+	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
+	   uint32_t *qp_conf_flags)
 {
 	char **argvopt;
 	int opt;
@@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
 		/* Perf test only */
 		{ "perf", 0, 0, ARG_PERF_MODE},
 		/* Number of iterations to run with perf test */
-		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
+		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
+		/* configure out of order scan */
+		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
 	};
 
 	argvopt = argv;
@@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
 		case ARG_NUM_OF_ITERATIONS:
 			*nb_iterations = atoi(optarg);
 			break;
+		case ARG_CFG_OOS:
+			*qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
+			break;
 		case ARG_HELP:
 			usage("RegEx test app");
 			break;
@@ -158,7 +166,8 @@ read_file(char *file, char **buf)
 
 static int
 init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
-	  uint16_t *nb_max_payload, char *rules_file, uint8_t *nb_max_matches)
+	  uint16_t *nb_max_payload, char *rules_file, uint8_t *nb_max_matches,
+	  uint32_t qp_conf_flags)
 {
 	uint16_t id;
 	uint16_t num_devs;
@@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
 	};
 	struct rte_regexdev_qp_conf qp_conf = {
 		.nb_desc = 1024,
-		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
+		.qp_conf_flags = qp_conf_flags,
 	};
 	int res = 0;
 
@@ -407,6 +416,7 @@ main(int argc, char **argv)
 	bool perf_mode = 0;
 	uint32_t nb_iterations = 0;
 	uint8_t nb_max_matches = 0;
+	uint32_t qp_conf_flags = 0;
 	int ret;
 
 	ret = rte_eal_init(argc, argv);
@@ -416,10 +426,10 @@ main(int argc, char **argv)
 	argv += ret;
 	if (argc > 1)
 		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
-			   &perf_mode, &nb_iterations);
+			   &perf_mode, &nb_iterations, &qp_conf_flags);
 
 	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
-			&nb_max_matches);
+			&nb_max_matches, qp_conf_flags);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "init port failed\n");
 	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
-- 
2.28.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v1] app/regex: change default qp configuration flags
  2020-10-19  9:26 [dpdk-dev] [PATCH] app/regex: change default qp configuration flags guyk
@ 2020-10-19  9:26 ` guyk
  2020-10-19 15:03   ` Ori Kam
  2020-10-19  9:30 ` [dpdk-dev] [PATCH] " Guy Kaneti
  1 sibling, 1 reply; 6+ messages in thread
From: guyk @ 2020-10-19  9:26 UTC (permalink / raw)
  To: orika; +Cc: thomas, guyk, smadarf, dev

From: Guy Kaneti <guyk@marvell.com>

By default qp configuration flags was set with
RTE_REGEX_QUEUE_PAIR_CFG_OOS_F.
Changed flags default to 0. In order to set OOS flag use
new argument --cfg_oos to config queue pair out of order scan.

Signed-off-by: Guy Kaneti <guyk@marvell.com>
---
 app/test-regex/main.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 0d35f4583..9b19031ea 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -33,6 +33,7 @@ enum app_args {
 	ARG_NUM_OF_JOBS,
 	ARG_PERF_MODE,
 	ARG_NUM_OF_ITERATIONS,
+	ARG_CFG_OOS,
 };
 
 static void
@@ -43,13 +44,15 @@ usage(const char *prog_name)
 		" --data NAME: data file to use\n"
 		" --nb_jobs: number of jobs to use\n"
 		" --perf N: only outputs the performance data\n"
-		" --nb_iter N: number of iteration to run\n",
+		" --nb_iter N: number of iteration to run\n"
+		" --cfg_oos: configure regexdev queue flag out of order scan\n",
 		prog_name);
 }
 
 static void
 args_parse(int argc, char **argv, char *rules_file, char *data_file,
-	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
+	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
+	   uint32_t *qp_conf_flags)
 {
 	char **argvopt;
 	int opt;
@@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
 		/* Perf test only */
 		{ "perf", 0, 0, ARG_PERF_MODE},
 		/* Number of iterations to run with perf test */
-		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
+		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
+		/* configure out of order scan */
+		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
 	};
 
 	argvopt = argv;
@@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
 		case ARG_NUM_OF_ITERATIONS:
 			*nb_iterations = atoi(optarg);
 			break;
+		case ARG_CFG_OOS:
+			*qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
+			break;
 		case ARG_HELP:
 			usage("RegEx test app");
 			break;
@@ -158,7 +166,8 @@ read_file(char *file, char **buf)
 
 static int
 init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
-	  uint16_t *nb_max_payload, char *rules_file, uint8_t *nb_max_matches)
+	  uint16_t *nb_max_payload, char *rules_file, uint8_t *nb_max_matches,
+	  uint32_t qp_conf_flags)
 {
 	uint16_t id;
 	uint16_t num_devs;
@@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
 	};
 	struct rte_regexdev_qp_conf qp_conf = {
 		.nb_desc = 1024,
-		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
+		.qp_conf_flags = qp_conf_flags,
 	};
 	int res = 0;
 
@@ -407,6 +416,7 @@ main(int argc, char **argv)
 	bool perf_mode = 0;
 	uint32_t nb_iterations = 0;
 	uint8_t nb_max_matches = 0;
+	uint32_t qp_conf_flags = 0;
 	int ret;
 
 	ret = rte_eal_init(argc, argv);
@@ -416,10 +426,10 @@ main(int argc, char **argv)
 	argv += ret;
 	if (argc > 1)
 		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
-			   &perf_mode, &nb_iterations);
+			   &perf_mode, &nb_iterations, &qp_conf_flags);
 
 	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
-			&nb_max_matches);
+			&nb_max_matches, qp_conf_flags);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "init port failed\n");
 	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
-- 
2.28.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] app/regex: change default qp configuration flags
  2020-10-19  9:26 [dpdk-dev] [PATCH] app/regex: change default qp configuration flags guyk
  2020-10-19  9:26 ` [dpdk-dev] [PATCH v1] " guyk
@ 2020-10-19  9:30 ` Guy Kaneti
  1 sibling, 0 replies; 6+ messages in thread
From: Guy Kaneti @ 2020-10-19  9:30 UTC (permalink / raw)
  To: orika; +Cc: thomas, Smadar Fuks, dev

Please Ignore this patch, it was sent by mistake
v1 is the correct one

> -----Original Message-----
> From: guyk@marvell.com <guyk@marvell.com>
> Sent: Monday, October 19, 2020 12:26 PM
> To: orika@mellanox.com
> Cc: thomas@monjalon.net; Guy Kaneti <guyk@marvell.com>; Smadar Fuks
> <smadarf@marvell.com>; dev@dpdk.org
> Subject: [PATCH] app/regex: change default qp configuration flags
> 
> From: Guy Kaneti <guyk@marvell.com>
> 
> added --cfg_oos argument to config queue pair out of order scan
> 
> Signed-off-by: Guy Kaneti <guyk@marvell.com>
> ---
>  app/test-regex/main.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/app/test-regex/main.c b/app/test-regex/main.c index
> 0d35f4583..9b19031ea 100644
> --- a/app/test-regex/main.c
> +++ b/app/test-regex/main.c
> @@ -33,6 +33,7 @@ enum app_args {
>  	ARG_NUM_OF_JOBS,
>  	ARG_PERF_MODE,
>  	ARG_NUM_OF_ITERATIONS,
> +	ARG_CFG_OOS,
>  };
> 
>  static void
> @@ -43,13 +44,15 @@ usage(const char *prog_name)
>  		" --data NAME: data file to use\n"
>  		" --nb_jobs: number of jobs to use\n"
>  		" --perf N: only outputs the performance data\n"
> -		" --nb_iter N: number of iteration to run\n",
> +		" --nb_iter N: number of iteration to run\n"
> +		" --cfg_oos: configure regexdev queue flag out of order
> scan\n",
>  		prog_name);
>  }
> 
>  static void
>  args_parse(int argc, char **argv, char *rules_file, char *data_file,
> -	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
> +	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
> +	   uint32_t *qp_conf_flags)
>  {
>  	char **argvopt;
>  	int opt;
> @@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file, char
> *data_file,
>  		/* Perf test only */
>  		{ "perf", 0, 0, ARG_PERF_MODE},
>  		/* Number of iterations to run with perf test */
> -		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
> +		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
> +		/* configure out of order scan */
> +		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
>  	};
> 
>  	argvopt = argv;
> @@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file, char
> *data_file,
>  		case ARG_NUM_OF_ITERATIONS:
>  			*nb_iterations = atoi(optarg);
>  			break;
> +		case ARG_CFG_OOS:
> +			*qp_conf_flags =
> RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
> +			break;
>  		case ARG_HELP:
>  			usage("RegEx test app");
>  			break;
> @@ -158,7 +166,8 @@ read_file(char *file, char **buf)
> 
>  static int
>  init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
> -	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> *nb_max_matches)
> +	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> *nb_max_matches,
> +	  uint32_t qp_conf_flags)
>  {
>  	uint16_t id;
>  	uint16_t num_devs;
> @@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t
> nb_jobs,
>  	};
>  	struct rte_regexdev_qp_conf qp_conf = {
>  		.nb_desc = 1024,
> -		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
> +		.qp_conf_flags = qp_conf_flags,
>  	};
>  	int res = 0;
> 
> @@ -407,6 +416,7 @@ main(int argc, char **argv)
>  	bool perf_mode = 0;
>  	uint32_t nb_iterations = 0;
>  	uint8_t nb_max_matches = 0;
> +	uint32_t qp_conf_flags = 0;
>  	int ret;
> 
>  	ret = rte_eal_init(argc, argv);
> @@ -416,10 +426,10 @@ main(int argc, char **argv)
>  	argv += ret;
>  	if (argc > 1)
>  		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
> -			   &perf_mode, &nb_iterations);
> +			   &perf_mode, &nb_iterations, &qp_conf_flags);
> 
>  	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
> -			&nb_max_matches);
> +			&nb_max_matches, qp_conf_flags);
>  	if (ret < 0)
>  		rte_exit(EXIT_FAILURE, "init port failed\n");
>  	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
> --
> 2.28.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/regex: change default qp configuration flags
  2020-10-19  9:26 ` [dpdk-dev] [PATCH v1] " guyk
@ 2020-10-19 15:03   ` Ori Kam
  2020-10-19 17:12     ` Guy Kaneti
  0 siblings, 1 reply; 6+ messages in thread
From: Ori Kam @ 2020-10-19 15:03 UTC (permalink / raw)
  To: guyk, orika; +Cc: NBU-Contact-Thomas Monjalon, smadarf, dev

Hi Guy,

> -----Original Message-----
> From: guyk@marvell.com <guyk@marvell.com>
> Sent: Monday, October 19, 2020 12:27 PM
> Subject: [PATCH v1] app/regex: change default qp configuration flags
> 
> From: Guy Kaneti <guyk@marvell.com>
> 
> By default qp configuration flags was set with
> RTE_REGEX_QUEUE_PAIR_CFG_OOS_F.
> Changed flags default to 0. In order to set OOS flag use
> new argument --cfg_oos to config queue pair out of order scan.
> 
> Signed-off-by: Guy Kaneti <guyk@marvell.com>
> ---
>  app/test-regex/main.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/app/test-regex/main.c b/app/test-regex/main.c
> index 0d35f4583..9b19031ea 100644
> --- a/app/test-regex/main.c
> +++ b/app/test-regex/main.c
> @@ -33,6 +33,7 @@ enum app_args {
>  	ARG_NUM_OF_JOBS,
>  	ARG_PERF_MODE,
>  	ARG_NUM_OF_ITERATIONS,
> +	ARG_CFG_OOS,
>  };
> 
>  static void
> @@ -43,13 +44,15 @@ usage(const char *prog_name)
>  		" --data NAME: data file to use\n"
>  		" --nb_jobs: number of jobs to use\n"
>  		" --perf N: only outputs the performance data\n"
> -		" --nb_iter N: number of iteration to run\n",
> +		" --nb_iter N: number of iteration to run\n"
> +		" --cfg_oos: configure regexdev queue flag out of order
> scan\n",
>  		prog_name);
>  }
> 
>  static void
>  args_parse(int argc, char **argv, char *rules_file, char *data_file,
> -	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
> +	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
> +	   uint32_t *qp_conf_flags)
>  {
>  	char **argvopt;
>  	int opt;
> @@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file, char
> *data_file,
>  		/* Perf test only */
>  		{ "perf", 0, 0, ARG_PERF_MODE},
>  		/* Number of iterations to run with perf test */
> -		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
> +		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
> +		/* configure out of order scan */
> +		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
>  	};
> 
>  	argvopt = argv;
> @@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file, char
> *data_file,
>  		case ARG_NUM_OF_ITERATIONS:
>  			*nb_iterations = atoi(optarg);
>  			break;
> +		case ARG_CFG_OOS:
> +			*qp_conf_flags =
> RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
> +			break;
>  		case ARG_HELP:
>  			usage("RegEx test app");
>  			break;
> @@ -158,7 +166,8 @@ read_file(char *file, char **buf)
> 
>  static int
>  init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
> -	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> *nb_max_matches)
> +	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> *nb_max_matches,
> +	  uint32_t qp_conf_flags)
>  {
>  	uint16_t id;
>  	uint16_t num_devs;
> @@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t
> nb_jobs,
>  	};
>  	struct rte_regexdev_qp_conf qp_conf = {
>  		.nb_desc = 1024,
> -		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
> +		.qp_conf_flags = qp_conf_flags,
>  	};
>  	int res = 0;
> 
> @@ -407,6 +416,7 @@ main(int argc, char **argv)
>  	bool perf_mode = 0;
>  	uint32_t nb_iterations = 0;
>  	uint8_t nb_max_matches = 0;
> +	uint32_t qp_conf_flags = 0;
>  	int ret;
> 
>  	ret = rte_eal_init(argc, argv);
> @@ -416,10 +426,10 @@ main(int argc, char **argv)
>  	argv += ret;
>  	if (argc > 1)
>  		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
> -			   &perf_mode, &nb_iterations);
> +			   &perf_mode, &nb_iterations, &qp_conf_flags);
> 
>  	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
> -			&nb_max_matches);
> +			&nb_max_matches, qp_conf_flags);
>  	if (ret < 0)
>  		rte_exit(EXIT_FAILURE, "init port failed\n");
>  	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
> --
> 2.28.0

General comment I think we should add 
capability to the rte_regexdev to check if the PMD support 
OOF. and have the default based on this capability.

Best,
Ori

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/regex: change default qp configuration flags
  2020-10-19 15:03   ` Ori Kam
@ 2020-10-19 17:12     ` Guy Kaneti
  2020-10-20  5:59       ` Ori Kam
  0 siblings, 1 reply; 6+ messages in thread
From: Guy Kaneti @ 2020-10-19 17:12 UTC (permalink / raw)
  To: Ori Kam; +Cc: NBU-Contact-Thomas Monjalon, Smadar Fuks, dev

Hi Ori,


> -----Original Message-----
> From: Ori Kam <orika@nvidia.com>
> Sent: Monday, October 19, 2020 6:03 PM
> To: Guy Kaneti <guyk@marvell.com>; orika@mellanox.com
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Smadar Fuks
> <smadarf@marvell.com>; dev@dpdk.org
> Subject: [EXT] RE: [PATCH v1] app/regex: change default qp configuration
> flags
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Guy,
> 
> > -----Original Message-----
> > From: guyk@marvell.com <guyk@marvell.com>
> > Sent: Monday, October 19, 2020 12:27 PM
> > Subject: [PATCH v1] app/regex: change default qp configuration flags
> >
> > From: Guy Kaneti <guyk@marvell.com>
> >
> > By default qp configuration flags was set with
> > RTE_REGEX_QUEUE_PAIR_CFG_OOS_F.
> > Changed flags default to 0. In order to set OOS flag use new argument
> > --cfg_oos to config queue pair out of order scan.
> >
> > Signed-off-by: Guy Kaneti <guyk@marvell.com>
> > ---
> >  app/test-regex/main.c | 24 +++++++++++++++++-------
> >  1 file changed, 17 insertions(+), 7 deletions(-)
> >
> > diff --git a/app/test-regex/main.c b/app/test-regex/main.c index
> > 0d35f4583..9b19031ea 100644
> > --- a/app/test-regex/main.c
> > +++ b/app/test-regex/main.c
> > @@ -33,6 +33,7 @@ enum app_args {
> >  	ARG_NUM_OF_JOBS,
> >  	ARG_PERF_MODE,
> >  	ARG_NUM_OF_ITERATIONS,
> > +	ARG_CFG_OOS,
> >  };
> >
> >  static void
> > @@ -43,13 +44,15 @@ usage(const char *prog_name)
> >  		" --data NAME: data file to use\n"
> >  		" --nb_jobs: number of jobs to use\n"
> >  		" --perf N: only outputs the performance data\n"
> > -		" --nb_iter N: number of iteration to run\n",
> > +		" --nb_iter N: number of iteration to run\n"
> > +		" --cfg_oos: configure regexdev queue flag out of order
> > scan\n",
> >  		prog_name);
> >  }
> >
> >  static void
> >  args_parse(int argc, char **argv, char *rules_file, char *data_file,
> > -	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
> > +	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
> > +	   uint32_t *qp_conf_flags)
> >  {
> >  	char **argvopt;
> >  	int opt;
> > @@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file,
> > char *data_file,
> >  		/* Perf test only */
> >  		{ "perf", 0, 0, ARG_PERF_MODE},
> >  		/* Number of iterations to run with perf test */
> > -		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
> > +		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
> > +		/* configure out of order scan */
> > +		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
> >  	};
> >
> >  	argvopt = argv;
> > @@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file,
> > char *data_file,
> >  		case ARG_NUM_OF_ITERATIONS:
> >  			*nb_iterations = atoi(optarg);
> >  			break;
> > +		case ARG_CFG_OOS:
> > +			*qp_conf_flags =
> > RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
> > +			break;
> >  		case ARG_HELP:
> >  			usage("RegEx test app");
> >  			break;
> > @@ -158,7 +166,8 @@ read_file(char *file, char **buf)
> >
> >  static int
> >  init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
> > -	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> > *nb_max_matches)
> > +	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> > *nb_max_matches,
> > +	  uint32_t qp_conf_flags)
> >  {
> >  	uint16_t id;
> >  	uint16_t num_devs;
> > @@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp,
> uint32_t
> > nb_jobs,
> >  	};
> >  	struct rte_regexdev_qp_conf qp_conf = {
> >  		.nb_desc = 1024,
> > -		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
> > +		.qp_conf_flags = qp_conf_flags,
> >  	};
> >  	int res = 0;
> >
> > @@ -407,6 +416,7 @@ main(int argc, char **argv)
> >  	bool perf_mode = 0;
> >  	uint32_t nb_iterations = 0;
> >  	uint8_t nb_max_matches = 0;
> > +	uint32_t qp_conf_flags = 0;
> >  	int ret;
> >
> >  	ret = rte_eal_init(argc, argv);
> > @@ -416,10 +426,10 @@ main(int argc, char **argv)
> >  	argv += ret;
> >  	if (argc > 1)
> >  		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
> > -			   &perf_mode, &nb_iterations);
> > +			   &perf_mode, &nb_iterations, &qp_conf_flags);
> >
> >  	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
> > -			&nb_max_matches);
> > +			&nb_max_matches, qp_conf_flags);
> >  	if (ret < 0)
> >  		rte_exit(EXIT_FAILURE, "init port failed\n");
> >  	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
> > --
> > 2.28.0
> 
> General comment I think we should add
> capability to the rte_regexdev to check if the PMD support OOF. and have
> the default based on this capability.

I agree. 
Should it be returned by rte_regexdev_info_get()
And be defined as RTE_REGEXDEV_CAPA_ ?

> 
> Best,
> Ori

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] app/regex: change default qp configuration flags
  2020-10-19 17:12     ` Guy Kaneti
@ 2020-10-20  5:59       ` Ori Kam
  0 siblings, 0 replies; 6+ messages in thread
From: Ori Kam @ 2020-10-20  5:59 UTC (permalink / raw)
  To: Guy Kaneti; +Cc: NBU-Contact-Thomas Monjalon, Smadar Fuks, dev



> -----Original Message-----
> From: Guy Kaneti <guyk@marvell.com>
> Sent: Monday, October 19, 2020 8:12 PM
> Subject: RE: [PATCH v1] app/regex: change default qp configuration flags
> 
> Hi Ori,
> 
> 
> > -----Original Message-----
> > From: Ori Kam <orika@nvidia.com>
> > Sent: Monday, October 19, 2020 6:03 PM
> > Subject: [EXT] RE: [PATCH v1] app/regex: change default qp configuration
> > flags
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Hi Guy,
> >
> > > -----Original Message-----
> > > From: guyk@marvell.com <guyk@marvell.com>
> > > Sent: Monday, October 19, 2020 12:27 PM
> > > Subject: [PATCH v1] app/regex: change default qp configuration flags
> > >
> > > From: Guy Kaneti <guyk@marvell.com>
> > >
> > > By default qp configuration flags was set with
> > > RTE_REGEX_QUEUE_PAIR_CFG_OOS_F.
> > > Changed flags default to 0. In order to set OOS flag use new argument
> > > --cfg_oos to config queue pair out of order scan.
> > >
> > > Signed-off-by: Guy Kaneti <guyk@marvell.com>
> > > ---
> > >  app/test-regex/main.c | 24 +++++++++++++++++-------
> > >  1 file changed, 17 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/app/test-regex/main.c b/app/test-regex/main.c index
> > > 0d35f4583..9b19031ea 100644
> > > --- a/app/test-regex/main.c
> > > +++ b/app/test-regex/main.c
> > > @@ -33,6 +33,7 @@ enum app_args {
> > >  	ARG_NUM_OF_JOBS,
> > >  	ARG_PERF_MODE,
> > >  	ARG_NUM_OF_ITERATIONS,
> > > +	ARG_CFG_OOS,
> > >  };
> > >
> > >  static void
> > > @@ -43,13 +44,15 @@ usage(const char *prog_name)
> > >  		" --data NAME: data file to use\n"
> > >  		" --nb_jobs: number of jobs to use\n"
> > >  		" --perf N: only outputs the performance data\n"
> > > -		" --nb_iter N: number of iteration to run\n",
> > > +		" --nb_iter N: number of iteration to run\n"
> > > +		" --cfg_oos: configure regexdev queue flag out of order
> > > scan\n",
> > >  		prog_name);
> > >  }
> > >
> > >  static void
> > >  args_parse(int argc, char **argv, char *rules_file, char *data_file,
> > > -	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations)
> > > +	   uint32_t *nb_jobs, bool *perf_mode, uint32_t *nb_iterations,
> > > +	   uint32_t *qp_conf_flags)
> > >  {
> > >  	char **argvopt;
> > >  	int opt;
> > > @@ -66,7 +69,9 @@ args_parse(int argc, char **argv, char *rules_file,
> > > char *data_file,
> > >  		/* Perf test only */
> > >  		{ "perf", 0, 0, ARG_PERF_MODE},
> > >  		/* Number of iterations to run with perf test */
> > > -		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS}
> > > +		{ "nb_iter", 1, 0, ARG_NUM_OF_ITERATIONS},
> > > +		/* configure out of order scan */
> > > +		{ "cfg_oos", 0, 0, ARG_CFG_OOS}
> > >  	};
> > >
> > >  	argvopt = argv;
> > > @@ -98,6 +103,9 @@ args_parse(int argc, char **argv, char *rules_file,
> > > char *data_file,
> > >  		case ARG_NUM_OF_ITERATIONS:
> > >  			*nb_iterations = atoi(optarg);
> > >  			break;
> > > +		case ARG_CFG_OOS:
> > > +			*qp_conf_flags =
> > > RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
> > > +			break;
> > >  		case ARG_HELP:
> > >  			usage("RegEx test app");
> > >  			break;
> > > @@ -158,7 +166,8 @@ read_file(char *file, char **buf)
> > >
> > >  static int
> > >  init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
> > > -	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> > > *nb_max_matches)
> > > +	  uint16_t *nb_max_payload, char *rules_file, uint8_t
> > > *nb_max_matches,
> > > +	  uint32_t qp_conf_flags)
> > >  {
> > >  	uint16_t id;
> > >  	uint16_t num_devs;
> > > @@ -171,7 +180,7 @@ init_port(struct rte_mempool **mbuf_mp,
> > uint32_t
> > > nb_jobs,
> > >  	};
> > >  	struct rte_regexdev_qp_conf qp_conf = {
> > >  		.nb_desc = 1024,
> > > -		.qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F,
> > > +		.qp_conf_flags = qp_conf_flags,
> > >  	};
> > >  	int res = 0;
> > >
> > > @@ -407,6 +416,7 @@ main(int argc, char **argv)
> > >  	bool perf_mode = 0;
> > >  	uint32_t nb_iterations = 0;
> > >  	uint8_t nb_max_matches = 0;
> > > +	uint32_t qp_conf_flags = 0;
> > >  	int ret;
> > >
> > >  	ret = rte_eal_init(argc, argv);
> > > @@ -416,10 +426,10 @@ main(int argc, char **argv)
> > >  	argv += ret;
> > >  	if (argc > 1)
> > >  		args_parse(argc, argv, rules_file, data_file, &nb_jobs,
> > > -			   &perf_mode, &nb_iterations);
> > > +			   &perf_mode, &nb_iterations, &qp_conf_flags);
> > >
> > >  	ret = init_port(&mbuf_mp, nb_jobs, &nb_max_payload, rules_file,
> > > -			&nb_max_matches);
> > > +			&nb_max_matches, qp_conf_flags);
> > >  	if (ret < 0)
> > >  		rte_exit(EXIT_FAILURE, "init port failed\n");
> > >  	ret = run_regex(mbuf_mp, nb_jobs, nb_max_payload, perf_mode,
> > > --
> > > 2.28.0
> >
> > General comment I think we should add
> > capability to the rte_regexdev to check if the PMD support OOF. and have
> > the default based on this capability.
> 
> I agree.
> Should it be returned by rte_regexdev_info_get()
> And be defined as RTE_REGEXDEV_CAPA_ ?
> 
Yes this is my thinking.

> >
> > Best,
> > Ori

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-20  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19  9:26 [dpdk-dev] [PATCH] app/regex: change default qp configuration flags guyk
2020-10-19  9:26 ` [dpdk-dev] [PATCH v1] " guyk
2020-10-19 15:03   ` Ori Kam
2020-10-19 17:12     ` Guy Kaneti
2020-10-20  5:59       ` Ori Kam
2020-10-19  9:30 ` [dpdk-dev] [PATCH] " Guy Kaneti

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git