diff mbox series

[v2,25/37] baseband/acc100: update log messages

Message ID 20220820023157.189047-26-hernan.vargas@intel.com (mailing list archive)
State Superseded
Delegated to: akhil goyal
Headers show
Series baseband/acc100: changes for 22.11 | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hernan Vargas Aug. 20, 2022, 2:31 a.m. UTC
Add extra values for some log messages. No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Comments

Maxime Coquelin Sept. 15, 2022, 10:14 a.m. UTC | #1
On 8/20/22 04:31, Hernan Vargas wrote:
> Add extra values for some log messages. No functional impact.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   drivers/baseband/acc100/rte_acc100_pmd.c | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index a302905c78..8898147239 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -1170,6 +1170,7 @@ acc100_dev_info_get(struct rte_bbdev *dev,
>   
>   	/* Read and save the populated config from ACC100 registers */
>   	fetch_acc100_config(dev);
> +	/* Check the status of device */
>   	dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
>   
>   	/* Expose number of queues */
> @@ -3244,7 +3245,7 @@ enqueue_ldpc_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
>   {
>   #ifndef RTE_LIBRTE_BBDEV_SKIP_VALIDATE
>   	if (validate_ldpc_enc_op(op, q) == -1) {
> -		rte_bbdev_log(ERR, "LDPC encoder validation failed");
> +		rte_bbdev_log(ERR, "LDPC encoder validation rejected");
>   		return -EINVAL;
>   	}
>   #endif
> @@ -4167,8 +4168,9 @@ acc100_enqueue_status(struct rte_bbdev_queue_data *q_data,
>   {
>   	q_data->enqueue_status = status;
>   	q_data->queue_stats.enqueue_status_count[status]++;
> -	rte_bbdev_log(WARNING, "Enqueue Status: %d %#"PRIx64"",
> -			status,
> +
> +	rte_bbdev_log(WARNING, "Enqueue Status: %s %#"PRIx64"",
> +			rte_bbdev_enqueue_status_str(status),
>   			q_data->queue_stats.enqueue_status_count[status]);
>   }
>   
> @@ -4863,6 +4865,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
>   		return -1;
>   
>   	rsp.val = atom_desc.rsp.val;
> +	rte_bbdev_log_debug("Resp. desc %p: %x\n", desc, rsp.val);
>   
>   	/* Dequeue */
>   	op = desc->req.op_addr;
> @@ -4945,8 +4948,9 @@ dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
>   		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
>   				__ATOMIC_RELAXED);
>   		rsp.val = atom_desc.rsp.val;
> -		rte_bbdev_log_debug("Resp. desc %p: %x", desc,
> -				rsp.val);
> +		rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d\n",
> +				desc, rsp.val,
> +				cb_idx, cbs_in_tb);
>   
>   		op->status |= ((rsp.input_err)
>   				? (1 << RTE_BBDEV_DATA_ERROR) : 0);

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

Thanks,
Maxime
diff mbox series

Patch

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index a302905c78..8898147239 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1170,6 +1170,7 @@  acc100_dev_info_get(struct rte_bbdev *dev,
 
 	/* Read and save the populated config from ACC100 registers */
 	fetch_acc100_config(dev);
+	/* Check the status of device */
 	dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;
 
 	/* Expose number of queues */
@@ -3244,7 +3245,7 @@  enqueue_ldpc_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 {
 #ifndef RTE_LIBRTE_BBDEV_SKIP_VALIDATE
 	if (validate_ldpc_enc_op(op, q) == -1) {
-		rte_bbdev_log(ERR, "LDPC encoder validation failed");
+		rte_bbdev_log(ERR, "LDPC encoder validation rejected");
 		return -EINVAL;
 	}
 #endif
@@ -4167,8 +4168,9 @@  acc100_enqueue_status(struct rte_bbdev_queue_data *q_data,
 {
 	q_data->enqueue_status = status;
 	q_data->queue_stats.enqueue_status_count[status]++;
-	rte_bbdev_log(WARNING, "Enqueue Status: %d %#"PRIx64"",
-			status,
+
+	rte_bbdev_log(WARNING, "Enqueue Status: %s %#"PRIx64"",
+			rte_bbdev_enqueue_status_str(status),
 			q_data->queue_stats.enqueue_status_count[status]);
 }
 
@@ -4863,6 +4865,7 @@  dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
 		return -1;
 
 	rsp.val = atom_desc.rsp.val;
+	rte_bbdev_log_debug("Resp. desc %p: %x\n", desc, rsp.val);
 
 	/* Dequeue */
 	op = desc->req.op_addr;
@@ -4945,8 +4948,9 @@  dequeue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op **ref_op,
 		atom_desc.atom_hdr = __atomic_load_n((uint64_t *)desc,
 				__ATOMIC_RELAXED);
 		rsp.val = atom_desc.rsp.val;
-		rte_bbdev_log_debug("Resp. desc %p: %x", desc,
-				rsp.val);
+		rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d\n",
+				desc, rsp.val,
+				cb_idx, cbs_in_tb);
 
 		op->status |= ((rsp.input_err)
 				? (1 << RTE_BBDEV_DATA_ERROR) : 0);