On 10/3/24 22:49, Hernan Vargas wrote:
Automatically reset HARQ memory to prevent errors and simplify usage.
In a way we can assume that the HARQ output operation will always
overwrite the buffer, so we can reset this from the driver to prevent
an error being reported when application fails to do this explicitly.


Should it be backported?

Signed-off-by: Hernan Vargas <hernan.var...@intel.com>
---
  drivers/baseband/acc/rte_vrb_pmd.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/baseband/acc/rte_vrb_pmd.c 
b/drivers/baseband/acc/rte_vrb_pmd.c
index 865a050e1b19..27c8bdca3d08 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -2595,8 +2595,9 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, 
struct rte_bbdev_dec_op *op,
        /* Hard output. */
        mbuf_append(h_output_head, h_output, h_out_length);
        if (op->ldpc_dec.harq_combined_output.length > 0) {
-               /* Push the HARQ output into host memory. */
+               /* Push the HARQ output into host memory overwriting existing 
data. */
                struct rte_mbuf *hq_output_head, *hq_output;
+               op->ldpc_dec.harq_combined_output.data->data_len = 0;
                hq_output_head = op->ldpc_dec.harq_combined_output.data;
                hq_output = op->ldpc_dec.harq_combined_output.data;
                hq_len = op->ldpc_dec.harq_combined_output.length;

Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>

Thanks,
Maxime

Reply via email to