bbdev: dump debug information
v2 cover bbdev: dump debug information
v2: updated with comments from Hemant and rebased.
v1: Hi Maxime.
Adding new support to support troubleshooting. This provides to the application an API to dump into file information to help troubleshoot issue on a queue. Some of it is tracked at bbdev level and some extra information can be tracked as an option at PMD level. This is for 24.11.
In practive logging is not enabled at run time, but information can be dump into file when an issue happens and requires extra information. This collates now multiple source of errors detected notably at driver level made more explicit.
Thanks,
Nic
Nicolas Chautru (2):
bbdev: add new function to dump debug information baseband/acc: improvement to logging mechanism
drivers/baseband/acc/acc_common.h | 37 +++++ drivers/baseband/acc/rte_vrb_pmd.c | 128 +++++++++++++---- lib/bbdev/rte_bbdev.c | 214 +++++++++++++++++++++++++++++ lib/bbdev/rte_bbdev.h | 41 ++++++ lib/bbdev/rte_bbdev_pmd.h | 9 ++ lib/bbdev/version.map | 4 + 6 files changed, 406 insertions(+), 27 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 bbdev: add new function to dump debug information
This provides a new API to dump more debug information related to the status on a given bbdev queue. Some of this information is visible at bbdev level. This also provides a new option dev op, to print more information at the lower PMD level.
This helps user to troubleshoot issues related to previous operations provided into a queue causing possible hard-to-debug negative scenarios.
--- lib/bbdev/rte_bbdev.c | 214 ++++++++++++++++++++++++++++++++++++++ lib/bbdev/rte_bbdev.h | 41 ++++++++ lib/bbdev/rte_bbdev_pmd.h | 9 ++ lib/bbdev/version.map | 4 + 4 files changed, 268 insertions(+)
lib/bbdev/rte_bbdev.c +214 -0
@@ -1190,3 +1190,217 @@ rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)rte_bbdev_log (ERR ,"Invalid enqueue status" );return NULL ; } + + +int +rte_bbdev_queue_ops_dump (uint16_t dev_id,uint16_t queue_id,FILE *f) +{ +struct rte_bbdev_queue_data *q_data; +struct rte_bbdev_stats *stats; +uint16_t i; +struct rte_bbdev *dev =get_dev (dev_id); + +VALID_DEV_OR_RET_ERR (dev, dev_id); +VALID_QUEUE_OR_RET_ERR (queue_id, dev); +VALID_DEV_OPS_OR_RET_ERR (dev, dev_id); +VALID_FUNC_OR_RET_ERR (dev->dev_ops->queue_ops_dump, dev_id); + + q_data = &dev->data->queues[queue_id]; + +if (f ==NULL ) +return -EINVAL ; + +fprintf (f,"Dump of operations on %s queue %d\n" , + dev->data->name, queue_id); +fprintf (f," Last Enqueue Status %s\n" , +rte_bbdev_enqueue_status_str (q_data->enqueue_status)); +for (i =0 ; i <RTE_BBDEV_ENQ_STATUS_SIZE_MAX ; i++) +if (q_data->queue_stats.enqueue_status_count[i] >0 ) +fprintf (f," Enqueue Status Counters %s %" PRIu64"\n" , +rte_bbdev_enqueue_status_str (i), + q_data->queue_stats.enqueue_status_count[i]); + stats = &dev->data->queues[queue_id].queue_stats; + +fprintf (f," Enqueue Count %" PRIu64" Warning %" PRIu64" Error %" PRIu64"\n" , + stats->enqueued_count, stats->enqueue_warn_count, + stats->enqueue_err_count); +fprintf (f," Dequeue Count %" PRIu64" Warning %" PRIu64" Error %" PRIu64"\n" , + stats->dequeued_count, stats->dequeue_warn_count, + stats->dequeue_err_count); + +return dev->dev_ops->queue_ops_dump (dev, queue_id, f); +} + +char * +rte_bbdev_ops_param_string (void *op,enum rte_bbdev_op_type op_type) +{ +static char str[1024 ]; +static char partial[1024 ]; +struct rte_bbdev_dec_op *op_dec; +struct rte_bbdev_enc_op *op_enc; +struct rte_bbdev_fft_op *op_fft; +struct rte_bbdev_mldts_op *op_mldts; + +rte_iova_t add0 =0 , add1 =0 , add2 =0 , add3 =0 , add4 =0 ; + +if (op ==NULL ) { +snprintf (str,sizeof (str),"Invalid Operation pointer\n" ); +return str; + } + +if (op_type ==RTE_BBDEV_OP_LDPC_DEC ) { + op_dec = op; +if (op_dec->ldpc_dec.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d" , + op_dec->ldpc_dec.tb_params.c, + op_dec->ldpc_dec.tb_params.cab, + op_dec->ldpc_dec.tb_params.ea, + op_dec->ldpc_dec.tb_params.eb, + op_dec->ldpc_dec.tb_params.r); +else +snprintf (partial,sizeof (partial),"E %d" , op_dec->ldpc_dec.cb_params.e); +if (op_dec->ldpc_dec.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.input.data,0 ); +if (op_dec->ldpc_dec.hard_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.hard_output.data,0 ); +if (op_dec->ldpc_dec.soft_output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.soft_output.data,0 ); +if (op_dec->ldpc_dec.harq_combined_input.data !=NULL ) + add3 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.harq_combined_input.data, +0 ); +if (op_dec->ldpc_dec.harq_combined_output.data !=NULL ) + add4 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.harq_combined_output.data, +0 ); +snprintf (str,sizeof (str),"op %x st %x BG %d Zc %d Ncb %d qm %d F %d Rv %d It %d It %d " +"HARQin %d in %" PRIx64" ho %" PRIx64" so %" PRIx64" hi %" PRIx64" " +"ho %" PRIx64" %s\n" , + op_dec->ldpc_dec.op_flags, op_dec->status, + op_dec->ldpc_dec.basegraph, op_dec->ldpc_dec.z_c, + op_dec->ldpc_dec.n_cb, op_dec->ldpc_dec.q_m, + op_dec->ldpc_dec.n_filler, op_dec->ldpc_dec.rv_index, + op_dec->ldpc_dec.iter_max, op_dec->ldpc_dec.iter_count, + op_dec->ldpc_dec.harq_combined_input.length, + add0, add1, add2, add3, add4, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) { + op_dec = op; +if (op_dec->turbo_dec.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d K %d" , + op_dec->turbo_dec.tb_params.c, + op_dec->turbo_dec.tb_params.cab, + op_dec->turbo_dec.tb_params.ea, + op_dec->turbo_dec.tb_params.eb, + op_dec->turbo_dec.tb_params.r, + op_dec->turbo_dec.tb_params.k_neg); +else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_dec->turbo_dec.cb_params.e, + op_dec->turbo_dec.cb_params.k); +if (op_dec->turbo_dec.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.input.data,0 ); +if (op_dec->turbo_dec.hard_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.hard_output.data,0 ); +if (op_dec->turbo_dec.soft_output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.soft_output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x CBM %d Iter %d map %d Rv %d ext %d " +"in %" PRIx64" ho %" PRIx64" so %" PRIx64" %s\n" , + op_dec->turbo_dec.op_flags, op_dec->status, + op_dec->turbo_dec.code_block_mode, + op_dec->turbo_dec.iter_max, op_dec->turbo_dec.num_maps, + op_dec->turbo_dec.rv_index, op_dec->turbo_dec.ext_scale, + add0, add1, add2, partial); + }else if (op_type ==RTE_BBDEV_OP_LDPC_ENC ) { + op_enc = op; +if (op_enc->ldpc_enc.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d" , + op_enc->ldpc_enc.tb_params.c, + op_enc->ldpc_enc.tb_params.cab, + op_enc->ldpc_enc.tb_params.ea, + op_enc->ldpc_enc.tb_params.eb, + op_enc->ldpc_enc.tb_params.r); +else +snprintf (partial,sizeof (partial),"E %d" , + op_enc->ldpc_enc.cb_params.e); +if (op_enc->ldpc_enc.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_enc->ldpc_enc.input.data,0 ); +if (op_enc->ldpc_enc.output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_enc->ldpc_enc.output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x BG %d Zc %d Ncb %d q_m %d F %d Rv %d " +"in %" PRIx64" out %" PRIx64" %s\n" , + op_enc->ldpc_enc.op_flags, op_enc->status, + op_enc->ldpc_enc.basegraph, op_enc->ldpc_enc.z_c, + op_enc->ldpc_enc.n_cb, op_enc->ldpc_enc.q_m, + op_enc->ldpc_enc.n_filler, op_enc->ldpc_enc.rv_index, + add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) { + op_enc = op; +if (op_enc->turbo_enc.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial), +"C %d Cab %d Ea %d Eb %d r %d K %d Ncb %d" , + op_enc->turbo_enc.tb_params.c, + op_enc->turbo_enc.tb_params.cab, + op_enc->turbo_enc.tb_params.ea, + op_enc->turbo_enc.tb_params.eb, + op_enc->turbo_enc.tb_params.r, + op_enc->turbo_enc.tb_params.k_neg, + op_enc->turbo_enc.tb_params.ncb_neg); +else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_enc->turbo_enc.cb_params.e, + op_enc->turbo_enc.cb_params.k); +if (op_enc->turbo_enc.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_enc->turbo_enc.input.data,0 ); +if (op_enc->turbo_enc.output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_enc->turbo_enc.output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x CBM %d Rv %d In %" PRIx64" Out %" PRIx64" %s\n" , + op_enc->turbo_enc.op_flags, op_enc->status, + op_enc->turbo_enc.code_block_mode, op_enc->turbo_enc.rv_index, + add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_FFT ) { + op_fft = op; +if (op_fft->fft.base_input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_fft->fft.base_input.data,0 ); +if (op_fft->fft.base_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_fft->fft.base_output.data,0 ); +if (op_fft->fft.dewindowing_input.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_fft->fft.dewindowing_input.data,0 ); +if (op_fft->fft.power_meas_output.data !=NULL ) + add3 =rte_pktmbuf_iova_offset (op_fft->fft.power_meas_output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x in %d inl %d out %d outl %d cs %x ants %d " +"idft %d dft %d cst %d ish %d dsh %d ncs %d pwsh %d fp16 %d fr %d " +"outde %d in %" PRIx64" out %" PRIx64" dw %" PRIx64" " +"pm %" PRIx64"\n" , + op_fft->fft.op_flags, op_fft->status, + op_fft->fft.input_sequence_size, op_fft->fft.input_leading_padding, + op_fft->fft.output_sequence_size, + op_fft->fft.output_leading_depadding, + op_fft->fft.cs_bitmap, op_fft->fft.num_antennas_log2, + op_fft->fft.idft_log2, op_fft->fft.dft_log2, + op_fft->fft.cs_time_adjustment, + op_fft->fft.idft_shift, op_fft->fft.dft_shift, + op_fft->fft.ncs_reciprocal, op_fft->fft.power_shift, + op_fft->fft.fp16_exp_adjust, op_fft->fft.freq_resample_mode, + op_fft->fft.output_depadded_size, add0, add1, add2, add3); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { + op_mldts = op; +if (op_mldts->mldts.qhy_input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_mldts->mldts.qhy_input.data,0 ); +if (op_mldts->mldts.r_input.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_mldts->mldts.r_input.data,0 ); +if (op_mldts->mldts.output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_mldts->mldts.output.data,0 ); +snprintf (str,sizeof (str), +"op %x st %x rbs %d lay %d rrep %d crep%d qm %d %d %d %d " +"qhy %" PRIx64" r %" PRIx64" out %" PRIx64"\n" , + op_mldts->mldts.op_flags, op_mldts->status, + op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers, + op_mldts->mldts.r_rep, op_mldts->mldts.c_rep, + op_mldts->mldts.q_m[0 ], op_mldts->mldts.q_m[1 ], + op_mldts->mldts.q_m[2 ], op_mldts->mldts.q_m[3 ], + add0, add1, add2); + + }else { +snprintf (str,sizeof (str),"Invalid Operation type %d\n" , op_type); + } + +return str; +}
lib/bbdev/rte_bbdev.h +41 -0
47 lines not on this page · raw message
lib/bbdev/rte_bbdev_pmd.h +9 -0
@@ -133,6 +133,13 @@ typedef int (*rte_bbdev_queue_intr_enable_t)(struct rte_bbdev *dev,typedef int (*rte_bbdev_queue_intr_disable_t )(struct rte_bbdev *dev,uint16_t queue_id); +/* +* @internal +* Function to dump previous operations on a queue of a device. +*/ +typedef int (*rte_bbdev_queue_ops_dump_t )(struct rte_bbdev *dev, +uint16_t queue_id,FILE *file); +/** * Operations implemented by drivers. Fields marked as "Required" must be * provided by a driver for a device to have basic functionality. "Optional"
@@ -170,6 +177,8 @@ struct rte_bbdev_ops {rte_bbdev_queue_intr_enable_t queue_intr_enable;/** Disable queue interrupt. Optional */ rte_bbdev_queue_intr_disable_t queue_intr_disable; +/** Dump operations on the queue. Optional */ +rte_bbdev_queue_ops_dump_t queue_ops_dump; };/**
lib/bbdev/version.map +4 -0
@@ -54,4 +54,8 @@ EXPERIMENTAL { rte_bbdev_enqueue_mldts_ops; rte_bbdev_mldts_op_alloc_bulk; rte_bbdev_mldts_op_free_bulk; + + # added in 24.11 + rte_bbdev_queue_ops_dump; + rte_bbdev_ops_param_string; };
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] bbdev: add new function to dump debug information
Quoted 61 lines · Nicolas Chautru
This provides a new API to dump more debug information related to the status on a given bbdev queue. Some of this information is visible at bbdev level. This also provides a new option dev op, to print more information at the lower PMD level.
This helps user to troubleshoot issues related to previous operations provided into a queue causing possible hard-to-debug negative scenarios.Signed-off-by Nicolas Chautru <[email protected]>--- lib/bbdev/rte_bbdev.c | 214 ++++++++++++++++++++++++++++++++++++++ lib/bbdev/rte_bbdev.h | 41 ++++++++ lib/bbdev/rte_bbdev_pmd.h | 9 ++ lib/bbdev/version.map | 4 + 4 files changed, 268 insertions(+)lib/bbdev/rte_bbdev.c +36
-0@@ -1190,3 +1190,217 @@ rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)rte_bbdev_log (ERR ,"Invalid enqueue status" );return NULL ; } + + +int +rte_bbdev_queue_ops_dump (uint16_t dev_id,uint16_t queue_id,FILE *f) +{ +struct rte_bbdev_queue_data *q_data; +struct rte_bbdev_stats *stats; +uint16_t i; +struct rte_bbdev *dev =get_dev (dev_id); + +VALID_DEV_OR_RET_ERR (dev, dev_id); +VALID_QUEUE_OR_RET_ERR (queue_id, dev); +VALID_DEV_OPS_OR_RET_ERR (dev, dev_id); +VALID_FUNC_OR_RET_ERR (dev->dev_ops->queue_ops_dump, dev_id); + + q_data = &dev->data->queues[queue_id]; + +if (f ==NULL ) +return -EINVAL ; + +fprintf (f,"Dump of operations on %s queue %d\n" , + dev->data->name, queue_id); +fprintf (f," Last Enqueue Status %s\n" , +rte_bbdev_enqueue_status_str (q_data->enqueue_status)); +for (i =0 ; i <RTE_BBDEV_ENQ_STATUS_SIZE_MAX ; i++) +if (q_data->queue_stats.enqueue_status_count[i] >0 ) +fprintf (f," Enqueue Status Counters %s %" PRIu64"\n" , +rte_bbdev_enqueue_status_str (i), + q_data->queue_stats.enqueue_status_count[i]); + stats = &dev->data->queues[queue_id].queue_stats; + +fprintf (f," Enqueue Count %" PRIu64" Warning %" PRIu64" Error %" PRIu64"\n" , + stats->enqueued_count, stats->enqueue_warn_count, + stats->enqueue_err_count); + fprintf(f, " Dequeue Count %" PRIu64 " Warning %" PRIu64 " Error %" PRIu64 "\n", + stats->dequeued_count, stats->dequeue_warn_count,
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status) · line 1238
Quoted 10 lines
lib/bbdev/rte_bbdev.c +10
-0+ stats->dequeue_err_count); + +return dev->dev_ops->queue_ops_dump (dev, queue_id, f); +} + +char * +rte_bbdev_ops_param_string (void *op,enum rte_bbdev_op_type op_type) +{ +static char str[1024 ]; +static char partial[1024 ];
It is better to have the string allocated by the application, it would be passed as a pointer and length of the allocated buffer would be passed also as an argument.
Quoted 260 lines
lib/bbdev/rte_bbdev.c +168
-0+struct rte_bbdev_dec_op *op_dec; +struct rte_bbdev_enc_op *op_enc; +struct rte_bbdev_fft_op *op_fft; +struct rte_bbdev_mldts_op *op_mldts; + +rte_iova_t add0 =0 , add1 =0 , add2 =0 , add3 =0 , add4 =0 ; + +if (op ==NULL ) { +snprintf (str,sizeof (str),"Invalid Operation pointer\n" ); +return str; + } + +if (op_type ==RTE_BBDEV_OP_LDPC_DEC ) { + op_dec = op; +if (op_dec->ldpc_dec.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d" , + op_dec->ldpc_dec.tb_params.c, + op_dec->ldpc_dec.tb_params.cab, + op_dec->ldpc_dec.tb_params.ea, + op_dec->ldpc_dec.tb_params.eb, + op_dec->ldpc_dec.tb_params.r); +else +snprintf (partial,sizeof (partial),"E %d" , op_dec->ldpc_dec.cb_params.e); +if (op_dec->ldpc_dec.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.input.data,0 ); +if (op_dec->ldpc_dec.hard_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.hard_output.data,0 ); +if (op_dec->ldpc_dec.soft_output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.soft_output.data,0 ); +if (op_dec->ldpc_dec.harq_combined_input.data !=NULL ) + add3 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.harq_combined_input.data, +0 ); +if (op_dec->ldpc_dec.harq_combined_output.data !=NULL ) + add4 =rte_pktmbuf_iova_offset (op_dec->ldpc_dec.harq_combined_output.data, +0 ); +snprintf (str,sizeof (str),"op %x st %x BG %d Zc %d Ncb %d qm %d F %d Rv %d It %d It %d " +"HARQin %d in %" PRIx64" ho %" PRIx64" so %" PRIx64" hi %" PRIx64" " +"ho %" PRIx64" %s\n" , + op_dec->ldpc_dec.op_flags, op_dec->status, + op_dec->ldpc_dec.basegraph, op_dec->ldpc_dec.z_c, + op_dec->ldpc_dec.n_cb, op_dec->ldpc_dec.q_m, + op_dec->ldpc_dec.n_filler, op_dec->ldpc_dec.rv_index, + op_dec->ldpc_dec.iter_max, op_dec->ldpc_dec.iter_count, + op_dec->ldpc_dec.harq_combined_input.length, + add0, add1, add2, add3, add4, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) { + op_dec = op; +if (op_dec->turbo_dec.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d K %d" , + op_dec->turbo_dec.tb_params.c, + op_dec->turbo_dec.tb_params.cab, + op_dec->turbo_dec.tb_params.ea, + op_dec->turbo_dec.tb_params.eb, + op_dec->turbo_dec.tb_params.r, + op_dec->turbo_dec.tb_params.k_neg); +else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_dec->turbo_dec.cb_params.e, + op_dec->turbo_dec.cb_params.k); +if (op_dec->turbo_dec.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.input.data,0 ); +if (op_dec->turbo_dec.hard_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.hard_output.data,0 ); +if (op_dec->turbo_dec.soft_output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_dec->turbo_dec.soft_output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x CBM %d Iter %d map %d Rv %d ext %d " +"in %" PRIx64" ho %" PRIx64" so %" PRIx64" %s\n" , + op_dec->turbo_dec.op_flags, op_dec->status, + op_dec->turbo_dec.code_block_mode, + op_dec->turbo_dec.iter_max, op_dec->turbo_dec.num_maps, + op_dec->turbo_dec.rv_index, op_dec->turbo_dec.ext_scale, + add0, add1, add2, partial); + }else if (op_type ==RTE_BBDEV_OP_LDPC_ENC ) { + op_enc = op; +if (op_enc->ldpc_enc.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial),"C %d Cab %d Ea %d Eb %d r %d" , + op_enc->ldpc_enc.tb_params.c, + op_enc->ldpc_enc.tb_params.cab, + op_enc->ldpc_enc.tb_params.ea, + op_enc->ldpc_enc.tb_params.eb, + op_enc->ldpc_enc.tb_params.r); +else +snprintf (partial,sizeof (partial),"E %d" , + op_enc->ldpc_enc.cb_params.e); +if (op_enc->ldpc_enc.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_enc->ldpc_enc.input.data,0 ); +if (op_enc->ldpc_enc.output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_enc->ldpc_enc.output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x BG %d Zc %d Ncb %d q_m %d F %d Rv %d " +"in %" PRIx64" out %" PRIx64" %s\n" , + op_enc->ldpc_enc.op_flags, op_enc->status, + op_enc->ldpc_enc.basegraph, op_enc->ldpc_enc.z_c, + op_enc->ldpc_enc.n_cb, op_enc->ldpc_enc.q_m, + op_enc->ldpc_enc.n_filler, op_enc->ldpc_enc.rv_index, + add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) { + op_enc = op; +if (op_enc->turbo_enc.code_block_mode ==RTE_BBDEV_TRANSPORT_BLOCK ) +snprintf (partial,sizeof (partial), +"C %d Cab %d Ea %d Eb %d r %d K %d Ncb %d" , + op_enc->turbo_enc.tb_params.c, + op_enc->turbo_enc.tb_params.cab, + op_enc->turbo_enc.tb_params.ea, + op_enc->turbo_enc.tb_params.eb, + op_enc->turbo_enc.tb_params.r, + op_enc->turbo_enc.tb_params.k_neg, + op_enc->turbo_enc.tb_params.ncb_neg); +else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_enc->turbo_enc.cb_params.e, + op_enc->turbo_enc.cb_params.k); +if (op_enc->turbo_enc.input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_enc->turbo_enc.input.data,0 ); +if (op_enc->turbo_enc.output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_enc->turbo_enc.output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x CBM %d Rv %d In %" PRIx64" Out %" PRIx64" %s\n" , + op_enc->turbo_enc.op_flags, op_enc->status, + op_enc->turbo_enc.code_block_mode, op_enc->turbo_enc.rv_index, + add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_FFT ) { + op_fft = op; +if (op_fft->fft.base_input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_fft->fft.base_input.data,0 ); +if (op_fft->fft.base_output.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_fft->fft.base_output.data,0 ); +if (op_fft->fft.dewindowing_input.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_fft->fft.dewindowing_input.data,0 ); +if (op_fft->fft.power_meas_output.data !=NULL ) + add3 =rte_pktmbuf_iova_offset (op_fft->fft.power_meas_output.data,0 ); +snprintf (str,sizeof (str),"op %x st %x in %d inl %d out %d outl %d cs %x ants %d " +"idft %d dft %d cst %d ish %d dsh %d ncs %d pwsh %d fp16 %d fr %d " +"outde %d in %" PRIx64" out %" PRIx64" dw %" PRIx64" " +"pm %" PRIx64"\n" , + op_fft->fft.op_flags, op_fft->status, + op_fft->fft.input_sequence_size, op_fft->fft.input_leading_padding, + op_fft->fft.output_sequence_size, + op_fft->fft.output_leading_depadding, + op_fft->fft.cs_bitmap, op_fft->fft.num_antennas_log2, + op_fft->fft.idft_log2, op_fft->fft.dft_log2, + op_fft->fft.cs_time_adjustment, + op_fft->fft.idft_shift, op_fft->fft.dft_shift, + op_fft->fft.ncs_reciprocal, op_fft->fft.power_shift, + op_fft->fft.fp16_exp_adjust, op_fft->fft.freq_resample_mode, + op_fft->fft.output_depadded_size, add0, add1, add2, add3); + }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { + op_mldts = op; +if (op_mldts->mldts.qhy_input.data !=NULL ) + add0 =rte_pktmbuf_iova_offset (op_mldts->mldts.qhy_input.data,0 ); +if (op_mldts->mldts.r_input.data !=NULL ) + add1 =rte_pktmbuf_iova_offset (op_mldts->mldts.r_input.data,0 ); +if (op_mldts->mldts.output.data !=NULL ) + add2 =rte_pktmbuf_iova_offset (op_mldts->mldts.output.data,0 ); +snprintf (str,sizeof (str), +"op %x st %x rbs %d lay %d rrep %d crep%d qm %d %d %d %d " +"qhy %" PRIx64" r %" PRIx64" out %" PRIx64"\n" , + op_mldts->mldts.op_flags, op_mldts->status, + op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers, + op_mldts->mldts.r_rep, op_mldts->mldts.c_rep, + op_mldts->mldts.q_m[0 ], op_mldts->mldts.q_m[1 ], + op_mldts->mldts.q_m[2 ], op_mldts->mldts.q_m[3 ], + add0, add1, add2); + + }else { +snprintf (str,sizeof (str),"Invalid Operation type %d\n" , op_type); + } + +return str; +}lib/bbdev/rte_bbdev.h +41
-0@@ -1061,6 +1061,47 @@ rte_bbdev_device_status_str(enum rte_bbdev_device_status status);const char *rte_bbdev_enqueue_status_str (enum rte_bbdev_enqueue_status status); +/** +* Dump operations info from device to a file. +* This API is used for debugging provided input operations, not a dataplane API. +* +* @param dev_id +* The device identifier. +* +* @param queue_index +* Index of queue. +* +* @param file +* A pointer to a file for output. +* +* @returns +* - 0 on success +* - ENOTSUP if interrupts are not supported by the identified device +* - negative value on failure - as returned from PMD +* +*/ +__rte_experimental +int +rte_bbdev_queue_ops_dump (uint16_t dev_id,uint16_t queue_index,FILE *file); + + +/** +* String of parameters related to the parameters of an operation of a given type. +* +* @param op +* Pointer to an operation. +* +* @param op_type +* Operation type enum. +* +* @returns +* String describing the provided operation. +* +*/ +__rte_experimental +char * +rte_bbdev_ops_param_string (void *op,enum rte_bbdev_op_type op_type); + #ifdef __cplusplus }#endif lib/bbdev/rte_bbdev_pmd.h +9
-0@@ -133,6 +133,13 @@ typedef int (*rte_bbdev_queue_intr_enable_t)(struct rte_bbdev *dev,typedef int (*rte_bbdev_queue_intr_disable_t )(struct rte_bbdev *dev,uint16_t queue_id); +/* +* @internal +* Function to dump previous operations on a queue of a device. +*/ +typedef int (*rte_bbdev_queue_ops_dump_t )(struct rte_bbdev *dev, +uint16_t queue_id,FILE *file); +/** * Operations implemented by drivers. Fields marked as "Required" must be * provided by a driver for a device to have basic functionality. "Optional" @@ -170,6 +177,8 @@ struct rte_bbdev_ops {rte_bbdev_queue_intr_enable_t queue_intr_enable;/** Disable queue interrupt. Optional */ rte_bbdev_queue_intr_disable_t queue_intr_disable; +/** Dump operations on the queue. Optional */ +rte_bbdev_queue_ops_dump_t queue_ops_dump; };/** lib/bbdev/version.map +4
-0@@ -54,4 +54,8 @@ EXPERIMENTAL { rte_bbdev_enqueue_mldts_ops; rte_bbdev_mldts_op_alloc_bulk; rte_bbdev_mldts_op_free_bulk; + + # added in 24.11 + rte_bbdev_queue_ops_dump; + rte_bbdev_ops_param_string; };
RE: [PATCH v2 1/2] bbdev: add new function to dump debug information
Hi Maxime,
Quoted 80 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, September 13, 2024 7:10 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 1/2] bbdev: add new function to dump debug informationQuoted 9 lines · Nicolas Chautru
This provides a new API to dump more debug information related to the status on a given bbdev queue.
Some of this information is visible at bbdev level.
This also provides a new option dev op, to print more information at the lower PMD level.
This helps user to troubleshoot issues related to previous operations provided into a queue causing possible hard-to-debug negative scenarios.Quoted 3 lines
Signed-off-by Nicolas Chautru <[email protected]>--- lib/bbdev/rte_bbdev.c | 214++++++++++++++++++++++++++++++++++++++
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum
Quoted 10 lines
lib/bbdev/rte_bbdev.h | 41 ++++++++ lib/bbdev/rte_bbdev_pmd.h | 9 ++ lib/bbdev/version.map | 4 + 4 files changed, 268 insertions(+)lib/bbdev/rte_bbdev.c index renamed from lib/bbdev/rte_bbdev.c +0
-0
13bde3c25b..9087862c76100644lib/bbdev/rte_bbdev.c +0
-0@@ -1190,3 +1190,217 @@ rte_bbdev_enqueue_status_str(enum
rte_bbdev_enqueue_statusstatus)Quoted 7 lines
lib/bbdev/rte_bbdev.c +4
-0rte_bbdev_log (ERR ,"Invalid enqueue status" );return NULL ; } + + +int +rte_bbdev_queue_ops_dump (uint16_t dev_id,uint16_t queue_id,FILE *f)lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 10 lines
lib/bbdev/rte_bbdev.c +10
-0+{ +struct rte_bbdev_queue_data *q_data; +struct rte_bbdev_stats *stats; +uint16_t i; +struct rte_bbdev *dev =get_dev (dev_id); + +VALID_DEV_OR_RET_ERR (dev, dev_id); +VALID_QUEUE_OR_RET_ERR (queue_id, dev); +VALID_DEV_OPS_OR_RET_ERR (dev, dev_id); + VALID_FUNC_OR_RET_ERR(dev->dev_ops->queue_ops_dump,
dev_id);Quoted 11 lines
lib/bbdev/rte_bbdev.c +10
-0+ + q_data = &dev->data->queues[queue_id]; + +if (f ==NULL ) +return -EINVAL ; + +fprintf (f,"Dump of operations on %s queue %d\n" , + dev->data->name, queue_id); + fprintf(f, " Last Enqueue Status %s\n", + rte_bbdev_enqueue_status_str(q_data-
enqueue_status));lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 3 lines
lib/bbdev/rte_bbdev.c +3
-0+for (i =0 ; i <RTE_BBDEV_ENQ_STATUS_SIZE_MAX ; i++) +if (q_data->queue_stats.enqueue_status_count[i] >0 ) + fprintf(f, " Enqueue Status Counters %s %" PRIu64"\n",
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 6 lines
lib/bbdev/rte_bbdev.c +2
-0+rte_bbdev_enqueue_status_str (i), + q_data-queue_stats.enqueue_status_count[i]);
lib/bbdev/rte_bbdev.c +3
-0+ stats = &dev->data->queues[queue_id].queue_stats; + + fprintf(f, " Enqueue Count %" PRIu64 " Warning %" PRIu64 " Error %"PRIu64 "\n",
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 3 lines
lib/bbdev/rte_bbdev.c +3
-0+ stats->enqueued_count, stats->enqueue_warn_count, + stats->enqueue_err_count); + fprintf(f, " Dequeue Count %" PRIu64 " Warning %" PRIu64 " Error %"PRIu64 "\n",
Quoted 14 lines
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status) · line 1238
Quoted 10 lines
lib/bbdev/rte_bbdev.c +10
-0+ stats->dequeued_count, stats->dequeue_warn_count, + stats->dequeue_err_count); + +return dev->dev_ops->queue_ops_dump (dev, queue_id, f); } + +char * +rte_bbdev_ops_param_string (void *op,enum rte_bbdev_op_type op_type) +{ +static char str[1024 ]; +static char partial[1024 ];It is better to have the string allocated by the application, it would be passed as a pointer and length of the allocated buffer would be passed also as an argument.
Ok. Updated in v3. Thanks
Quoted 325 lines
Quoted 6 lines
lib/bbdev/rte_bbdev.c +5
-0+struct rte_bbdev_dec_op *op_dec; +struct rte_bbdev_enc_op *op_enc; +struct rte_bbdev_fft_op *op_fft; +struct rte_bbdev_mldts_op *op_mldts; +lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 10 lines
lib/bbdev/rte_bbdev.c +10
-0+rte_iova_t add0 =0 , add1 =0 , add2 =0 , add3 =0 , add4 =0 ; + +if (op ==NULL ) { +snprintf (str,sizeof (str),"Invalid Operation pointer\n" ); +return str; + } + +if (op_type ==RTE_BBDEV_OP_LDPC_DEC ) { + op_dec = op; + if (op_dec->ldpc_dec.code_block_mode ==
RTE_BBDEV_TRANSPORT_BLOCK)lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(partial, sizeof(partial), "C %d Cab %d Ea %d Eb%d r %d",
Quoted 24 lines
lib/bbdev/rte_bbdev.c +7
-0+ op_dec->ldpc_dec.tb_params.c, + op_dec->ldpc_dec.tb_params.cab, + op_dec->ldpc_dec.tb_params.ea, + op_dec->ldpc_dec.tb_params.eb, + op_dec->ldpc_dec.tb_params.r); + else + snprintf(partial, sizeof(partial), "E %d", op_dec-ldpc_dec.cb_params.e);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->ldpc_dec.input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_dec-ldpc_dec.input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->ldpc_dec.hard_output.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_dec-ldpc_dec.hard_output.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->ldpc_dec.soft_output.data !=NULL ) + add2 = rte_pktmbuf_iova_offset(op_dec-ldpc_dec.soft_output.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->ldpc_dec.harq_combined_input.data !=NULL ) + add3 = rte_pktmbuf_iova_offset(op_dec-ldpc_dec.harq_combined_input.data,
lib/bbdev/rte_bbdev.c +3
-0+ 0); +if (op_dec->ldpc_dec.harq_combined_output.data !=NULL ) + add4 = rte_pktmbuf_iova_offset(op_dec-ldpc_dec.harq_combined_output.data,
lib/bbdev/rte_bbdev.c
Quoted 2 lines
lib/bbdev/rte_bbdev.c +2
-0+ 0); + snprintf(str, sizeof(str), "op %x st %x BG %d Zc %d Ncb %d qm%d F %d Rv %d It %d It %d "
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+"HARQin %d in %" PRIx64" ho %" PRIx64" so %" PRIx64 " hi %" PRIx64 " "
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 13 lines
lib/bbdev/rte_bbdev.c +5
-0+"ho %" PRIx64" %s\n" , + op_dec->ldpc_dec.op_flags, op_dec->status, + op_dec->ldpc_dec.basegraph, op_dec->ldpc_dec.z_c, + op_dec->ldpc_dec.n_cb, op_dec->ldpc_dec.q_m, + op_dec->ldpc_dec.n_filler, op_dec-ldpc_dec.rv_index,
lib/bbdev/rte_bbdev.c +1
-0+ op_dec->ldpc_dec.iter_max, op_dec-ldpc_dec.iter_count,
lib/bbdev/rte_bbdev.c +5
-0+ op_dec->ldpc_dec.harq_combined_input.length, + add0, add1, add2, add3, add4, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_DEC ) { + op_dec = op; + if (op_dec->turbo_dec.code_block_mode ==
RTE_BBDEV_TRANSPORT_BLOCK)lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(partial, sizeof(partial), "C %d Cab %d Ea %d Eb%d r %d K %d",
Quoted 20 lines
lib/bbdev/rte_bbdev.c +6
-0+ op_dec->turbo_dec.tb_params.c, + op_dec->turbo_dec.tb_params.cab, + op_dec->turbo_dec.tb_params.ea, + op_dec->turbo_dec.tb_params.eb, + op_dec->turbo_dec.tb_params.r, + op_dec-turbo_dec.tb_params.k_neg);
lib/bbdev/rte_bbdev.c +6
-0+else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_dec->turbo_dec.cb_params.e, + op_dec->turbo_dec.cb_params.k); +if (op_dec->turbo_dec.input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_dec-turbo_dec.input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->turbo_dec.hard_output.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_dec-turbo_dec.hard_output.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_dec->turbo_dec.soft_output.data !=NULL ) + add2 = rte_pktmbuf_iova_offset(op_dec-turbo_dec.soft_output.data, 0);
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(str, sizeof(str), "op %x st %x CBM %d Iter %d map %dRv %d ext %d "
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ "in %" PRIx64 " ho %" PRIx64 " so %" PRIx64 "%s\n",
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 10 lines
lib/bbdev/rte_bbdev.c +3
-0+ op_dec->turbo_dec.op_flags, op_dec->status, + op_dec->turbo_dec.code_block_mode, + op_dec->turbo_dec.iter_max, op_dec-turbo_dec.num_maps,
lib/bbdev/rte_bbdev.c +1
-0+ op_dec->turbo_dec.rv_index, op_dec-turbo_dec.ext_scale,
lib/bbdev/rte_bbdev.c +4
-0+ add0, add1, add2, partial); + }else if (op_type ==RTE_BBDEV_OP_LDPC_ENC ) { + op_enc = op; + if (op_enc->ldpc_enc.code_block_mode ==
RTE_BBDEV_TRANSPORT_BLOCK)lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(partial, sizeof(partial), "C %d Cab %d Ea %d Eb%d r %d",
Quoted 14 lines
lib/bbdev/rte_bbdev.c +10
-0+ op_enc->ldpc_enc.tb_params.c, + op_enc->ldpc_enc.tb_params.cab, + op_enc->ldpc_enc.tb_params.ea, + op_enc->ldpc_enc.tb_params.eb, + op_enc->ldpc_enc.tb_params.r); + else + snprintf(partial, sizeof(partial), "E %d", + op_enc->ldpc_enc.cb_params.e); +if (op_enc->ldpc_enc.input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_enc-ldpc_enc.input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_enc->ldpc_enc.output.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_enc-ldpc_enc.output.data, 0);
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(str, sizeof(str), "op %x st %x BG %d Zc %d Ncb %d q_m%d F %d Rv %d "
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 12 lines
lib/bbdev/rte_bbdev.c +3
-0+"in %" PRIx64" out %" PRIx64" %s\n" , + op_enc->ldpc_enc.op_flags, op_enc->status, + op_enc->ldpc_enc.basegraph, op_enc-ldpc_enc.z_c,
lib/bbdev/rte_bbdev.c +1
-0+ op_enc->ldpc_enc.n_cb, op_enc-ldpc_enc.q_m,
lib/bbdev/rte_bbdev.c +1
-0+ op_enc->ldpc_enc.n_filler, op_enc-ldpc_enc.rv_index,
lib/bbdev/rte_bbdev.c +4
-0+ add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_TURBO_ENC ) { + op_enc = op; + if (op_enc->turbo_enc.code_block_mode ==
RTE_BBDEV_TRANSPORT_BLOCK)lib/bbdev/rte_bbdev.c
Quoted 2 lines
lib/bbdev/rte_bbdev.c +2
-0+ snprintf(partial, sizeof(partial), + "C %d Cab %d Ea %d Eb %d r %d K %dNcb %d",
Quoted 18 lines
lib/bbdev/rte_bbdev.c +7
-0+ op_enc->turbo_enc.tb_params.c, + op_enc->turbo_enc.tb_params.cab, + op_enc->turbo_enc.tb_params.ea, + op_enc->turbo_enc.tb_params.eb, + op_enc->turbo_enc.tb_params.r, + op_enc->turbo_enc.tb_params.k_neg, + op_enc-turbo_enc.tb_params.ncb_neg);
lib/bbdev/rte_bbdev.c +6
-0+else +snprintf (partial,sizeof (partial),"E %d K %d" , + op_enc->turbo_enc.cb_params.e, + op_enc->turbo_enc.cb_params.k); +if (op_enc->turbo_enc.input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_enc-turbo_enc.input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_enc->turbo_enc.output.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_enc-turbo_enc.output.data, 0);
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(str, sizeof(str), "op %x st %x CBM %d Rv %d In %"PRIx64 " Out %" PRIx64 " %s\n",
lib/bbdev/rte_bbdev.c
Quoted 2 lines
lib/bbdev/rte_bbdev.c +2
-0+ op_enc->turbo_enc.op_flags, op_enc->status, + op_enc->turbo_enc.code_block_mode,
op_enc->turbo_enc.rv_index,Quoted 15 lines
lib/bbdev/rte_bbdev.c +5
-0+ add0, add1, partial); + }else if (op_type ==RTE_BBDEV_OP_FFT ) { + op_fft = op; +if (op_fft->fft.base_input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_fft-fft.base_input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_fft->fft.base_output.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_fft-fft.base_output.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_fft->fft.dewindowing_input.data !=NULL ) + add2 = rte_pktmbuf_iova_offset(op_fft-fft.dewindowing_input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_fft->fft.power_meas_output.data !=NULL ) + add3 = rte_pktmbuf_iova_offset(op_fft-fft.power_meas_output.data, 0);
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ snprintf(str, sizeof(str), "op %x st %x in %d inl %d out %d outl%d cs %x ants %d "
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ "idft %d dft %d cst %d ish %d dsh %d ncs %dpwsh %d fp16 %d fr %d "
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ "outde %d in %" PRIx64 " out %" PRIx64 " dw%" PRIx64 " "
Quoted 15 lines
lib/bbdev/rte_bbdev.c +3
-0+"pm %" PRIx64"\n" , + op_fft->fft.op_flags, op_fft->status, + op_fft->fft.input_sequence_size, op_fft-fft.input_leading_padding,
lib/bbdev/rte_bbdev.c +3
-0+ op_fft->fft.output_sequence_size, + op_fft->fft.output_leading_depadding, + op_fft->fft.cs_bitmap, op_fft-fft.num_antennas_log2,
lib/bbdev/rte_bbdev.c +4
-0+ op_fft->fft.idft_log2, op_fft->fft.dft_log2, + op_fft->fft.cs_time_adjustment, + op_fft->fft.idft_shift, op_fft->fft.dft_shift, + op_fft->fft.ncs_reciprocal, op_fft-fft.power_shift,
lib/bbdev/rte_bbdev.c +1
-0+ op_fft->fft.fp16_exp_adjust, op_fft-fft.freq_resample_mode,
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+ op_fft->fft.output_depadded_size, add0, add1,add2, add3);
lib/bbdev/rte_bbdev.c
Quoted 13 lines
lib/bbdev/rte_bbdev.c +4
-0+ }else if (op_type ==RTE_BBDEV_OP_MLDTS ) { + op_mldts = op; +if (op_mldts->mldts.qhy_input.data !=NULL ) + add0 = rte_pktmbuf_iova_offset(op_mldts-mldts.qhy_input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_mldts->mldts.r_input.data !=NULL ) + add1 = rte_pktmbuf_iova_offset(op_mldts-mldts.r_input.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+if (op_mldts->mldts.output.data !=NULL ) + add2 = rte_pktmbuf_iova_offset(op_mldts-mldts.output.data, 0);
lib/bbdev/rte_bbdev.c +2
-0+ snprintf(str, sizeof(str), + "op %x st %x rbs %d lay %d rrep %d crep%dqm %d %d %d %d "
lib/bbdev/rte_bbdev.c
Quoted 1 line
lib/bbdev/rte_bbdev.c +1
-0+"qhy %" PRIx64" r %" PRIx64" out %" PRIx64"\n",
lib/bbdev/rte_bbdev.c rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status)
Quoted 13 lines
lib/bbdev/rte_bbdev.c +2
-0+ op_mldts->mldts.op_flags, op_mldts->status, + op_mldts->mldts.num_rbs, op_mldts-mldts.num_layers,
lib/bbdev/rte_bbdev.c +1
-0+ op_mldts->mldts.r_rep, op_mldts-mldts.c_rep,
lib/bbdev/rte_bbdev.c +1
-0+ op_mldts->mldts.q_m[0], op_mldts-mldts.q_m[1],
lib/bbdev/rte_bbdev.c +1
-0+ op_mldts->mldts.q_m[2], op_mldts-mldts.q_m[3],
lib/bbdev/rte_bbdev.c +4
-0+ add0, add1, add2); + + }else { + snprintf(str, sizeof(str), "Invalid Operation type %d\n",
op_type);lib/bbdev/rte_bbdev.h rte_bbdev_device_status_str(enum
Quoted 9 lines
lib/bbdev/rte_bbdev.c +4
-0+ } + +return str; +}lib/bbdev/rte_bbdev.h index renamed from lib/bbdev/rte_bbdev.h +0
-0
0cbfdd1c95..a70d841379100644lib/bbdev/rte_bbdev.h +0
-0@@ -1061,6 +1061,47 @@ rte_bbdev_device_status_str(enum
rte_bbdev_device_statusstatus);lib/bbdev/rte_bbdev.h rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
Quoted 6 lines
lib/bbdev/rte_bbdev.h +3
-0const char *rte_bbdev_enqueue_status_str (enum rte_bbdev_enqueue_status status); +/** +* Dump operations info from device to a file. +* This API is used for debugging provided input operations, not a dataplane API.
Quoted 14 lines
lib/bbdev/rte_bbdev.h +14
-0+* +* @param dev_id +* The device identifier. +* +* @param queue_index +* Index of queue. +* +* @param file +* A pointer to a file for output. +* +* @returns +* - 0 on success +* - ENOTSUP if interrupts are not supported by the identified device +* - negative value on failure - as returned from PMD lib/bbdev/rte_bbdev.h rte_bbdev_device_status_str(enum rte_bbdev_device_status status);
Quoted 10 lines
lib/bbdev/rte_bbdev.h +10
-0+* +*/ +__rte_experimental +int +rte_bbdev_queue_ops_dump (uint16_t dev_id,uint16_t queue_index,FILE +*file); + + +/** +* String of parameters related to the parameters of an operation of a given type.
lib/bbdev/rte_bbdev_pmd.h typedef int
Quoted 23 lines
lib/bbdev/rte_bbdev.h +15
-0+* +* @param op +* Pointer to an operation. +* +* @param op_type +* Operation type enum. +* +* @returns +* String describing the provided operation. +* +*/ +__rte_experimental +char * +rte_bbdev_ops_param_string (void *op,enum rte_bbdev_op_type op_type); + #ifdef __cplusplus }#endif lib/bbdev/rte_bbdev_pmd.h +0
-0@@ -133,6 +133,13 @@ typedef int(*rte_bbdev_queue_intr_enable_t)(struct
rte_bbdev*dev,Quoted 35 lines
lib/bbdev/rte_bbdev_pmd.h +9
-0typedef int (*rte_bbdev_queue_intr_disable_t )(struct rte_bbdev *dev,uint16_t queue_id); +/* +* @internal +* Function to dump previous operations on a queue of a device. +*/ +typedef int (*rte_bbdev_queue_ops_dump_t )(struct rte_bbdev *dev, +uint16_t queue_id,FILE *file); +/** * Operations implemented by drivers. Fields marked as "Required" must be * provided by a driver for a device to have basic functionality. "Optional" @@ -170,6 +177,8 @@ struct rte_bbdev_ops {rte_bbdev_queue_intr_enable_t queue_intr_enable;/** Disable queue interrupt. Optional */ rte_bbdev_queue_intr_disable_t queue_intr_disable; +/** Dump operations on the queue. Optional */ +rte_bbdev_queue_ops_dump_t queue_ops_dump; };/** lib/bbdev/version.map index renamed from lib/bbdev/version.map +0
-0
e0d82ff752..db6dfdf3c6100644lib/bbdev/version.map +4
-0@@ -54,4 +54,8 @@ EXPERIMENTAL { rte_bbdev_enqueue_mldts_ops; rte_bbdev_mldts_op_alloc_bulk; rte_bbdev_mldts_op_free_bulk; + + # added in 24.11 + rte_bbdev_queue_ops_dump; + rte_bbdev_ops_param_string; };
PATCH v2 2/2 baseband/acc: improvement to logging mechanism
In reply to Nicolas ChautruSupport the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128 +++++++++++++++++++++++------ 2 files changed, 138 insertions(+), 27 deletions(-)
drivers/baseband/acc/acc_common.h +37 -0
@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;
@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for error log. */ +uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal driver memory. +* +* This function is used to log an error for a specific ACC queue and operation. +* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. +*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) +{ +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); +vsnprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , fmt, args2); + q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write (void *addr,uint32_t value)
drivers/baseband/acc/rte_vrb_pmd.c +101 -27
260 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Quoted 24 lines · Nicolas Chautru
Support the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128 +++++++++++++++++++++++------ 2 files changed, 138 insertions(+), 27 deletions(-)drivers/baseband/acc/acc_common.h +2
-0@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 651
Quoted 4 lines
drivers/baseband/acc/acc_common.h +1
-0@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for error log. */
65KB is quite big for each queues
I don't see the point of all this, as errors are already logged using rte_bbdev_log. Only thing you miss is the queue/device info in curretn solution, no?
Quoted 324 lines
drivers/baseband/acc/acc_common.h +34
-0+uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal driver memory. +* +* This function is used to log an error for a specific ACC queue and operation. +* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. +*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) +{ +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); +vsnprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , fmt, args2); + q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write (void *addr,uint32_t value)drivers/baseband/acc/rte_vrb_pmd.c +101
-27@@ -1022,6 +1022,10 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id, q->mmio_reg_enqueue =RTE_PTR_ADD (d->mmio_base, d->queue_offset (d->pf_device, q->vf_id, q->qgrp_id, q->aq_id)); +/** initialize the error buffer. */ + q->error_head =0 ; + q->error_wrap =0 ; + rte_bbdev_log_debug( "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p\n", dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,@@ -1434,6 +1438,74 @@ vrb_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)return 0 ; } + +static int +vrb_queue_ops_dump (struct rte_bbdev *dev,uint16_t queue_id,FILE *f) +{ +struct acc_queue *q = dev->data->queues[queue_id].queue_private; +struct rte_bbdev_dec_op *op; +uint16_t start_err, end_err, i, int_nb; +volatile union acc_info_ring_data *ring_data; +uint16_t info_ring_head = q->d->info_ring_head; + +if (f ==NULL ) { +rte_bbdev_log (ERR ,"Invalid File input" ); +return -EINVAL ; + } + +/** Print generic information on queue status. */ +fprintf (f,"Dump of operations %s on Queue %d by %s\n" , +rte_bbdev_op_type_str (q->op_type), queue_id, dev->device->driver->name); +fprintf (f," AQ Enqueued %d Dequeued %d Depth %d - Available Enq %d Deq %d\n" , + q->aq_enqueued, q->aq_dequeued, q->aq_depth, +acc_ring_avail_enq (q),acc_ring_avail_deq (q)); + +/** Print information captured in the error buffer. */ +if (q->error_wrap ==0 ) { + start_err =0 ; + end_err = q->error_head; + }else { + start_err = q->error_head; + end_err = q->error_head +ACC_MAX_BUFFERLEN ; + } +fprintf (f,"Error Buffer - Head %d Wrap %d\n" , q->error_head, q->error_wrap); +for (i = start_err; i < end_err; ++i) +fprintf (f," %d\t%s" , i, q->error_bufs[i %ACC_MAX_BUFFERLEN ]); + +/** Print information captured in the info ring. */ +if (q->d->info_ring !=NULL ) { +fprintf (f,"Info Ring Buffer - Head %d\n" , q->d->info_ring_head); + ring_data = q->d->info_ring + (q->d->info_ring_head &ACC_INFO_RING_MASK ); +while (ring_data->valid) { + int_nb =int_from_ring (*ring_data, q->d->device_variant); +if ((int_nb <ACC_PF_INT_DMA_DL_DESC_IRQ ) || ( + int_nb >ACC_PF_INT_DMA_MLD_DESC_IRQ )) { +fprintf (f," InfoRing: ITR:%d Info:0x%x" , + int_nb, ring_data->detailed_info); +/* Initialize Info Ring entry and move forward. */ + ring_data->valid =0 ; + } + info_ring_head++; + ring_data = q->d->info_ring + (info_ring_head &ACC_INFO_RING_MASK ); + } + } + +fprintf (f,"Ring Content - Head %d Tail %d Depth %d\n" , + q->sw_ring_head, q->sw_ring_tail, q->sw_ring_depth); +/** Print information about each operation in the software ring. */ +for (i =0 ; i < q->sw_ring_depth; ++i) { + op = (q->ring_addr + i)->req.op_addr; +if (op !=NULL ) +fprintf (f," %d\tn %d %s" , + i, (q->ring_addr + i)->req.numCBs, +rte_bbdev_ops_param_string (op, q->op_type)); + } + +fprintf (f,"== End of File ==\n" ); + +return 0 ; +} +static const struct rte_bbdev_ops vrb_bbdev_ops = { .setup_queues = vrb_setup_queues, .intr_enable = vrb_intr_enable,@@ -1443,7 +1515,8 @@ static const struct rte_bbdev_ops vrb_bbdev_ops = { .queue_release = vrb_queue_release, .queue_stop = vrb_queue_stop, .queue_intr_enable = vrb_queue_intr_enable, - .queue_intr_disable = vrb_queue_intr_disable + .queue_intr_disable = vrb_queue_intr_disable, + .queue_ops_dump = vrb_queue_ops_dump };/* PCI PF address map. */ @@ -1680,7 +1753,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *s_out_offset, uint32_t *h_out_length, uint32_t *s_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, uint8_t r) + uint32_t *seg_total_left, uint8_t r, struct acc_queue *q) { int next_triplet = 1; /* FCW already done. */uint16_t k;@@ -1724,8 +1797,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, kw =RTE_ALIGN_CEIL (k +4 ,32 ) *3 ;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < kw))) { -rte_bbdev_log (ERR , -"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u" , +acc_error_log (q, (void *)op, +"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u\n" , *mbuf_total_left, kw);return -1 ; }@@ -1735,8 +1808,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,check_bit (op->turbo_dec.op_flags, RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { -rte_bbdev_log (ERR , -"Mismatch between data to process and mbuf data length in bbdev_op: %p" , +acc_error_log (q, (void *)op, +"Mismatch between data to process and mbuf data length in bbdev_op: %p\n" , op);return -1 ; }@@ -1748,7 +1821,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, desc, h_output, *h_out_offset, *h_out_length, next_triplet, ACC_DMA_BLKID_OUT_HARD);if (unlikely (next_triplet <0 )) { -rte_bbdev_log (ERR , +acc_error_log (q, (void *)op,"Mismatch between data to process and mbuf data length in bbdev_op: %p" , op);return -1 ;@@ -1760,7 +1833,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,/* Soft output. */ if (check_bit (op->turbo_dec.op_flags,RTE_BBDEV_TURBO_SOFT_OUTPUT )) {if (op->turbo_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); +acc_error_log (q, (void *)op,"Soft output is not defined\n" );return -1 ; } if (check_bit(op->turbo_dec.op_flags,@@ -1773,8 +1846,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, *s_out_offset, *s_out_length, next_triplet, ACC_DMA_BLKID_OUT_SOFT);if (unlikely (next_triplet <0 )) { -rte_bbdev_log (ERR , -"Mismatch between data to process and mbuf data length in bbdev_op: %p" , +acc_error_log (q, (void *)op, +"Mismatch between data to process and mbuf data length in bbdev_op: %p\n" , op);return -1 ; }@@ -1797,7 +1870,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, struct rte_mbuf **input, struct rte_mbuf *h_output, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *h_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t device_variant) + uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t device_variant, + struct acc_queue *q) { struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec;int next_triplet =1 ;/* FCW already done. */ @@ -1808,8 +1882,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,if (device_variant ==VRB1_VARIANT ) {if (check_bit (op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION ) ||check_bit (op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_SOFT_OUT_ENABLE )) { -rte_bbdev_log (ERR , -"VRB1 does not support the requested capabilities %x" , +acc_error_log (q, (void *)op, +"VRB1 does not support the requested capabilities %x\n" , op->ldpc_dec.op_flags);return -1 ; }@@ -1829,8 +1903,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, output_length =K - dec->n_filler - crc24_overlap;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < input_length))) { -rte_bbdev_log (ERR , -"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u" , +acc_error_log (q, (void *)op, +"Mismatch between mbuf length and included CB sizes: mbuf len %u, cb len %u\n" , *mbuf_total_left, input_length);return -1 ; }@@ -1842,15 +1916,15 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { -rte_bbdev_log (ERR , -"Mismatch between data to process and mbuf data length in bbdev_op: %p" , +acc_error_log (q, (void *)op, +"Mismatch between data to process and mbuf data length in bbdev_op: %p\n" , op);return -1 ; }if (check_bit (op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE )) {if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); +acc_error_log (q, (void *)op,"HARQ input is not defined\n" );return -1 ; } h_p_size = fcw->hcin_size0 + fcw->hcin_size1;@@ -1859,7 +1933,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,else if (fcw->hcin_decomp_mode ==4 ) h_p_size = h_p_size /2 ;if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); +acc_error_log (q, (void *)op,"HARQ input is not defined\n" );return -1 ; } acc_dma_fill_blk_type(@@ -1882,7 +1956,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,if (check_bit (op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_SOFT_OUT_ENABLE )) {if (op->ldpc_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); +acc_error_log (q, (void *)op,"Soft output is not defined\n" );return -1 ; } dec->soft_output.length = fcw->rm_e;@@ -1894,7 +1968,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,if (check_bit (op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE )) {if (op->ldpc_dec.harq_combined_output.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ output is not defined" ); +acc_error_log (q, (void *)op,"HARQ output is not defined\n" );return -1 ; }@@ -2326,8 +2400,8 @@ vrb2_enqueue_ldpc_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op *op in_length_in_bytes, &seg_total_left, next_triplet, check_bit(enc->op_flags, RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { -rte_bbdev_log (ERR , -"Mismatch between data to process and mbuf data length in bbdev_op: %p" , +acc_error_log (q, (void *)op, +"Mismatch between data to process and mbuf data length in bbdev_op: %p\n" , op);return -1 ; }@@ -2399,7 +2473,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, &mbuf_total_left, - &seg_total_left,0 ); + &seg_total_left,0 , q);if (unlikely (ret <0 ))return ret;@@ -2478,7 +2552,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op, ret =vrb_dma_desc_ld_fill (op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, - &seg_total_left, fcw, q->d->device_variant); + &seg_total_left, fcw, q->d->device_variant, q);if (unlikely (ret <0 ))return ret; }@@ -2572,7 +2646,7 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, &seg_total_left, - &desc->req.fcw_ld, q->d->device_variant); + &desc->req.fcw_ld, q->d->device_variant, q);if (unlikely (ret <0 ))return ret;@@ -2658,7 +2732,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op *op, ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, - &mbuf_total_left, &seg_total_left, r); + &mbuf_total_left, &seg_total_left, r, q);if (unlikely (ret <0 ))return ret;
RE: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Hi Maxime,
Quoted 43 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, September 13, 2024 7:18 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanismQuoted 8 lines · Nicolas Chautru
Support the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128 +++++++++++++++++++++++------
Quoted 17 lines
2 files changed, 138 insertions(+), 27 deletions(-)drivers/baseband/acc/acc_common.h +2
-0@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 651
Quoted 4 lines
drivers/baseband/acc/acc_common.h +1
-0@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for
Quoted 7 lines
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 652
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+error log. */ 65KB is quite big for each queues
I don't see the point of all this, as errors are already logged using
rte_bbdev_log. Only thing you miss is the queue/device info in curretn solution, no?
The rte_bbdev_log is only for std_output which would be disabled by default for real time application so very limited usability. Here we store the related information for the application to be able to retrieve themselves as required after the fact (not impacting real time).
Quoted 403 lines
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 7 lines
drivers/baseband/acc/acc_common.h +4
-0+uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal driver memory.
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 660
Quoted 2 lines
drivers/baseband/acc/acc_common.h +2
-0+* +* This function is used to log an error for a specific ACC queue and operation.
Quoted 5 lines
drivers/baseband/acc/acc_common.h +5
-0+* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +10
-0+*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) { +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); + vsnprintf(q->error_bufs[q->error_head], ACC_MAX_LOGLEN, fmt,args2);
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev,
Quoted 21 lines
drivers/baseband/acc/acc_common.h +12
-0+ q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write(void *addr, uint32_t value) diff --git
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
index585dc49bd6..9d0145d09b100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1022,6 +1022,10 @@ vrb_queue_setup(struct rte_bbdev *dev,
uint16_tqueue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0q->mmio_reg_enqueue =RTE_PTR_ADD (d->mmio_base, d->queue_offset (d->pf_device, q->vf_id, q->qgrp_id, q- aq_id)); +/** initialize the error buffer. */ + q->error_head =0 ; + q->error_wrap =0 ; + rte_bbdev_log_debug( "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u,aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
Quoted 1 line
dev->data->dev_id,queue_id,q->qgrp_id,q->vf_id,@@ -1434,6
Quoted 1 line
+1438,74 @@ vrb_queue_intr_disable(struct
rte_bbdev*dev,uint16_t
queue_id)Quoted 22 lines
return 0; }drivers/baseband/acc/rte_vrb_pmd.c +18
-0+ +static int +vrb_queue_ops_dump (struct rte_bbdev *dev,uint16_t queue_id,FILE *f) +{ +struct acc_queue *q = dev->data->queues[queue_id].queue_private; +struct rte_bbdev_dec_op *op; +uint16_t start_err, end_err, i, int_nb; +volatile union acc_info_ring_data *ring_data; +uint16_t info_ring_head = q->d->info_ring_head; + +if (f ==NULL ) { +rte_bbdev_log (ERR ,"Invalid File input" ); +return -EINVAL ; + } + +/** Print generic information on queue status. */ + fprintf(f, "Dump of operations %s on Queue %d by %s\n", + rte_bbdev_op_type_str(q->op_type), queue_id, dev-
device->driver->name);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ fprintf(f, " AQ Enqueued %d Dequeued %d Depth %d - Available Enq%d Deq %d\n",
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ q->aq_enqueued, q->aq_dequeued, q->aq_depth, + acc_ring_avail_enq(q), acc_ring_avail_deq(q)); + +/** Print information captured in the error buffer. */ +if (q->error_wrap ==0 ) { + start_err =0 ; + end_err = q->error_head; + }else { + start_err = q->error_head; + end_err = q->error_head +ACC_MAX_BUFFERLEN ; + } + fprintf(f, "Error Buffer - Head %d Wrap %d\n", q->error_head, q-
error_wrap);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (i = start_err; i < end_err; ++i) + fprintf(f, " %d\t%s", i, q->error_bufs[i %
ACC_MAX_BUFFERLEN]);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +/** Print information captured in the info ring. */ +if (q->d->info_ring !=NULL ) { + fprintf(f, "Info Ring Buffer - Head %d\n", q->d-
info_ring_head);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data = q->d->info_ring + (q->d->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+while (ring_data->valid) { + int_nb = int_from_ring(*ring_data, q->d-
device_variant);drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ if ((int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( + int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fprintf(f, " InfoRing: ITR:%d Info:0x%x", + int_nb, ring_data-
detailed_info);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->valid =0 ; + } + info_ring_head++; + ring_data = q->d->info_ring + (info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c static const struct rte_bbdev_ops vrb_bbdev_ops
Quoted 24 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ } + } + +fprintf (f,"Ring Content - Head %d Tail %d Depth %d\n" , + q->sw_ring_head, q->sw_ring_tail, q->sw_ring_depth); +/** Print information about each operation in the software ring. */ +for (i =0 ; i < q->sw_ring_depth; ++i) { + op = (q->ring_addr + i)->req.op_addr; +if (op !=NULL ) + fprintf(f, " %d\tn %d %s", + i, (q->ring_addr + i)->req.numCBs, + rte_bbdev_ops_param_string(op, q-
op_type));drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + +fprintf (f,"== End of File ==\n" ); + +return 0 ; +} +static const struct rte_bbdev_ops vrb_bbdev_ops = { .setup_queues = vrb_setup_queues, .intr_enable = vrb_intr_enable,@@ -1443,7 +1515,8 @@ static const struct rte_bbdev_ops vrb_bbdev_ops= {
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1.queue_release = vrb_queue_release, .queue_stop = vrb_queue_stop, .queue_intr_enable = vrb_queue_intr_enable, - .queue_intr_disable = vrb_queue_intr_disable + .queue_intr_disable = vrb_queue_intr_disable, + .queue_ops_dump = vrb_queue_ops_dump };/* PCI PF address map. */ @@ -1680,7 +1753,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *s_out_offset, uint32_t *h_out_length, uint32_t *s_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, uint8_t r) + uint32_t *seg_total_left, uint8_t r, struct acc_queue *q) { int next_triplet = 1; /* FCW already done. */uint16_t k;@@ -1724,8 +1797,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2kw =RTE_ALIGN_CEIL (k +4 ,32 ) *3 ;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < kw))) { - rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1801
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, kw);return -1 ; }@@ -1735,8 +1808,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2check_bit (op->turbo_dec.op_flags, RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1812
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1748,7 +1821,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1822
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0desc, h_output, *h_out_offset, *h_out_length, next_triplet,
ACC_DMA_BLKID_OUT_HARD);drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, + acc_error_log(q, (void *)op, "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0op);return -1 ;@@ -1760,7 +1833,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, · line 1839
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Soft output. */ if (check_bit(op->turbo_dec.op_flags,
RTE_BBDEV_TURBO_SOFT_OUTPUT)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->turbo_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } if (check_bit(op->turbo_dec.op_flags,@@ -1773,8 +1846,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2*s_out_offset, *s_out_length, next_triplet, ACC_DMA_BLKID_OUT_SOFT);if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to processand mbuf data length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1850
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to processand mbuf data length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1797,7 +1870,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1struct rte_mbuf **input, struct rte_mbuf *h_output, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *h_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant)drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1873
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant,drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ struct acc_queue *q) {struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec; int next_triplet = 1; /* FCW already done. */ @@ -1808,8 +1882,8@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
if (device_variant==VRB1_VARIANT) {
if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION) ||Quoted 1 line
check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "VRB1 does not support the requestedcapabilities %x",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "VRB1 does not support the requestedcapabilities %x\n",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 4 lines
op->ldpc_dec.op_flags); return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1829,8 +1903,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0output_length =K - dec->n_filler - crc24_overlap; if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left <
input_length))) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1833
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1907
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, input_length);return -1 ; }@@ -1842,15 +1916,15 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1920
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; } if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } h_p_size = fcw->hcin_size0 + fcw->hcin_size1; @@ -1859,7+1933,7
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
@@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
else if (fcw->hcin_decomp_mode== 4)
h_p_size=h_p_size/ 2;
if (op->ldpc_dec.harq_combined_input.data== 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1958
Quoted 7 lines
return -1; } acc_dma_fill_blk_type(drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1882,7 +1956,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; }
dec->soft_output.length=fcw->rm_e; @@ -1894,7 +1968,7@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
if (check_bit(op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 3 lines
if (op->ldpc_dec.harq_combined_output.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ output is not defined" ); + acc_error_log(q, (void *)op, "HARQ output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct
Quoted 4 lines
return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -2326,8 +2400,8 @@ vrb2_enqueue_ldpc_enc_one_op_tb(struct
acc_queue*q, structrte_bbdev_enc_op*opdrivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2401
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0in_length_in_bytes, &seg_total_left, next_triplet, check_bit(enc->op_flags,
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2404
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_cb(struct acc_queue *q,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -2399,7 +2473,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_cb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, &mbuf_total_left, - &seg_total_left,0 ); + &seg_total_left,0 , q);if (unlikely (ret <0 ))return ret;@@ -2478,7 +2552,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_tb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_ld_fill (op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, - &seg_total_left, fcw, q->d->device_variant); + &seg_total_left, fcw, q->d->device_variant, q);if (unlikely (ret <0 ))return ret; }@@ -2572,7 +2646,7 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q,
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, &seg_total_left, - &desc->req.fcw_ld, q->d->device_variant); + &desc->req.fcw_ld, q->d->device_variant, q);if (unlikely (ret <0 ))return ret;@@ -2658,7 +2732,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2733
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ret = vrb_dma_desc_td_fill(op, &desc->req, &input, h_output, s_output, &in_offset,
&h_out_offset,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2734
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0&s_out_offset, &h_out_length,
&s_out_length,Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- &mbuf_total_left, &seg_total_left, r); + &mbuf_total_left, &seg_total_left, r, q);if (unlikely (ret <0 ))return ret;
Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Quoted 47 lines · Nicolas
Hi Maxime,
Quoted 45 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, September 13, 2024 7:18 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanismQuoted 8 lines · Nicolas Chautru
Support the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128 +++++++++++++++++++++++------
Quoted 17 lines
2 files changed, 138 insertions(+), 27 deletions(-)drivers/baseband/acc/acc_common.h +2
-0@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 651
Quoted 4 lines
drivers/baseband/acc/acc_common.h +1
-0@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+error log. */
Quoted 8 lines
Quoted 5 lines
65KB is quite big for each queues
I don't see the point of all this, as errors are already logged using
rte_bbdev_log. Only thing you miss is the queue/device info in curretn solution, no?The
rte_bbdev_logis only forstd_outputwhich would be disabled by default for real time application so very limited usability. Here we store the related information for the application to be able to retrieve themselves as required after the fact (not impacting real time).
If you really care about realtime, then the objects should be saved in binary form, and post-processed into strings in the dump function.
Doing this, no wasted CPU cycles in the datapath performing strings processing, and less memory wasted.
Quoted 259 lines
Quoted 259 lines
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 8 lines
drivers/baseband/acc/acc_common.h +4
-0+uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal driver memory.
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 660
Quoted 2 lines
drivers/baseband/acc/acc_common.h +2
-0+* +* This function is used to log an error for a specific ACC queue and operation.
Quoted 5 lines
drivers/baseband/acc/acc_common.h +5
-0+* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +10
-0+*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) { +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); + vsnprintf(q->error_bufs[q->error_head], ACC_MAX_LOGLEN, fmt,args2);
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev,
Quoted 21 lines
drivers/baseband/acc/acc_common.h +12
-0+ q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write(void *addr, uint32_t value) diff --git
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
index585dc49bd6..9d0145d09b100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1022,6 +1022,10 @@ vrb_queue_setup(struct rte_bbdev *dev,
uint16_tqueue_id,drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0q->mmio_reg_enqueue =RTE_PTR_ADD (d->mmio_base, d->queue_offset (d->pf_device, q->vf_id, q->qgrp_id, q- aq_id)); +/** initialize the error buffer. */ + q->error_head =0 ; + q->error_wrap =0 ; + rte_bbdev_log_debug( "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u,aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
Quoted 1 line
dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,@@ -1434,6
Quoted 1 line
+1438,74 @@ vrb_queue_intr_disable(struct
rte_bbdev*dev,uint16_t
queue_id)Quoted 22 lines
return 0; }drivers/baseband/acc/rte_vrb_pmd.c +18
-0+ +static int +vrb_queue_ops_dump (struct rte_bbdev *dev,uint16_t queue_id,FILE *f) +{ +struct acc_queue *q = dev->data->queues[queue_id].queue_private; +struct rte_bbdev_dec_op *op; +uint16_t start_err, end_err, i, int_nb; +volatile union acc_info_ring_data *ring_data; +uint16_t info_ring_head = q->d->info_ring_head; + +if (f ==NULL ) { +rte_bbdev_log (ERR ,"Invalid File input" ); +return -EINVAL ; + } + +/** Print generic information on queue status. */ + fprintf(f, "Dump of operations %s on Queue %d by %s\n", + rte_bbdev_op_type_str(q->op_type), queue_id, dev-
device->driver->name);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ fprintf(f, " AQ Enqueued %d Dequeued %d Depth %d - Available Enq%d Deq %d\n",
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ q->aq_enqueued, q->aq_dequeued, q->aq_depth, + acc_ring_avail_enq(q), acc_ring_avail_deq(q)); + +/** Print information captured in the error buffer. */ +if (q->error_wrap ==0 ) { + start_err =0 ; + end_err = q->error_head; + }else { + start_err = q->error_head; + end_err = q->error_head +ACC_MAX_BUFFERLEN ; + } + fprintf(f, "Error Buffer - Head %d Wrap %d\n", q->error_head, q-
error_wrap);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (i = start_err; i < end_err; ++i) + fprintf(f, " %d\t%s", i, q->error_bufs[i %
ACC_MAX_BUFFERLEN]);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +/** Print information captured in the info ring. */ +if (q->d->info_ring !=NULL ) { + fprintf(f, "Info Ring Buffer - Head %d\n", q->d-
info_ring_head);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data = q->d->info_ring + (q->d->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+while (ring_data->valid) { + int_nb = int_from_ring(*ring_data, q->d-
device_variant);drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ if ((int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( + int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fprintf(f, " InfoRing: ITR:%d Info:0x%x", + int_nb, ring_data-
detailed_info);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->valid =0 ; + } + info_ring_head++; + ring_data = q->d->info_ring + (info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c static const struct rte_bbdev_ops vrb_bbdev_ops
Quoted 24 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ } + } + +fprintf (f,"Ring Content - Head %d Tail %d Depth %d\n" , + q->sw_ring_head, q->sw_ring_tail, q->sw_ring_depth); +/** Print information about each operation in the software ring. */ +for (i =0 ; i < q->sw_ring_depth; ++i) { + op = (q->ring_addr + i)->req.op_addr; +if (op !=NULL ) + fprintf(f, " %d\tn %d %s", + i, (q->ring_addr + i)->req.numCBs, + rte_bbdev_ops_param_string(op, q-
op_type));drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + +fprintf (f,"== End of File ==\n" ); + +return 0 ; +} +static const struct rte_bbdev_ops vrb_bbdev_ops = { .setup_queues = vrb_setup_queues, .intr_enable = vrb_intr_enable,@@ -1443,7 +1515,8 @@ static const struct rte_bbdev_ops vrb_bbdev_ops= {
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 10 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-1.queue_release = vrb_queue_release, .queue_stop = vrb_queue_stop, .queue_intr_enable = vrb_queue_intr_enable, - .queue_intr_disable = vrb_queue_intr_disable + .queue_intr_disable = vrb_queue_intr_disable, + .queue_ops_dump = vrb_queue_ops_dump };/* PCI PF address map. */ @@ -1680,7 +1753,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *s_out_offset, uint32_t *h_out_length, uint32_t *s_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, uint8_t r) + uint32_t *seg_total_left, uint8_t r, struct acc_queue *q) { int next_triplet = 1; /* FCW already done. */uint16_t k;@@ -1724,8 +1797,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2kw =RTE_ALIGN_CEIL (k +4 ,32 ) *3 ;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < kw))) { - rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1801
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, kw);return -1 ; }@@ -1735,8 +1808,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2check_bit (op->turbo_dec.op_flags, RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1812
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1748,7 +1821,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1822
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0desc, h_output, *h_out_offset, *h_out_length, next_triplet,
ACC_DMA_BLKID_OUT_HARD);drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, + acc_error_log(q, (void *)op, "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0op);return -1 ;@@ -1760,7 +1833,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, · line 1839
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Soft output. */ if (check_bit(op->turbo_dec.op_flags,
RTE_BBDEV_TURBO_SOFT_OUTPUT)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->turbo_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } if (check_bit(op->turbo_dec.op_flags,@@ -1773,8 +1846,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2*s_out_offset, *s_out_length, next_triplet, ACC_DMA_BLKID_OUT_SOFT);if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to processand mbuf data length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1850
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to processand mbuf data length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1797,7 +1870,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1struct rte_mbuf **input, struct rte_mbuf *h_output, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *h_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant)drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1873
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant,drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ struct acc_queue *q) {struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec; int next_triplet = 1; /* FCW already done. */ @@ -1808,8 +1882,8@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,if (device_variant == VRB1_VARIANT) { if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION) ||
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "VRB1 does not support the requestedcapabilities %x",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "VRB1 does not support the requestedcapabilities %x\n",
You should not re-introduce "\n", David is currently working on getting rid off them all.
Quoted 138 lines
Quoted 137 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 4 lines
op->ldpc_dec.op_flags); return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1829,8 +1903,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0output_length =K - dec->n_filler - crc24_overlap; if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left <
input_length))) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1833
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1907
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, input_length);return -1 ; }@@ -1842,15 +1916,15 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1920
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; } if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } h_p_size = fcw->hcin_size0 + fcw->hcin_size1; @@ -1859,7+1933,7
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
@@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
else if (fcw->hcin_decomp_mode== 4)h_p_size = h_p_size / 2; if (op->ldpc_dec.harq_combined_input.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1958
Quoted 7 lines
return -1; } acc_dma_fill_blk_type(drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1882,7 +1956,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; }dec->soft_output.length = fcw->rm_e; @@ -1894,7 +1968,7@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
if (check_bit(op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 3 lines
if (op->ldpc_dec.harq_combined_output.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ output is not defined" ); + acc_error_log(q, (void *)op, "HARQ output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct
Quoted 4 lines
return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -2326,8 +2400,8 @@ vrb2_enqueue_ldpc_enc_one_op_tb(struct
acc_queue*q, structrte_bbdev_enc_op*opdrivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2401
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0in_length_in_bytes, &seg_total_left, next_triplet, check_bit(enc->op_flags,
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2404
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_cb(struct acc_queue *q,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -2399,7 +2473,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_cb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, &mbuf_total_left, - &seg_total_left,0 ); + &seg_total_left,0 , q);if (unlikely (ret <0 ))return ret;@@ -2478,7 +2552,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_tb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_ld_fill (op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, - &seg_total_left, fcw, q->d->device_variant); + &seg_total_left, fcw, q->d->device_variant, q);if (unlikely (ret <0 ))return ret; }@@ -2572,7 +2646,7 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q,
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, &seg_total_left, - &desc->req.fcw_ld, q->d->device_variant); + &desc->req.fcw_ld, q->d->device_variant, q);if (unlikely (ret <0 ))return ret;@@ -2658,7 +2732,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2733
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ret = vrb_dma_desc_td_fill(op, &desc->req, &input, h_output, s_output, &in_offset,
&h_out_offset,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2734
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0&s_out_offset, &h_out_length,
&s_out_length,Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- &mbuf_total_left, &seg_total_left, r); + &mbuf_total_left, &seg_total_left, r, q);if (unlikely (ret <0 ))return ret;
RE: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Hi Maxime,
Quoted 68 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Monday, September 16, 2024 12:57 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanismQuoted 8 lines · Nicolas
Hi Maxime,
Quoted 6 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, September 13, 2024 7:18 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, HernanQuoted 40 lines
Quoted 40 lines
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Quoted 9 lines · Nicolas Chautru
Support the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128+++++++++++++++++++++++-----
-
Quoted 17 lines
2 files changed, 138 insertions(+), 27 deletions(-)drivers/baseband/acc/acc_common.h +2
-0@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 651
Quoted 4 lines
drivers/baseband/acc/acc_common.h +1
-0@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+error log. */ Quoted 7 lines
Quoted 5 lines
65KB is quite big for each queues
I don't see the point of all this, as errors are already logged using
rte_bbdev_log. Only thing you miss is the queue/device info in curretn solution, no?The
rte_bbdev_logis only forstd_outputwhich would be disabled by defaultfor real time application so very limited usability.
Quoted 8 lines
Quoted 1 line
Here we store the related information for the application to be able to
retrieve themselves as required after the fact (not impacting real time).
If you really care about realtime, then the objects should be saved in binary form, and post-processed into strings in the dump function.
Doing this, no wasted CPU cycles in the datapath performing strings processing, and less memory wasted.
This is the BKM we use for this real time workload across ingredients, best compromise of performance and convenience,
and definitely cannot rely on standard output
Let me know if you would like to discuss more.
Thanks
Nic
Quoted 415 lines
Quoted 53 lines
Quoted 53 lines
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +5
-0+uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal +driver memory.
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 662
Quoted 3 lines
drivers/baseband/acc/acc_common.h +3
-0+* +* This function is used to log an error for a specific ACC queue +and operation.
Quoted 5 lines
drivers/baseband/acc/acc_common.h +5
-0+* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +10
-0+*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) { +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); + vsnprintf(q->error_bufs[q->error_head], ACC_MAX_LOGLEN, fmt,args2);
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev,
Quoted 21 lines
drivers/baseband/acc/acc_common.h +12
-0+ q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write(void *addr, uint32_t value) diff --git
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
index585dc49bd6..9d0145d09b100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1022,6 +1022,10 @@ vrb_queue_setup(struct rte_bbdev *dev,
uint16_tqueue_id,Quoted 2 lines
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, · line 1023
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base, d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id,q-
Quoted 208 lines
Quoted 208 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0aq_id)); +/** initialize the error buffer. */ + q->error_head =0 ; + q->error_wrap =0 ; + rte_bbdev_log_debug( "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u,aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
Quoted 1 line
dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,@@ -1434,6
Quoted 1 line
+1438,74 @@ vrb_queue_intr_disable(struct
rte_bbdev*dev,uint16_t
queue_id)Quoted 22 lines
return 0; }drivers/baseband/acc/rte_vrb_pmd.c +18
-0+ +static int +vrb_queue_ops_dump (struct rte_bbdev *dev,uint16_t queue_id,FILE +*f) { +struct acc_queue *q = dev->data->queues[queue_id].queue_private; +struct rte_bbdev_dec_op *op; +uint16_t start_err, end_err, i, int_nb; +volatile union acc_info_ring_data *ring_data; +uint16_t info_ring_head = q->d->info_ring_head; + +if (f ==NULL ) { +rte_bbdev_log (ERR ,"Invalid File input" ); +return -EINVAL ; + } + +/** Print generic information on queue status. */ + fprintf(f, "Dump of operations %s on Queue %d by %s\n", + rte_bbdev_op_type_str(q->op_type), queue_id, dev-
device->driver->name);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ fprintf(f, " AQ Enqueued %d Dequeued %d Depth %d - Available Enq%d Deq %d\n",
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ q->aq_enqueued, q->aq_dequeued, q->aq_depth, + acc_ring_avail_enq(q), acc_ring_avail_deq(q)); + +/** Print information captured in the error buffer. */ +if (q->error_wrap ==0 ) { + start_err =0 ; + end_err = q->error_head; + }else { + start_err = q->error_head; + end_err = q->error_head +ACC_MAX_BUFFERLEN ; + } + fprintf(f, "Error Buffer - Head %d Wrap %d\n", q->error_head, q-
error_wrap);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (i = start_err; i < end_err; ++i) + fprintf(f, " %d\t%s", i, q->error_bufs[i %
ACC_MAX_BUFFERLEN]);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +/** Print information captured in the info ring. */ +if (q->d->info_ring !=NULL ) { + fprintf(f, "Info Ring Buffer - Head %d\n", q->d-
info_ring_head);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data = q->d->info_ring + (q->d->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+while (ring_data->valid) { + int_nb = int_from_ring(*ring_data, q->d-
device_variant);drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ if ((int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( + int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fprintf(f, " InfoRing: ITR:%d Info:0x%x", + int_nb, ring_data-
detailed_info);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->valid =0 ; + } + info_ring_head++; + ring_data = q->d->info_ring + (info_ring_head &
ACC_INFO_RING_MASK);Quoted 24 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ } + } + +fprintf (f,"Ring Content - Head %d Tail %d Depth %d\n" , + q->sw_ring_head, q->sw_ring_tail, q->sw_ring_depth); +/** Print information about each operation in the software ring. */ +for (i =0 ; i < q->sw_ring_depth; ++i) { + op = (q->ring_addr + i)->req.op_addr; +if (op !=NULL ) + fprintf(f, " %d\tn %d %s", + i, (q->ring_addr + i)->req.numCBs, + rte_bbdev_ops_param_string(op, q-
op_type));drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + +fprintf (f,"== End of File ==\n" ); + +return 0 ; +} +static const struct rte_bbdev_ops vrb_bbdev_ops = { .setup_queues = vrb_setup_queues, .intr_enable = vrb_intr_enable,@@ -1443,7 +1515,8 @@ static const struct rte_bbdev_opsQuoted 1 line
vrb_bbdev_ops= {
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 10 lines
.queue_release =
vrb_queue_release, .queue_stop =vrb_queue_stop, .queue_intr_enable =vrb_queue_intr_enable,drivers/baseband/acc/rte_vrb_pmd.c +2
-1- .queue_intr_disable = vrb_queue_intr_disable + .queue_intr_disable = vrb_queue_intr_disable, + .queue_ops_dump = vrb_queue_ops_dump };/* PCI PF address map. */ @@ -1680,7 +1753,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *s_out_offset, uint32_t *h_out_length, uint32_t *s_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, uint8_t r) + uint32_t *seg_total_left, uint8_t r, struct acc_queue *q) { int next_triplet = 1; /* FCW already done. */uint16_t k;@@ -1724,8 +1797,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2kw =RTE_ALIGN_CEIL (k +4 ,32 ) *3 ;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < kw))) { - rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1801
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, kw);return -1 ; }@@ -1735,8 +1808,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2check_bit (op->turbo_dec.op_flags, RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1812
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1748,7 +1821,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1822
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0desc, h_output, *h_out_offset, *h_out_length, next_triplet,
ACC_DMA_BLKID_OUT_HARD);drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, + acc_error_log(q, (void *)op, "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0op);return -1 ;@@ -1760,7 +1833,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, · line 1839
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Soft output. */ if (check_bit(op->turbo_dec.op_flags,
RTE_BBDEV_TURBO_SOFT_OUTPUT)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->turbo_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } if (check_bit(op->turbo_dec.op_flags,@@ -1773,8 +1846,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2*s_out_offset, *s_out_length, next_triplet, ACC_DMA_BLKID_OUT_SOFT);if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to processand mbuf data length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1850
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to processand mbuf data length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1797,7 +1870,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1struct rte_mbuf **input, struct rte_mbuf *h_output, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *h_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant)drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1873
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant,drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ struct acc_queue *q) {struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec; int next_triplet = 1; /* FCW already done. */ @@ -1808,8 +1882,8@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,if (device_variant == VRB1_VARIANT) { if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION) ||Quoted 8 lines
Quoted 8 lines
Quoted 1 line
check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "VRB1 does not support the requestedcapabilities %x",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "VRB1 does not support the requestedcapabilities %x\n",
You should not re-introduce "\n", David is currently working on getting rid off them all.
Quoted 12 lines
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 4 lines
op->ldpc_dec.op_flags); return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1829,8 +1903,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0output_length =K - dec->n_filler - crc24_overlap; if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left <
input_length))) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1833
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
Quoted 8 lines
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1907
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, input_length);return -1 ; }@@ -1842,15 +1916,15 @@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_opQuoted 118 lines
Quoted 117 lines
*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct · line 1920
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; } if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } h_p_size = fcw->hcin_size0 + fcw->hcin_size1; @@ -1859,7+1933,7
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
@@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
else if (fcw->hcin_decomp_mode== 4)h_p_size = h_p_size / 2; if (op->ldpc_dec.harq_combined_input.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1958
Quoted 7 lines
return -1; } acc_dma_fill_blk_type(drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1882,7 +1956,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; }dec->soft_output.length = fcw->rm_e; @@ -1894,7 +1968,7@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,
if (check_bit(op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 3 lines
if (op->ldpc_dec.harq_combined_output.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ output is not defined" ); + acc_error_log(q, (void *)op, "HARQ output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct
Quoted 4 lines
return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -2326,8 +2400,8 @@ vrb2_enqueue_ldpc_enc_one_op_tb(struct
acc_queue*q, structrte_bbdev_enc_op*opdrivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2401
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0in_length_in_bytes, &seg_total_left, next_triplet, check_bit(enc->op_flags,
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2404
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_cb(struct acc_queue *q,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -2399,7 +2473,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_cb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, &mbuf_total_left, - &seg_total_left,0 ); + &seg_total_left,0 , q);if (unlikely (ret <0 ))return ret;@@ -2478,7 +2552,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_tb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_ld_fill (op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, - &seg_total_left, fcw, q->d->device_variant); + &seg_total_left, fcw, q->d->device_variant, q);if (unlikely (ret <0 ))return ret; }@@ -2572,7 +2646,7 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q,
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, &seg_total_left, - &desc->req.fcw_ld, q->d->device_variant); + &desc->req.fcw_ld, q->d->device_variant, q);if (unlikely (ret <0 ))return ret;@@ -2658,7 +2732,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2733
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ret = vrb_dma_desc_td_fill(op, &desc->req, &input, h_output, s_output, &in_offset,
&h_out_offset,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2734
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0&s_out_offset, &h_out_length,
&s_out_length,Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- &mbuf_total_left, &seg_total_left, r); + &mbuf_total_left, &seg_total_left, r, q);if (unlikely (ret <0 ))return ret;
Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Hi Nicolas,
Quoted 76 lines · Nicolas
Hi Maxime,
Quoted 74 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Monday, September 16, 2024 12:57 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanismQuoted 8 lines · Nicolas
Hi Maxime,
Quoted 6 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, September 13, 2024 7:18 AM
To: Chautru, Nicolas <[email protected]>; [email protected]
Cc: [email protected]; Marchand, David <[email protected]>; Vargas, HernanQuoted 40 lines
Quoted 40 lines
Subject: Re: [PATCH v2 2/2] baseband/acc: improvement to logging mechanism
Quoted 9 lines · Nicolas Chautru
Support the new dev op to dump operations information related to a given queue and information on previous errors detected by the driver and tracked internally in PMD.
Signed-off-by Nicolas Chautru <[email protected]>--- drivers/baseband/acc/acc_common.h | 37 +++++++++ drivers/baseband/acc/rte_vrb_pmd.c | 128+++++++++++++++++++++++-----
-
Quoted 17 lines
2 files changed, 138 insertions(+), 27 deletions(-)drivers/baseband/acc/acc_common.h +2
-0@@ -149,6 +149,8 @@#define VRB2_VF_ID_SHIFT 6#define ACC_MAX_FFT_WIN 16 +#define ACC_MAX_LOGLEN 256 +#define ACC_MAX_BUFFERLEN 256extern int acc_common_logtype;drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 651
Quoted 4 lines
drivers/baseband/acc/acc_common.h +1
-0@@ -646,8 +648,43 @@ struct __rte_cache_aligned acc_queue {rte_iova_t fcw_ring_addr_iova;int8_t *derm_buffer;/* interim buffer for de-rm in SDK */ struct acc_device *d; +char error_bufs[ACC_MAX_BUFFERLEN ][ACC_MAX_LOGLEN ];/**< Buffer for
Quoted 1 line
drivers/baseband/acc/acc_common.h +1
-0+error log. */ Quoted 7 lines
Quoted 5 lines
65KB is quite big for each queues
I don't see the point of all this, as errors are already logged using
rte_bbdev_log. Only thing you miss is the queue/device info in curretn solution, no?The
rte_bbdev_logis only forstd_outputwhich would be disabled by defaultfor real time application so very limited usability.
Quoted 1 line
Here we store the related information for the application to be able to
retrieve themselves as required after the fact (not impacting real time).
If you really care about realtime, then the objects should be saved in binary form, and post-processed into strings in the dump function.
Quoted 7 lines
Quoted 2 lines
Doing this, no wasted CPU cycles in the datapath performing strings processing, and less memory wasted.
This is the BKM we use for this real time workload across ingredients, best compromise of performance and convenience,
and definitely cannot rely on standard output
Let me know if you would like to discuss more.
I can understand you don't want to use the standard output, but in this case save the objects as binary form, and let the dump function generate the strings.
Thanks,
Maxime
Quoted 419 lines
Thanks
NicQuoted 415 lines
Quoted 53 lines
Quoted 53 lines
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +5
-0+uint16_t error_head;/**< Head - Buffer for error log. */ +uint16_t error_wrap;/**< Wrap Counter - Buffer for error log. */ }; +/** +* @brief Report error both through RTE logging and into internal +driver memory.
drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue { · line 662
Quoted 3 lines
drivers/baseband/acc/acc_common.h +3
-0+* +* This function is used to log an error for a specific ACC queue +and operation.
Quoted 5 lines
drivers/baseband/acc/acc_common.h +5
-0+* +* @param q Pointer to the ACC queue. +* @param op Pointer to the operation. +* @param fmt Format string for the error message. +* @param ... Additional arguments for the format string. drivers/baseband/acc/acc_common.h struct __rte_cache_aligned acc_queue {
Quoted 10 lines
drivers/baseband/acc/acc_common.h +10
-0+*/ +__rte_format_printf(3, 4) +static inline void +acc_error_log (struct acc_queue *q,void *op,const char *fmt, ...) { +va_list args, args2; + +va_start (args, fmt); +va_copy (args2, args); +rte_vlog (RTE_LOG_ERR , acc_common_logtype, fmt, args); + vsnprintf(q->error_bufs[q->error_head], ACC_MAX_LOGLEN, fmt,args2);
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev,
Quoted 21 lines
drivers/baseband/acc/acc_common.h +12
-0+ q->error_head++; +snprintf (q->error_bufs[q->error_head],ACC_MAX_LOGLEN , +"%s" ,rte_bbdev_ops_param_string (op, q->op_type)); + q->error_head++; +if (q->error_head ==ACC_MAX_LOGLEN ) { + q->error_head =0 ; + q->error_wrap++; + } +va_end (args); +va_end (args2); +} +/* Write to MMIO register address */ static inline void mmio_write(void *addr, uint32_t value) diff --git
a/drivers/baseband/acc/rte_vrb_pmd.cb/drivers/baseband/acc/rte_vrb_pmd.c
index585dc49bd6..9d0145d09b100644drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1022,6 +1022,10 @@ vrb_queue_setup(struct rte_bbdev *dev,
uint16_tqueue_id,Quoted 2 lines
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, · line 1023
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0q->mmio_reg_enqueue = RTE_PTR_ADD(d->mmio_base, d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id,q-
Quoted 208 lines
Quoted 208 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0aq_id)); +/** initialize the error buffer. */ + q->error_head =0 ; + q->error_wrap =0 ; + rte_bbdev_log_debug( "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u,aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
Quoted 1 line
dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,@@ -1434,6
Quoted 1 line
+1438,74 @@ vrb_queue_intr_disable(struct
rte_bbdev*dev,uint16_t
queue_id)Quoted 22 lines
return 0; }drivers/baseband/acc/rte_vrb_pmd.c +18
-0+ +static int +vrb_queue_ops_dump (struct rte_bbdev *dev,uint16_t queue_id,FILE +*f) { +struct acc_queue *q = dev->data->queues[queue_id].queue_private; +struct rte_bbdev_dec_op *op; +uint16_t start_err, end_err, i, int_nb; +volatile union acc_info_ring_data *ring_data; +uint16_t info_ring_head = q->d->info_ring_head; + +if (f ==NULL ) { +rte_bbdev_log (ERR ,"Invalid File input" ); +return -EINVAL ; + } + +/** Print generic information on queue status. */ + fprintf(f, "Dump of operations %s on Queue %d by %s\n", + rte_bbdev_op_type_str(q->op_type), queue_id, dev-
device->driver->name);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ fprintf(f, " AQ Enqueued %d Dequeued %d Depth %d - Available Enq%d Deq %d\n",
Quoted 13 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ q->aq_enqueued, q->aq_dequeued, q->aq_depth, + acc_ring_avail_enq(q), acc_ring_avail_deq(q)); + +/** Print information captured in the error buffer. */ +if (q->error_wrap ==0 ) { + start_err =0 ; + end_err = q->error_head; + }else { + start_err = q->error_head; + end_err = q->error_head +ACC_MAX_BUFFERLEN ; + } + fprintf(f, "Error Buffer - Head %d Wrap %d\n", q->error_head, q-
error_wrap);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+for (i = start_err; i < end_err; ++i) + fprintf(f, " %d\t%s", i, q->error_bufs[i %
ACC_MAX_BUFFERLEN]);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ +/** Print information captured in the info ring. */ +if (q->d->info_ring !=NULL ) { + fprintf(f, "Info Ring Buffer - Head %d\n", q->d-
info_ring_head);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ ring_data = q->d->info_ring + (q->d->info_ring_head &
ACC_INFO_RING_MASK);drivers/baseband/acc/rte_vrb_pmd.c
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+while (ring_data->valid) { + int_nb = int_from_ring(*ring_data, q->d-
device_variant);drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ if ((int_nb < ACC_PF_INT_DMA_DL_DESC_IRQ) || ( + int_nb >
ACC_PF_INT_DMA_MLD_DESC_IRQ)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ fprintf(f, " InfoRing: ITR:%d Info:0x%x", + int_nb, ring_data-
detailed_info);drivers/baseband/acc/rte_vrb_pmd.c +1
-0+/* Initialize Info Ring entry and move forward. */
drivers/baseband/acc/rte_vrb_pmd.c vrb_queue_intr_disable(struct rte_bbdev *dev, uint16_t queue_id)
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +4
-0+ ring_data->valid =0 ; + } + info_ring_head++; + ring_data = q->d->info_ring + (info_ring_head &
ACC_INFO_RING_MASK);Quoted 24 lines
drivers/baseband/acc/rte_vrb_pmd.c +12
-0+ } + } + +fprintf (f,"Ring Content - Head %d Tail %d Depth %d\n" , + q->sw_ring_head, q->sw_ring_tail, q->sw_ring_depth); +/** Print information about each operation in the software ring. */ +for (i =0 ; i < q->sw_ring_depth; ++i) { + op = (q->ring_addr + i)->req.op_addr; +if (op !=NULL ) + fprintf(f, " %d\tn %d %s", + i, (q->ring_addr + i)->req.numCBs, + rte_bbdev_ops_param_string(op, q-
op_type));drivers/baseband/acc/rte_vrb_pmd.c +7
-0+ } + +fprintf (f,"== End of File ==\n" ); + +return 0 ; +} +static const struct rte_bbdev_ops vrb_bbdev_ops = { .setup_queues = vrb_setup_queues, .intr_enable = vrb_intr_enable,@@ -1443,7 +1515,8 @@ static const struct rte_bbdev_opsQuoted 1 line
vrb_bbdev_ops= {
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 10 lines
.queue_release =
vrb_queue_release, .queue_stop =vrb_queue_stop, .queue_intr_enable =vrb_queue_intr_enable,drivers/baseband/acc/rte_vrb_pmd.c +2
-1- .queue_intr_disable = vrb_queue_intr_disable + .queue_intr_disable = vrb_queue_intr_disable, + .queue_ops_dump = vrb_queue_ops_dump };/* PCI PF address map. */ @@ -1680,7 +1753,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *s_out_offset, uint32_t *h_out_length, uint32_t *s_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, uint8_t r) + uint32_t *seg_total_left, uint8_t r, struct acc_queue *q) { int next_triplet = 1; /* FCW already done. */uint16_t k;@@ -1724,8 +1797,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2kw =RTE_ALIGN_CEIL (k +4 ,32 ) *3 ;if (unlikely ((*mbuf_total_left ==0 ) || (*mbuf_total_left < kw))) { - rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1801
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, kw);return -1 ; }@@ -1735,8 +1808,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2check_bit (op->turbo_dec.op_flags, RTE_BBDEV_TURBO_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1812
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1748,7 +1821,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1822
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0desc, h_output, *h_out_offset, *h_out_length, next_triplet,
ACC_DMA_BLKID_OUT_HARD);drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, + acc_error_log(q, (void *)op, "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0op);return -1 ;@@ -1760,7 +1833,7 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op, · line 1839
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0/* Soft output. */ if (check_bit(op->turbo_dec.op_flags,
RTE_BBDEV_TURBO_SOFT_OUTPUT)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->turbo_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } if (check_bit(op->turbo_dec.op_flags,@@ -1773,8 +1846,8 @@ vrb_dma_desc_td_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2*s_out_offset, *s_out_length, next_triplet, ACC_DMA_BLKID_OUT_SOFT);if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to processand mbuf data length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op · line 1850
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to processand mbuf data length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -1797,7 +1870,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-1struct rte_mbuf **input, struct rte_mbuf *h_output, uint32_t *in_offset, uint32_t *h_out_offset, uint32_t *h_out_length, uint32_t *mbuf_total_left, - uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant)drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1873
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ uint32_t *seg_total_left, struct acc_fcw_ld *fcw, uint16_t
device_variant,drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 4 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+ struct acc_queue *q) {struct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec; int next_triplet = 1; /* FCW already done. */ @@ -1808,8 +1882,8@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,if (device_variant == VRB1_VARIANT) { if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HARQ_4BIT_COMPRESSION) ||Quoted 8 lines
Quoted 8 lines
Quoted 1 line
check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "VRB1 does not support the requestedcapabilities %x",
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "VRB1 does not support the requestedcapabilities %x\n",
You should not re-introduce "\n", David is currently working on getting rid off them all.
Quoted 12 lines
Quoted 12 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op
Quoted 4 lines
op->ldpc_dec.op_flags); return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1829,8 +1903,8 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0output_length =K - dec->n_filler - crc24_overlap; if (unlikely((*mbuf_total_left == 0) || (*mbuf_total_left <
input_length))) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1833
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2- rte_bbdev_log(ERR, - "Mismatch between mbuf length and includedCB sizes: mbuf len %u, cb len %u",
Quoted 8 lines
Quoted 8 lines
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1907
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between mbuf length and includedCB sizes: mbuf len %u,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+cb len %u\n", *mbuf_total_left, input_length);return -1 ; }@@ -1842,15 +1916,15 @@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_opQuoted 118 lines
Quoted 117 lines
*op,
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2RTE_BBDEV_LDPC_DEC_SCATTER_GATHER));if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct · line 1920
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 6 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; } if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.harq_combined_input.data ==0 ) { -rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; } h_p_size = fcw->hcin_size0 + fcw->hcin_size1; @@ -1859,7+1933,7
drivers/baseband/acc/rte_vrb_pmd.c
Quoted 6 lines
@@ vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,else if (fcw->hcin_decomp_mode == 4) h_p_size = h_p_size / 2; if (op->ldpc_dec.harq_combined_input.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ input is not defined" ); + acc_error_log(q, (void *)op, "HARQ input is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op · line 1958
Quoted 7 lines
return -1; } acc_dma_fill_blk_type(drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -1882,7 +1956,7 @@ vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op, if (check_bit(op->ldpc_dec.op_flags,
RTE_BBDEV_LDPC_SOFT_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1if (op->ldpc_dec.soft_output.data ==0 ) { -rte_bbdev_log (ERR ,"Soft output is not defined" ); + acc_error_log(q, (void *)op, "Soft output is notdefined\n");
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0return -1 ; }dec->soft_output.length = fcw->rm_e; @@ -1894,7 +1968,7@@
Quoted 3 lines
vrb_dma_desc_ld_fill(struct
rte_bbdev_dec_op*op,if (check_bit(op->ldpc_dec.op_flags,RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE)) {drivers/baseband/acc/rte_vrb_pmd.c
Quoted 3 lines
if (op->ldpc_dec.harq_combined_output.data == 0) {drivers/baseband/acc/rte_vrb_pmd.c +1
-1-rte_bbdev_log (ERR ,"HARQ output is not defined" ); + acc_error_log(q, (void *)op, "HARQ output is notdefined\n");
drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct
Quoted 4 lines
return -1; }drivers/baseband/acc/rte_vrb_pmd.c +0
-0@@ -2326,8 +2400,8 @@ vrb2_enqueue_ldpc_enc_one_op_tb(struct
acc_queue*q, structrte_bbdev_enc_op*opdrivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2401
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0in_length_in_bytes, &seg_total_left, next_triplet, check_bit(enc->op_flags,
RTE_BBDEV_LDPC_ENC_SCATTER_GATHER));drivers/baseband/acc/rte_vrb_pmd.c vrb_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
Quoted 3 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-2if (unlikely (next_triplet <0 )) { - rte_bbdev_log(ERR, - "Mismatch between data to process and mbufdata length in
bbdev_op: %p",drivers/baseband/acc/rte_vrb_pmd.c vrb2_enqueue_ldpc_enc_one_op_tb(struct · line 2404
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +2
-0+ acc_error_log(q, (void *)op, + "Mismatch between data to process and mbufdata length in
drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_cb(struct acc_queue *q,
Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-0+bbdev_op: %p\n", op);return -1 ; }@@ -2399,7 +2473,7 @@ enqueue_dec_one_op_cb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_cb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_td_fill (op, &desc->req, &input, h_output, s_output, &in_offset, &h_out_offset, &s_out_offset, &h_out_length, &s_out_length, &mbuf_total_left, - &seg_total_left,0 ); + &seg_total_left,0 , q);if (unlikely (ret <0 ))return ret;@@ -2478,7 +2552,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c vrb_enqueue_ldpc_dec_one_op_tb(struct
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1ret =vrb_dma_desc_ld_fill (op, &desc->req, &input, h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, - &seg_total_left, fcw, q->d->device_variant); + &seg_total_left, fcw, q->d->device_variant, q);if (unlikely (ret <0 ))return ret; }@@ -2572,7 +2646,7 @@ vrb_enqueue_ldpc_dec_one_op_tb(struct
acc_queue*q, structrte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q,
Quoted 9 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1h_output, &in_offset, &h_out_offset, &h_out_length, &mbuf_total_left, &seg_total_left, - &desc->req.fcw_ld, q->d->device_variant); + &desc->req.fcw_ld, q->d->device_variant, q);if (unlikely (ret <0 ))return ret;@@ -2658,7 +2732,7 @@ enqueue_dec_one_op_tb(struct acc_queue *q,struct
rte_bbdev_dec_op*op,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2733
Quoted 2 lines
drivers/baseband/acc/rte_vrb_pmd.c +0
-0ret = vrb_dma_desc_td_fill(op, &desc->req, &input, h_output, s_output, &in_offset,
&h_out_offset,drivers/baseband/acc/rte_vrb_pmd.c enqueue_dec_one_op_tb(struct acc_queue *q, · line 2734
Quoted 1 line
drivers/baseband/acc/rte_vrb_pmd.c +0
-0&s_out_offset, &h_out_length,
&s_out_length,Quoted 5 lines
drivers/baseband/acc/rte_vrb_pmd.c +1
-1- &mbuf_total_left, &seg_total_left, r); + &mbuf_total_left, &seg_total_left, r, q);if (unlikely (ret <0 ))return ret;