diff mbox series

[v2,24/37] baseband/acc100: rename ldpc encode function arg

Message ID 20220820023157.189047-25-hernan.vargas@intel.com (mailing list archive)
State Superseded, archived
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
Rename total_enqueued_cbs to total_enqueued_descs in the
enqueue_ldpc_enc_n_op_cb function. No functional impact.

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

Comments

Maxime Coquelin Sept. 15, 2022, 10:14 a.m. UTC | #1
On 8/20/22 04:31, Hernan Vargas wrote:
> Rename total_enqueued_cbs to total_enqueued_descs in the
> enqueue_ldpc_enc_n_op_cb function. No functional impact.
> 
> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
> ---
>   drivers/baseband/acc100/rte_acc100_pmd.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 0389768a6f..a302905c78 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -2967,10 +2967,13 @@ enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
>   	return 1;
>   }
>   
> -/* Enqueue one encode operations for ACC100 device in CB mode */
> +
> +/* Enqueue one encode operations for ACC100 device in CB mode
> + * multiplexed on the same descriptor
> + */
>   static inline int
>   enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
> -		uint16_t total_enqueued_cbs, int16_t num)
> +		uint16_t total_enqueued_descs, int16_t num)
>   {
>   	union acc100_dma_desc *desc = NULL;
>   	uint32_t out_length;
> @@ -2980,14 +2983,13 @@ enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
>   	struct rte_bbdev_op_ldpc_enc *enc = &ops[0]->ldpc_enc;
>   
>   #ifndef RTE_LIBRTE_BBDEV_SKIP_VALIDATE
> -	/* Validate op structure */
>   	if (validate_ldpc_enc_op(ops[0], q) == -1) {
>   		rte_bbdev_log(ERR, "LDPC encoder validation rejected");
>   		return -EINVAL;
>   	}
>   #endif
>   
> -	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
> +	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs)

Take the opportunity to move the declaration before the code.

>   			& q->sw_ring_wrap_mask);
>   	desc = q->ring_addr + desc_idx;
>   	acc100_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);

With this small change handled:

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 0389768a6f..a302905c78 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -2967,10 +2967,13 @@  enqueue_enc_one_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
 	return 1;
 }
 
-/* Enqueue one encode operations for ACC100 device in CB mode */
+
+/* Enqueue one encode operations for ACC100 device in CB mode
+ * multiplexed on the same descriptor
+ */
 static inline int
 enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
-		uint16_t total_enqueued_cbs, int16_t num)
+		uint16_t total_enqueued_descs, int16_t num)
 {
 	union acc100_dma_desc *desc = NULL;
 	uint32_t out_length;
@@ -2980,14 +2983,13 @@  enqueue_ldpc_enc_n_op_cb(struct acc100_queue *q, struct rte_bbdev_enc_op **ops,
 	struct rte_bbdev_op_ldpc_enc *enc = &ops[0]->ldpc_enc;
 
 #ifndef RTE_LIBRTE_BBDEV_SKIP_VALIDATE
-	/* Validate op structure */
 	if (validate_ldpc_enc_op(ops[0], q) == -1) {
 		rte_bbdev_log(ERR, "LDPC encoder validation rejected");
 		return -EINVAL;
 	}
 #endif
 
-	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_cbs)
+	uint16_t desc_idx = ((q->sw_ring_head + total_enqueued_descs)
 			& q->sw_ring_wrap_mask);
 	desc = q->ring_addr + desc_idx;
 	acc100_fcw_le_fill(ops[0], &desc->req.fcw_le, num, 0);