From: Nicolas Chautru <nicolas.chautru@intel.com>
To: dev@dpdk.org, maxime.coquelin@redhat.com
Cc: hemant.agrawal@nxp.com, david.marchand@redhat.com,
hernan.vargas@intel.com,
Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [PATCH v1 3/3] baseband/acc: add support for k0 parameter
Date: Mon, 1 Jul 2024 14:27:03 -0700 [thread overview]
Message-ID: <20240701212703.417094-4-nicolas.chautru@intel.com> (raw)
In-Reply-To: <20240701212703.417094-1-nicolas.chautru@intel.com>
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 <nicolas.chautru@intel.com>
---
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
next prev parent reply other threads:[~2024-07-01 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 21:27 [PATCH v1 0/3] bbdev: new " Nicolas Chautru
2024-07-01 21:27 ` [PATCH v1 1/3] bbdev: new k0 parameter for LDPC decoder operation Nicolas Chautru
2024-08-29 8:00 ` Maxime Coquelin
2024-07-01 21:27 ` [PATCH v1 2/3] test/bbdev: add support for k0 parameter Nicolas Chautru
2024-08-29 8:01 ` Maxime Coquelin
2024-07-01 21:27 ` Nicolas Chautru [this message]
2024-08-29 8:01 ` [PATCH v1 3/3] baseband/acc: " Maxime Coquelin
2024-07-02 6:50 ` [PATCH v1 0/3] bbdev: new " Hemant Agrawal
2024-09-13 13:50 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701212703.417094-4-nicolas.chautru@intel.com \
--to=nicolas.chautru@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).