From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C11A041CA8 for ; Wed, 15 Feb 2023 18:13:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2854842D32; Wed, 15 Feb 2023 18:13:04 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E7B5A41141; Wed, 15 Feb 2023 18:12:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676481180; x=1708017180; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wrMdaWFEq1c6bDZJlWeIL5418LUgchmtBU1eN/BYV+Q=; b=mKQr4Tclh6tHxHTqX77j1F5oy5VV2ykfQkSmEYruzY4UdqqJ2rWtQt7E O04QKIoUjnhUndg7ksaarXUlb6jZhrD41WNSiHHC12oJ94SjMMfdOcXiT CNqmMuckmHfe91SWbmvmKk/jI5mR2U+mCxyflA2V02MXDsyomOMmVB6PA FKSvtahiyNhToT6b7UzC6YJDwoo5qJ1WUx5zcgPGqa3YEtiKY3hb2BFWj Jp8+FTyJM4158U1s4KpcRkp2t3twTnrXzgWOtgsgtGPVMlwVrCyqUeQ9D AqxYuazNDGzTqTNOLagrXERlw6cXY9EVy8T5sxVyhwlgZV3F+/qKNUI64 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="332789782" X-IronPort-AV: E=Sophos;i="5.97,300,1669104000"; d="scan'208";a="332789782" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 09:09:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="758489606" X-IronPort-AV: E=Sophos;i="5.97,300,1669104000"; d="scan'208";a="758489606" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by FMSMGA003.fm.intel.com with ESMTP; 15 Feb 2023 09:09:55 -0800 From: Hernan Vargas To: dev@dpdk.org, maxime.coquelin@redhat.com, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v2 01/16] test/bbdev: fix seg fault for non supported HARQ len Date: Wed, 15 Feb 2023 09:09:34 -0800 Message-Id: <20230215170949.60569-2-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230215170949.60569-1-hernan.vargas@intel.com> References: <20230215170949.60569-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Fix segmentation fault happening in corner case in test-bbdev. This fault could happen when running some specific vectors which size are not supported by the PMD. Fixes: 335c11fd276 ("app/bbdev: support HARQ validation") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas --- app/test-bbdev/test_bbdev_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 45e1780df7..027f32cbf1 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -84,7 +84,7 @@ /* Increment for next code block in external HARQ memory */ #define HARQ_INCR 32768 /* Headroom for filler LLRs insertion in HARQ buffer */ -#define FILLER_HEADROOM 1024 +#define FILLER_HEADROOM 2048 /* Constants from K0 computation from 3GPP 38.212 Table 5.4.2.1-2 */ #define N_ZC_1 66 /* N = 66 Zc for BG 1 */ #define N_ZC_2 50 /* N = 50 Zc for BG 2 */ @@ -2111,9 +2111,9 @@ validate_op_harq_chain(struct rte_bbdev_op_data *op, ops_ld->n_filler; if (data_len > deRmOutSize) data_len = deRmOutSize; - if (data_len > orig_op->segments[i].length) - data_len = orig_op->segments[i].length; } + if (data_len > orig_op->segments[i].length) + data_len = orig_op->segments[i].length; /* * HARQ output can have minor differences * due to integer representation and related scaling -- 2.37.1