[PATCH v1 3/3] baseband/acc: add support for k0 parameter
Nicolas Chautru
nicolas.chautru at intel.com
Mon Jul 1 23:27:03 CEST 2024
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 at 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
More information about the dev
mailing list