All of lore.kernel.org
 help / color / mirror / Atom feed
From: <guyk@marvell.com>
To: <orika@nvidia.com>
Cc: <thomas@monjalon.net>, <guyk@marvell.com>, <smadarf@marvell.com>,
	<dovrat@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v1] app/regex: configure qp according to device capabilities
Date: Tue, 20 Oct 2020 12:10:08 +0300	[thread overview]
Message-ID: <20201020091008.25537-1-guyk@marvell.com> (raw)

From: Guy Kaneti <guyk@marvell.com>

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

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

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index e6080b44b..3deaf3c80 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -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",
-- 
2.28.0


             reply	other threads:[~2020-10-20  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  9:10 guyk [this message]
2020-10-20  9:14 ` [dpdk-dev] [PATCH v1] app/regex: configure qp according to device capabilities Ori Kam
2020-10-22 10:53   ` Ophir Munk
2020-10-22 10:57     ` Ophir Munk
2020-10-22 11:12     ` Guy Kaneti
2020-11-03  0:40   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201020091008.25537-1-guyk@marvell.com \
    --to=guyk@marvell.com \
    --cc=dev@dpdk.org \
    --cc=dovrat@marvell.com \
    --cc=orika@nvidia.com \
    --cc=smadarf@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.