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.

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 858de1eada6e..581779160569 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -2612,8 +2612,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;
-- 
2.37.1

Reply via email to