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 E2AB643284; Sat, 4 Nov 2023 00:41:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F945427E4; Sat, 4 Nov 2023 00:41:34 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 830874029B; Sat, 4 Nov 2023 00:41:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699054889; x=1730590889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NNJfjma3MwvKcOoPgxWBQFlFib0CFVV1ZUCJQ1TshmY=; b=L5SAqqCFNULpBvvABj3pwX/+3Eh/EFckc3Hcx9lk41DlnF4d090Yc/+u bXT9DpkBSwyICWvg4zRGHwTDMRP3USwkJ/AfVuf6Y2/sG6QNEoodS3inn yHb4LgvtcjLgJGU/BoWO5NoGmiVtlxyMK6hkdfqcAyvPCDvqI40jehgQT V+IrSrs+ovJTvlDJxVYbgvU3YsOI808J65haT0tdx8JLXx63UIDqzvkJD H/GXQWx/g/Qc5mIDaa7+RuxM5joLtUTpuPJLZVM/1grIcIuMym/9mSy8S QTYlYFaAYZY8OrKK0txwUE5jDvLpoD8AQj8mdG+L9PmIYlcWQ5ibvdhgr A==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="386213572" X-IronPort-AV: E=Sophos;i="6.03,275,1694761200"; d="scan'208";a="386213572" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 16:41:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="935249147" X-IronPort-AV: E=Sophos;i="6.03,275,1694761200"; d="scan'208";a="935249147" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by orsmga005.jf.intel.com with ESMTP; 03 Nov 2023 16:41:28 -0700 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com, hernan.vargas@intel.com, stable@dpdk.org Subject: [PATCH v3 03/10] test/bbdev: handle exception for LLR generation Date: Fri, 3 Nov 2023 23:34:06 +0000 Message-Id: <20231103233413.756110-4-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231103233413.756110-1-nicolas.chautru@intel.com> References: <20231103233413.756110-1-nicolas.chautru@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Hernan Vargas Add range limit to prevent LLR generation greater than the data buffer size. Fixes: 7831a9684356 ("test/bbdev: support BLER for 4G") Cc: stable@dpdk.org Signed-off-by: Hernan Vargas --- app/test-bbdev/test_bbdev_perf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 09e4549b10..468cfeccd2 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -1838,6 +1838,12 @@ generate_turbo_llr_input(uint16_t n, struct rte_bbdev_op_data *inputs, range = ref_op->turbo_dec.input.length; N0 = 1.0 / pow(10.0, get_snr() / 10.0); + if (range > inputs[0].data->data_len) { + printf("Warning: Limiting LLR generation to first segment (%d from %d)\n", + inputs[0].data->data_len, range); + range = inputs[0].data->data_len; + } + for (i = 0; i < n; ++i) { m = inputs[i].data; int8_t *llrs = rte_pktmbuf_mtod_offset(m, int8_t *, 0); -- 2.34.1