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 D9DDE41C50 for ; Fri, 10 Feb 2023 19:02:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BE3642D44; Fri, 10 Feb 2023 19:02:54 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id CD7A742BD9; Fri, 10 Feb 2023 19:02:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676052166; x=1707588166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cgCwPXw1lZz60kZeznGk5uV6ZOLnm2642HhBn/Bak4k=; b=fOvOFwvJSpEz0Is9+yZHPpY41BuIkVzqDEgkNv0q99KO/wn9CtV2eVwL hcPkHlXqQU4FgDFMss5CgYZApvJmo4M469+IKCFFkJAqI3wxcQn1JH7K2 J6CpF+A6KEs4DItMDCljLM3nIqNBc91piL8DATgNwlAV/cquo0e5TJQfe ctuOxBbWbXkEyVSgE4XFDS0VudMBXiWNl24+SKPDuWznmSuEcUDMNpPQm m4PPJ78s/Atv+4sLWiCVzwh2dAWiGyw7D6mNNxIH2scYUDeZndarEZkzk zDsbHCozQv5pL7p72pXxuws0O997QiQ0QfR+Zu49cQtNP/qpuu9P8jSoR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="310117912" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="310117912" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 10:02:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="670076715" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="670076715" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by fmsmga007.fm.intel.com with ESMTP; 10 Feb 2023 10:02:15 -0800 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hernan.vargas@intel.com, stable@dpdk.org, Nicolas Chautru Subject: [PATCH v2 5/9] baseband/acc: fix iteration counter in TB mode Date: Fri, 10 Feb 2023 17:58:37 +0000 Message-Id: <20230210175841.303450-6-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230210175841.303450-1-nicolas.chautru@intel.com> References: <20230209221929.265059-2-nicolas.chautru@intel.com> <20230210175841.303450-1-nicolas.chautru@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 The iteration count was not using correct structure (4G vs 5G) in TB mode. Fixes: bec597b78a0 ("baseband/acc200: add LTE processing") Cc: stable@dpdk.org Signed-off-by: Nicolas Chautru Reviewed-by: Maxime Coquelin --- drivers/baseband/acc/rte_vrb_pmd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c index a7d0b1e33c..ccd3adaf93 100644 --- a/drivers/baseband/acc/rte_vrb_pmd.c +++ b/drivers/baseband/acc/rte_vrb_pmd.c @@ -2875,7 +2875,7 @@ vrb_dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data, return 1; } -/* Dequeue one decode operations from device in TB mode. */ +/* Dequeue one decode operations from device in TB mode for 4G or 5G. */ static inline int vrb_dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op, uint16_t dequeued_cbs, uint32_t *aq_dequeued) @@ -2929,8 +2929,12 @@ vrb_dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op, /* CRC invalid if error exists. */ if (!op->status) op->status |= rsp.crc_status << RTE_BBDEV_CRC_ERROR; - op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt, - op->turbo_dec.iter_count); + if (q->op_type == RTE_BBDEV_OP_LDPC_DEC) + op->ldpc_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt, + op->ldpc_dec.iter_count); + else + op->turbo_dec.iter_count = RTE_MAX((uint8_t) rsp.iter_cnt, + op->turbo_dec.iter_count); /* Check if this is the last desc in batch (Atomic Queue). */ if (desc->req.last_desc_in_batch) { -- 2.34.1