From: Timothy McDaniel <timothy.mcdaniel@intel.com>
To: jerinj@marvell.com
Cc: dev@dpdk.org, timothy.mcdaniel@intel.com
Subject: [PATCH v3 3/5] event/dlb2: fix cq depth override
Date: Sat, 2 Jul 2022 11:22:37 -0500 [thread overview]
Message-ID: <20220702162239.1646548-4-timothy.mcdaniel@intel.com> (raw)
In-Reply-To: <20220702162239.1646548-1-timothy.mcdaniel@intel.com>
This commit fixes a bug, where we could assign a cq depth
of zero, leading to a subsequent divide-by-zero fault.
It also fixes an issue where the original default cq depth
was returned on a query, insgtead of the overridden value.
Fixes: 86fe66d45667 ("event/dlb2: allow CQ depths up to 1024")
Cc: timothy.mcdaniel@intel.com
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
drivers/event/dlb2/dlb2.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index a6182a1ac7..b50cd8e5ce 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4505,7 +4505,14 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
dlb2->hw_credit_quanta = dlb2_args->hw_credit_quanta;
dlb2->default_depth_thresh = dlb2_args->default_depth_thresh;
dlb2->vector_opts_enabled = dlb2_args->vector_opts_enabled;
- dlb2->max_cq_depth = dlb2_args->max_cq_depth;
+
+
+ if (dlb2_args->max_cq_depth != 0)
+ dlb2->max_cq_depth = dlb2_args->max_cq_depth;
+ else
+ dlb2->max_cq_depth = DLB2_DEFAULT_CQ_DEPTH;
+
+ evdev_dlb2_default_info.max_event_port_dequeue_depth = dlb2->max_cq_depth;
err = dlb2_iface_open(&dlb2->qm_instance, name);
if (err < 0) {
--
2.25.1
next prev parent reply other threads:[~2022-07-02 16:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 15:36 [PATCH 0/2] DLB2 Bug Fixes Timothy McDaniel
2022-06-29 15:36 ` [PATCH 1/2] event/dlb2: fix port_cos array sizing Timothy McDaniel
2022-06-29 15:36 ` [PATCH 2/2] event/dlb2: Fix initialization of cos bandwidth args Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 0/5] DLB2 Bug Fixes Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 1/5] event/dlb2: fix port_cos array sizing Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 2/5] event/dlb2: fix initialization of cos bandwidth args Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 3/5] event/dlb2: fix cq depth override Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 4/5] event/dlb2: fix cq depth override credit deadlock Timothy McDaniel
2022-07-02 16:03 ` [PATCH v2 5/5] event/dlb2: fix port COS initialization Timothy McDaniel
2022-07-02 16:22 ` [PATCH v3 0/5] DLB2 Bug Fixes Timothy McDaniel
2022-07-02 16:22 ` [PATCH v3 1/5] event/dlb2: fix port_cos array sizing Timothy McDaniel
2022-07-02 16:22 ` [PATCH v3 2/5] event/dlb2: fix initialization of cos bandwidth args Timothy McDaniel
2022-07-02 16:22 ` Timothy McDaniel [this message]
2022-07-02 16:22 ` [PATCH v3 4/5] event/dlb2: fix cq depth override credit deadlock Timothy McDaniel
2022-07-02 16:22 ` [PATCH v3 5/5] event/dlb2: fix port COS initialization Timothy McDaniel
2022-07-04 16:11 ` Jerin Jacob
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=20220702162239.1646548-4-timothy.mcdaniel@intel.com \
--to=timothy.mcdaniel@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.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).