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 DF134A054D for ; Wed, 16 Nov 2022 21:53:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB87A40E03; Wed, 16 Nov 2022 21:53:17 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 85D8540DFB for ; Wed, 16 Nov 2022 21:53:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668631996; x=1700167996; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7E/ObFkEM7V/bqu+3AVac1t7hhIdzYza9vw+lKAEZWk=; b=heoFr420qUf0UTo72wS1pFhZp4Q7hsegj5RcJNFYjDc+RnoC/IkLWiuV g7g31gcwzN91l4UtRa4L4Sfdn5lMKW5AEhyfQ0ML2pfXpb5jis3e8Lpnq L/57Yqithdf54FAcIa+0PG0pNK0qpKm9rCvNuH9/ltznc63LGIe42MnwY nQ4oS01dylAPcchmydjL1ouPLJsMNwfZUgQy/sR3QumBZaPWX0JnQxjiI pQjgLmek8hfKFYu8c0soKN3bxANjbyc7nW+7UCoQXhzbAmUHTSjwPPHvC N6b1yJ0BueVBi2Wh+RxaLPywukFlvxtGxVh/9YZyZ1kFoEcta4GyGnbhj w==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="398946806" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="398946806" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 12:51:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="590334527" X-IronPort-AV: E=Sophos;i="5.96,169,1665471600"; d="scan'208";a="590334527" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by orsmga003.jf.intel.com with ESMTP; 16 Nov 2022 12:51:44 -0800 From: Hernan Vargas To: stable@dpdk.org, ktraynor@redhat.com Cc: nicolas.chautru@intel.com, Hernan Vargas , Maxime Coquelin Subject: [PATCH 21.11 5/7] baseband/acc100: fix null HARQ input case Date: Wed, 16 Nov 2022 20:46:50 -0800 Message-Id: <20221117044652.163000-6-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221117044652.163000-1-hernan.vargas@intel.com> References: <20221117044652.163000-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 [ upstream commit 75114f78cf5819ab857f45d4ed1fc1de0368042e ] An invalid HW operation may be caused in case the user provide the BBDEV API and HARQ operation with input enabled and zero input. Added protection for that case. Fixes: 5ad5060f8f7 ("baseband/acc100: add LDPC processing functions") Signed-off-by: Hernan Vargas Reviewed-by: Maxime Coquelin --- drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 1fb2d24ded..c90d7b8e1a 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1318,6 +1318,14 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc100_fcw_ld *fcw, op->ldpc_dec.tb_params.ea : op->ldpc_dec.tb_params.eb; + if (unlikely(check_bit(op->ldpc_dec.op_flags, + RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE) && + (op->ldpc_dec.harq_combined_input.length == 0))) { + rte_bbdev_log(WARNING, "Null HARQ input size provided"); + /* Disable HARQ input in that case to carry forward. */ + op->ldpc_dec.op_flags ^= RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE; + } + fcw->hcin_en = check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE); fcw->hcout_en = check_bit(op->ldpc_dec.op_flags, -- 2.37.1