From: Gerry Gribbon <ggribbon@nvidia.com>
To: <dev@dpdk.org>
Cc: <jamhunter@nvidia.com>, <ggribbon@nvidia.com>,
Ori Kam <orika@nvidia.com>
Subject: [PATCH] regex/mlx5: add check for nb max matches
Date: Thu, 1 Sep 2022 08:28:02 +0000 [thread overview]
Message-ID: <20220901082802.2434855-1-ggribbon@nvidia.com> (raw)
Added check so user gets error if they try to configure the
nb_max_matches value when using rte_regexdev_configure().
Signed-off-by: Gerry Gribbon <ggribbon@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
drivers/regex/mlx5/mlx5_rxp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c
index ed3af15e40..47d32b7dd7 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -144,6 +144,11 @@ mlx5_regex_configure(struct rte_regexdev *dev,
if (priv->prog_mode == MLX5_RXP_MODE_NOT_DEFINED)
return -1;
+ if (cfg->nb_max_matches != MLX5_REGEX_MAX_MATCHES) {
+ DRV_LOG(ERR, "nb_max_matches is not configurable.");
+ rte_errno = EINVAL;
+ return -rte_errno;
+ }
priv->nb_queues = cfg->nb_queue_pairs;
dev->data->dev_conf.nb_queue_pairs = priv->nb_queues;
priv->qps = rte_zmalloc(NULL, sizeof(struct mlx5_regex_qp) *
--
2.25.1
next reply other threads:[~2022-09-01 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 8:28 Gerry Gribbon [this message]
2022-10-09 14:35 ` 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=20220901082802.2434855-1-ggribbon@nvidia.com \
--to=ggribbon@nvidia.com \
--cc=dev@dpdk.org \
--cc=jamhunter@nvidia.com \
--cc=orika@nvidia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).