[v1,3/3] baseband/acc: add support for k0 parameter
Checks
Commit Message
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(-)
Comments
On 7/1/24 23:27, Nicolas Chautru wrote:
> 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(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Also reporting Hemant's Ack on the cover letter as patchwork doesn't
report them:
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Thanks,
Maxime
@@ -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);
@@ -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
@@ -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,