DPDK patches and discussions
 help / color / mirror / Atom feed
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
To: jerinj@marvell.com
Cc: dev@dpdk.org, timothy.mcdaniel@intel.com
Subject: [PATCH v3 1/5] event/dlb2: fix port_cos array sizing
Date: Sat,  2 Jul 2022 11:22:35 -0500	[thread overview]
Message-ID: <20220702162239.1646548-2-timothy.mcdaniel@intel.com> (raw)
In-Reply-To: <20220702162239.1646548-1-timothy.mcdaniel@intel.com>

This commit fixes a segfault that resulted from reading
beyond the end of the port_cos array. The root cause was using
the DLB num ports define instead of the eventdev num ports define.

Fixes: bec8901bfe9f ("event/dlb2: support ldb port specific COS")
Cc: timothy.mcdaniel@intel.com

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/dlb2_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h
index 528e2ede61..8744efa79d 100644
--- a/drivers/event/dlb2/dlb2_priv.h
+++ b/drivers/event/dlb2/dlb2_priv.h
@@ -640,7 +640,7 @@ struct dlb2_cq_weight {
 };
 
 struct dlb2_port_cos {
-	int cos_id[DLB2_MAX_NUM_LDB_PORTS];
+	int cos_id[DLB2_MAX_NUM_PORTS_ALL];
 };
 
 struct dlb2_cos_bw {
-- 
2.25.1


  reply	other threads:[~2022-07-02 16:22 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   ` Timothy McDaniel [this message]
2022-07-02 16:22   ` [PATCH v3 2/5] event/dlb2: fix initialization of cos bandwidth args Timothy McDaniel
2022-07-02 16:22   ` [PATCH v3 3/5] event/dlb2: fix cq depth override Timothy McDaniel
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-2-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).