bbdev, baseband/acc: bug fixes
cover bbdev, baseband/acc: bug fixes
This series targeting 26.11 contains a set of small bug fixes for the bbdev library and the baseband/acc (ACC100/VRB) drivers.
- bbdev: remove a spurious error log printed by rte_bbdev_enqueue_status_str() when called for valid cases such as queue dump.
- baseband/acc: fix the available dequeue size computation, which could go negative when dequeuing descriptors.
- baseband/acc: fix PF2VF communication so all FFT windows can be read (previously only the first was functional) on VRB1 and VRB2.
- baseband/acc: fix the ring interrupt handler error path so a malformed ring entry is consumed instead of being reprocessed forever and blocking further ring processing (PF and VF).
- baseband/acc: explicitly zero part of the FCW when alternating TB mode.
Hernan Vargas (5):
bbdev: fix status error for ops dump baseband/acc: fix queue depth computation error baseband/acc: fix PF2VF Bug for FFT window probing baseband/acc: fix ring interrupt handler err path baseband/acc: fix bug when alternating TB mode
drivers/baseband/acc/acc_common.h | 5 ++++- drivers/baseband/acc/rte_vrb_pmd.c | 6 +++--- lib/bbdev/rte_bbdev.c | 1 - 3 files changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/5 bbdev: fix status error for ops dump
The error log being reported by rte_bbdev_enqueue_status_str is displayed even without an actual error. The function may be called for such index (notably for queue dump) for valid reasons.
--- lib/bbdev/rte_bbdev.c | 1 - 1 file changed, 1 deletion(-)
lib/bbdev/rte_bbdev.c +0 -1
@@ -1236,7 +1236,6 @@ rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)if ((uint8_t )status <sizeof (enq_sta_string) /sizeof (char *))return enq_sta_string[status]; -rte_bbdev_log (ERR ,"Invalid enqueue status" );return NULL ; }
Signature · 1 line
2.34.1
Re: [PATCH v1 1/5] bbdev: fix status error for ops dump
Quoted 4 lines · Hernan Vargas
The error log being reported by
rte_bbdev_enqueue_status_stris displayed even without an actual error. The function may be called for such index (notably for queue dump) for valid reasons.
Quoted 9 lines
Fixes 4f08028c5e24 ("bbdev: expose queue related warning and status")Signed-off-by Hernan Vargas <[email protected]>--- lib/bbdev/rte_bbdev.c | 1 - 1 file changed, 1 deletion(-)
Thanks,
Maxime
PATCH 2/5 baseband/acc: fix queue depth computation error
In reply to Hernan VargasFix to the computation of available dequeue size. Protects notably for possible negative scenarios when dequeuing descriptors.
--- drivers/baseband/acc/acc_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/baseband/acc/acc_common.h +1 -1
@@ -1602,7 +1602,7 @@ acc_ring_avail_enq(struct acc_queue *q)static inline uint32_t acc_ring_avail_deq (struct acc_queue *q) { -return (q->sw_ring_depth + q->sw_ring_head - q->sw_ring_tail) & q->sw_ring_wrap_mask; +return (q->sw_ring_head - q->sw_ring_tail) & q->sw_ring_wrap_mask; }/* Check room in AQ for the enqueues batches into Qmgr */
Signature · 1 line
2.34.1
Re: [PATCH v1 2/5] baseband/acc: fix queue depth computation error
Quoted 4 lines · Hernan Vargas
Fix to the computation of available dequeue size. Protects notably for possible negative scenarios when dequeuing descriptors.
Quoted 8 lines
Fixes e640f6cdfa84 ("baseband/acc200: add LDPC processing")Signed-off-by Hernan Vargas <[email protected]>--- drivers/baseband/acc/acc_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Maxime
PATCH 3/5 baseband/acc: fix PF2VF Bug for FFT window probing
In reply to Hernan VargasUpdate of the PF2VF comms between bbdev and pf_bb_config to make sure all FFT windows can be read.
So far only the first window was actually used and functional. No system impact. Affects VRB1 and VRB2.
--- drivers/baseband/acc/rte_vrb_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/baseband/acc/rte_vrb_pmd.c +1 -1
@@ -219,7 +219,7 @@ vrb_device_fft_win(struct rte_bbdev *dev)/* Check from the device the first time. */ if (d->fft_window_width[0 ] ==0 ) {for (win =0 ; win <ACC_MAX_FFT_WIN ; win++) { -vrb_vf2pf (d,ACC_VF2PF_FFT_WIN_REQUEST | win); +vrb_vf2pf (d,ACC_VF2PF_FFT_WIN_REQUEST | (win <<8 )); reg =acc_reg_read (d, d->reg_addr->pf2vf_doorbell);while ((time_out <ACC_STATUS_TO ) && (reg ==RTE_BBDEV_DEV_NOSTATUS )) {usleep (ACC_STATUS_WAIT );/* Wait or VF->PF->VF Comms. */
Signature · 1 line
2.34.1
Re: [PATCH v1 3/5] baseband/acc: fix PF2VF Bug for FFT window probing
Quoted 5 lines · Hernan Vargas
Update of the PF2VF comms between bbdev and
pf_bb_configto make sure all FFT windows can be read.
So far only the first window was actually used and functional. No system impact. Affects VRB1 and VRB2.
Quoted 9 lines
Fixes 0d39ed91c161 ("baseband/acc: add FFT window width in VRB")Signed-off-by Hernan Vargas <[email protected]>--- drivers/baseband/acc/rte_vrb_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Maxime
PATCH 4/5 baseband/acc: fix ring interrupt handler err path
In reply to Hernan VargasWhen get_queue_id_from_ring_info() fails to match a queue index (returning UINT16_MAX), an early return skipped clearing the ring entry and advancing the head pointer. This left the valid bit set, causing the same malformed entry to be reprocessed on every subsequent interrupt, blocking all further ring processing.
Replace the return with break so the entry is consumed and the loop continues normally. Fix applies to both PF and VF paths.
--- drivers/baseband/acc/rte_vrb_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/baseband/acc/rte_vrb_pmd.c +2 -2
@@ -454,7 +454,7 @@ vrb_dev_interrupt_handler(void *cb_arg)rte_bbdev_log (ERR ,"Couldn't find queue: aq_id: %u, qg_id: %u, vf_id: %u" , aq_id, qg_id, vf_id); -return ; +break ; }rte_bbdev_pmd_callback_process (dev,RTE_BBDEV_EVENT_DEQUEUE , &deq_intr_det);
@@ -482,7 +482,7 @@ vrb_dev_interrupt_handler(void *cb_arg)rte_bbdev_log (ERR ,"Couldn't find queue: aq_id: %u, qg_id: %u" , aq_id, qg_id); -return ; +break ; }rte_bbdev_pmd_callback_process (dev,RTE_BBDEV_EVENT_DEQUEUE , &deq_intr_det);
Signature · 1 line
2.34.1
Re: [PATCH v1 4/5] baseband/acc: fix ring interrupt handler err path
Quoted 9 lines · Hernan Vargas
When
get_queue_id_from_ring_info()fails to match a queue index (returningUINT16_MAX), an early return skipped clearing the ring entry and advancing the head pointer. This left the valid bit set, causing the same malformed entry to be reprocessed on every subsequent interrupt, blocking all further ring processing.Replace the return with break so the entry is consumed and the loop continues normally. Fix applies to both PF and VF paths.
Quoted 9 lines
Fixes 3cabc8eaf524 ("baseband/acc200: support interrupt")Signed-off-by Hernan Vargas <[email protected]>--- drivers/baseband/acc/rte_vrb_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks,
Maxime
PATCH 5/5 baseband/acc: fix bug when alternating TB mode
In reply to Hernan VargasPart of the FCW needs to be explicit set to zero when alternating between TB mode.
--- drivers/baseband/acc/acc_common.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/baseband/acc/acc_common.h +3 -0
@@ -1082,6 +1082,9 @@ acc_fcw_le_fill(const struct rte_bbdev_enc_op *op, fcw->k0 =get_k0 (fcw->ncb, fcw->Zc, op->ldpc_enc.basegraph, op->ldpc_enc.rv_index,0 ); fcw->rm_e = (default_e ==0 ) ? op->ldpc_enc.cb_params.e : default_e; + fcw->rm_e_b =0 ; + fcw->C =0 ; + fcw->Cab =0 ; fcw->crc_select =check_bit (op->ldpc_enc.op_flags,RTE_BBDEV_LDPC_CRC_24B_ATTACH ); fcw->bypass_intlv = check_bit(op->ldpc_enc.op_flags,
Signature · 1 line
2.34.1
Re: [PATCH v1 5/5] baseband/acc: fix bug when alternating TB mode
Quoted 12 lines · Hernan Vargas
Part of the FCW needs to be explicit set to zero when alternating between TB mode.
Fixes 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code")Signed-off-by Hernan Vargas <[email protected]>--- drivers/baseband/acc/acc_common.h | 3 +++ 1 file changed, 3 insertions(+)
Thanks,
Maxime