From patchwork Sat Jul 2 16:22:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy McDaniel X-Patchwork-Id: 113643 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 227AFA0093; Sat, 2 Jul 2022 18:22:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C12A7427F3; Sat, 2 Jul 2022 18:22:44 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 16CD840E50 for ; Sat, 2 Jul 2022 18:22:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656778963; x=1688314963; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pqLK8ZaZHCwhwffFuW1EFiSddcFVVSyV6J+z01jxqTA=; b=aHUixCowxSe60ysng4PRH2SrZF2PtxxYEbZk8ovhd2LdmuiOZP5leASs SxmgvUlMuvyR9cC+n7MJz99m/WOvpP0YnhK1BM4r6abDrdFTsLqQyIRc0 r2QbMSzaRYwXy6+G7GU+FMCB5275rMJiyZ+Q8Eykaubifi8FrHSVYoeU4 vUeobiZoONxLLxqJlEFzCk+9qFqsMurSTS1AnPZFDU9yHgZ1HItFCt0WA Sc4Ae473rqSKEPIQUld93KiBxU0qSp8Dbl0b8WmDair4f8kNYy946u27W XZbL+083FtMeeHEMFYABm9DSk2SCXMS+5edhHgo3BCuH09ky8nmijsRyZ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10396"; a="283957272" X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="283957272" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 09:22:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="648781614" Received: from txanpdk03.an.intel.com ([10.123.117.78]) by fmsmga008.fm.intel.com with ESMTP; 02 Jul 2022 09:22:41 -0700 From: Timothy McDaniel 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 Message-Id: <20220702162239.1646548-2-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220702162239.1646548-1-timothy.mcdaniel@intel.com> References: <20220629153638.1269743-1-timothy.mcdaniel@intel.com> <20220702162239.1646548-1-timothy.mcdaniel@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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 {