From patchwork Wed Jun 29 15:36:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy McDaniel X-Patchwork-Id: 113560 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 F34C9A0547; Wed, 29 Jun 2022 17:36:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE43E41138; Wed, 29 Jun 2022 17:36:48 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id D497D40042 for ; Wed, 29 Jun 2022 17:36:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656517006; x=1688053006; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pqLK8ZaZHCwhwffFuW1EFiSddcFVVSyV6J+z01jxqTA=; b=eLhXo3S5borPAirq1/4JKK84ltaIXY5n0icNiDu/vlRiBNUQ/mt8BqQ7 069nGcBsIxevuyoVEQg+R0WppBwn2gDV6Iu7M0uiaLc+V4NJGOkPaFNEO 6lU/HkG8cm89OlkP4GmvCPd4a2oT85VZ9+Ov00y+1m/9qUKgVdAL5ea9o gOyxqVI1DsS3YmvlVGcuFZfBdrahP74NupQIkXBP3O5VKNVSlFgQ4sK1k VSPmgaQC5nYOmQ4pm/IK3du7GHilvDKiuijoxoQQL71GPKrjLQIN+e/Gg YUX1sUjgPZAh3O5UzxG0YimKk8O4u4vUYSG2rOSp0rjnxlG3vgIFloC6D A==; X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="346052731" X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="346052731" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 08:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="680550338" Received: from txanpdk03.an.intel.com ([10.123.117.78]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jun 2022 08:36:43 -0700 From: Timothy McDaniel To: jerinj@marvell.com Cc: dev@dpdk.org, timothy.mcdaniel@intel.com Subject: [PATCH 1/2] event/dlb2: fix port_cos array sizing Date: Wed, 29 Jun 2022 10:36:37 -0500 Message-Id: <20220629153638.1269743-2-timothy.mcdaniel@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220629153638.1269743-1-timothy.mcdaniel@intel.com> References: <20220629153638.1269743-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 {