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 B07A74553F; Mon, 1 Jul 2024 23:27:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96B4B4060A; Mon, 1 Jul 2024 23:26:56 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id 6F50F4021E for ; Mon, 1 Jul 2024 23:26:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719869213; x=1751405213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XvDlc706YXHlI5yaksI/2aU/K8r+mfyd/lAo6oxSYs8=; b=WzN1QQqHEMB/vzM1j+tN4tiyuSpx1Sz3Lpn3Fz4O7Loh5KMC7IM+7rk5 OeaduzkHl3/XZWzNgYqQjB5FNpwa5tHrPMQn72bTS7iW3cxq9tLKtXlGO z0pBRy4h0U+srSedqFN2EdQFjYKh1htWKc12kQOBWzbo9V/9Gfcetj+Zt ezFJtGITBttiQlUb/L2sb5s9zQoqADSbIIsd4KT3qQG75GmCA0O3xHSCS M3oGLuTozdW5MbLR+aBF5tKHViAq+6oaiUNrXGiAcmMR+yoEMdpJ7yWeN 5t9hXP6sqC4/5eAXVzkM8X6V4QPGK42HOnzY470duaaRxRsOOmp/TKiHm Q==; X-CSE-ConnectionGUID: mD4WKm7CQmih42sYAJrPrA== X-CSE-MsgGUID: JNF57a7GRQ6BI8oo75Xezw== X-IronPort-AV: E=McAfee;i="6700,10204,11120"; a="20834742" X-IronPort-AV: E=Sophos;i="6.09,177,1716274800"; d="scan'208";a="20834742" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2024 14:26:51 -0700 X-CSE-ConnectionGUID: XTf/XY3GTxehqUGIFNm0xw== X-CSE-MsgGUID: B336SS18RMO/n5Pztz1Jvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,177,1716274800"; d="scan'208";a="45559934" Received: from spr-npg-bds1-eec2.sn.intel.com (HELO spr-npg-bds1-eec2..) ([10.233.181.123]) by orviesa010.jf.intel.com with ESMTP; 01 Jul 2024 14:26:51 -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, Nicolas Chautru Subject: [PATCH v1 3/3] baseband/acc: add support for k0 parameter Date: Mon, 1 Jul 2024 14:27:03 -0700 Message-Id: <20240701212703.417094-4-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240701212703.417094-1-nicolas.chautru@intel.com> References: <20240701212703.417094-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 The k0 may be provided to the PMD, which would be used as the circular buffer starting position instead of value which would be computed from legacy rv_index derived computation. Signed-off-by: Nicolas Chautru --- drivers/baseband/acc/acc_common.h | 6 ++++-- drivers/baseband/acc/rte_acc100_pmd.c | 2 +- drivers/baseband/acc/rte_vrb_pmd.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h index e249f37e38..46b564ce65 100644 --- a/drivers/baseband/acc/acc_common.h +++ b/drivers/baseband/acc/acc_common.h @@ -982,8 +982,10 @@ acc_fcw_te_fill(const struct rte_bbdev_enc_op *op, struct acc_fcw_te *fcw) * Starting position of different redundancy versions, k0 */ static inline uint16_t -get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) +get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index, uint16_t k0) { + if (k0 > 0) + return k0; if (rv_index == 0) return 0; uint16_t n = (bg == 1 ? ACC_N_ZC_1 : ACC_N_ZC_2) * z_c; @@ -1020,7 +1022,7 @@ acc_fcw_le_fill(const struct rte_bbdev_enc_op *op, fcw->Zc = op->ldpc_enc.z_c; fcw->ncb = op->ldpc_enc.n_cb; fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_enc.basegraph, - op->ldpc_enc.rv_index); + op->ldpc_enc.rv_index, 0); fcw->rm_e = (default_e == 0) ? op->ldpc_enc.cb_params.e : default_e; fcw->crc_select = check_bit(op->ldpc_enc.op_flags, RTE_BBDEV_LDPC_CRC_24B_ATTACH); diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c index ab69350080..7da421e26c 100644 --- a/drivers/baseband/acc/rte_acc100_pmd.c +++ b/drivers/baseband/acc/rte_acc100_pmd.c @@ -1159,7 +1159,7 @@ acc100_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw, fcw->Zc = op->ldpc_dec.z_c; fcw->ncb = op->ldpc_dec.n_cb; fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_dec.basegraph, - op->ldpc_dec.rv_index); + op->ldpc_dec.rv_index, op->ldpc_dec.k0); if (op->ldpc_dec.code_block_mode == RTE_BBDEV_CODE_BLOCK) fcw->rm_e = op->ldpc_dec.cb_params.e; else diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c index 585dc49bd6..ef34fc1c57 100644 --- a/drivers/baseband/acc/rte_vrb_pmd.c +++ b/drivers/baseband/acc/rte_vrb_pmd.c @@ -1550,7 +1550,7 @@ vrb_fcw_ld_fill(struct rte_bbdev_dec_op *op, struct acc_fcw_ld *fcw, fcw->Zc = op->ldpc_dec.z_c; fcw->ncb = op->ldpc_dec.n_cb; fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_dec.basegraph, - op->ldpc_dec.rv_index); + op->ldpc_dec.rv_index, op->ldpc_dec.k0); if (op->ldpc_dec.code_block_mode == RTE_BBDEV_CODE_BLOCK) fcw->rm_e = op->ldpc_dec.cb_params.e; else @@ -2274,7 +2274,7 @@ vrb2_fcw_letb_fill(const struct rte_bbdev_enc_op *op, struct acc_fcw_le *fcw) fcw->Zc = op->ldpc_enc.z_c; fcw->ncb = op->ldpc_enc.n_cb; fcw->k0 = get_k0(fcw->ncb, fcw->Zc, op->ldpc_enc.basegraph, - op->ldpc_enc.rv_index); + op->ldpc_enc.rv_index, 0); fcw->rm_e = op->ldpc_enc.tb_params.ea; fcw->rm_e_b = op->ldpc_enc.tb_params.eb; fcw->crc_select = check_bit(op->ldpc_enc.op_flags, -- 2.34.1