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 ABBFC41DB8 for ; Thu, 2 Mar 2023 21:22:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BA3C42B71; Thu, 2 Mar 2023 21:22:00 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C179B400D6; Thu, 2 Mar 2023 21:21:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677788518; x=1709324518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nc9+0wMElD5XQmTIXCiEaPXjOS0pn+yhBlgpkbVASkk=; b=FfVn2BdTPLVz3cQGEzHnXRHIWT09M8ly5d743XHb8XHR736/B6Fjnhsm sBeL056/6OHWyPXKnMiNq4W7Wl9vm0E5zF1VdJKl5ZcccMd/HrC2lcxrO hZgJv/z+VzjtOpvTRppL/eq2YlTeWCRNN1gHavoZXZcaS780aPAz3D7gx gnQ0YkBFh0QF/QAYwqdWxViIqqFZ+ti2ULiV+/pCD7i0B6HmG7jYlETT/ 9Dbkh62WjagRZPRi6fUh85+BYRna1fzwag9htkHE/OlgPkamnGlHaHheX X7rBub9ePuschYNyFYbQn5hXAuBGNT1Ii5js7n7dEuvFa470rqwCuHhL1 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="334871144" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="334871144" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 12:21:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10637"; a="705398083" X-IronPort-AV: E=Sophos;i="5.98,228,1673942400"; d="scan'208";a="705398083" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2023 12:21:55 -0800 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, maxime.coquelin@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas , stable@dpdk.org Subject: [PATCH v3 01/17] test/bbdev: fix seg fault for non supported HARQ len Date: Thu, 2 Mar 2023 12:21:55 -0800 Message-Id: <20230302202211.170017-2-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230302202211.170017-1-hernan.vargas@intel.com> References: <20230302202211.170017-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 Reviewed-by: Maxime Coquelin --- 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 45e1780df772..027f32cbf1b7 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