Skip to contentSkip to conversation

app/regex: configure qp according to device capabilities

PATCH Applied [email protected] 4 participants 6 messages Oct 20, 2020 – Nov 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/regex: configure qp according to device capabilities

From: Guy Kaneti <[email protected]>

configure qp with OOS according to device capabilities returned from rte_regexdev_info_get.

---
 app/test-regex/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-regex/main.c +3 -1
index e6080b44b..3deaf3c80 100644
@@ -173,7 +173,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 = 0,
 	};
 	int res = 0;
 
@@ -218,6 +218,8 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,
 			printf("Error, can't configure device %d.\n", id);
 			goto error;
 		}
+		if (info.regexdev_capa & RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F)
+			qp_conf.qp_conf_flags |= RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
 		res = rte_regexdev_queue_pair_setup(id, 0, &qp_conf);
 		if (res < 0) {
 			printf("Error, can't setup queue pair for device %d.\n",
Signature · 1 line
2.28.0
Acked-by on v1 1/1
#1 lore raw

Hi Guy,

Quoted 42 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, October 20, 2020 12:10 PM
Subject: [PATCH v1] app/regex: configure qp according to device capabilities

From: Guy Kaneti <[email protected]>

configure qp with OOS according to device capabilities returned from rte_regexdev_info_get.

---
 app/test-regex/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-regex/main.c +3 -1
index e6080b44b..3deaf3c80 100644
@@ -173,7 +173,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 = 0,
 	};
 	int res = 0;
@@ -218,6 +218,8 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t
 nb_jobs,
 			printf("Error, can't configure device %d.\n", id);
 			goto error;
 		}
+		if (info.regexdev_capa &
 RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F)
+			qp_conf.qp_conf_flags |=
 RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
app/test-regex/main.c +0 -1
 		res = rte_regexdev_queue_pair_setup(id, 0, &qp_conf);
 		if (res < 0) {
 			printf("Error, can't setup queue pair for device %d.\n",
--
Quoted 1 line

2.28.0

Best,
Ori

#2 lore raw

Hi Guy,
I could not find RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F defined in latest dpdk/main. As a result my compilation is broken. Can you please assist?

Regards,
Ophir

Quoted 63 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ori Kam
Sent: Tuesday, October 20, 2020 12:14 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v1] app/regex: configure qp according to device capabilities

Hi Guy,

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp,

Quoted 21 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, October 20, 2020 12:10 PM
Subject: [PATCH v1] app/regex: configure qp according to device capabilities

From: Guy Kaneti <[email protected]>

configure qp with OOS according to device capabilities returned from rte_regexdev_info_get.

---
 app/test-regex/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-regex/main.c index renamed from app/test-regex/main.c +0 -0

e6080b44b..3deaf3c80 100644

app/test-regex/main.c +0 -0
@@ -173,7 +173,7 @@ init_port(struct rte_mempool **mbuf_mp,

uint32_t

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp,

Quoted 10 lines
app/test-regex/main.c +1 -1
 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 = 0,
 	};
 	int res = 0;
@@ -218,6 +218,8 @@ init_port(struct rte_mempool **mbuf_mp,

uint32_t

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,

Quoted 11 lines
app/test-regex/main.c +2 -0
 nb_jobs,
 			printf("Error, can't configure device %d.\n", id);
 			goto error;
 		}
+		if (info.regexdev_capa &
 RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F)
+			qp_conf.qp_conf_flags |=
 RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
app/test-regex/main.c +0 -0
 		res = rte_regexdev_queue_pair_setup(id, 0, &qp_conf);
 		if (res < 0) {
 			printf("Error, can't setup queue pair for device

%d.\n",

Quoted 2 lines

--
2.28.0

Best,
Ori

#3 lore raw

Please ignore.
Now I notice it in a follow up commit.
http://patches.dpdk.org/patch/81673/

Quoted 17 lines

-----Original Message-----
From: Ophir Munk
Sent: Thursday, October 22, 2020 1:53 PM
To: Ori Kam <[email protected]>; [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH v1] app/regex: configure qp according to device capabilities

Hi Guy,
I could not find RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F defined in latest dpdk/main. As a result my compilation is broken.
Can you please assist?

Regards,
Ophir

author
#4 lore raw
In reply to Ophir Munk

Hi,

The patch was not merged yet:
https://patches.dpdk.org/patch/81673/

I will rebase this patch once it is merged.

Regards,
Guy

Quoted 84 lines

-----Original Message-----
From: Ophir Munk <[email protected]>
Sent: Thursday, October 22, 2020 1:53 PM
To: Ori Kam <[email protected]>; Guy Kaneti <[email protected]>
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Smadar Fuks <[email protected]>; Dovrat Zifroni <[email protected]>; [email protected]
Subject: [EXT] RE: [PATCH v1] app/regex: configure qp according to device capabilities

External Email

----------------------------------------------------------------------
Hi Guy,
I could not find RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F defined in latest dpdk/main. As a result my compilation is broken. Can you please assist?

Regards,
Ophir

Quoted 63 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Ori Kam
Sent: Tuesday, October 20, 2020 12:14 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v1] app/regex: configure qp according to device capabilities

Hi Guy,

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp,

Quoted 21 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, October 20, 2020 12:10 PM
Subject: [PATCH v1] app/regex: configure qp according to device capabilities

From: Guy Kaneti <[email protected]>

configure qp with OOS according to device capabilities returned from rte_regexdev_info_get.

---
 app/test-regex/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-regex/main.c index renamed from app/test-regex/main.c +0 -0

e6080b44b..3deaf3c80 100644

app/test-regex/main.c +0 -0
@@ -173,7 +173,7 @@ init_port(struct rte_mempool **mbuf_mp,

uint32_t

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp,

Quoted 10 lines
app/test-regex/main.c +1 -1
 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 = 0,
 	};
 	int res = 0;
@@ -218,6 +218,8 @@ init_port(struct rte_mempool **mbuf_mp,

uint32_t

app/test-regex/main.c init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs,

Quoted 11 lines
app/test-regex/main.c +2 -0
 nb_jobs,
 			printf("Error, can't configure device %d.\n", id);
 			goto error;
 		}
+		if (info.regexdev_capa &
 RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F)
+			qp_conf.qp_conf_flags |=
 RTE_REGEX_QUEUE_PAIR_CFG_OOS_F;
app/test-regex/main.c +0 -0
 		res = rte_regexdev_queue_pair_setup(id, 0, &qp_conf);
 		if (res < 0) {
 			printf("Error, can't setup queue pair for device

%d.\n",

Quoted 2 lines

--
2.28.0

Best,
Ori