[v1,1/1] drivers/baseband: fix device queues initialization

Message ID 20240708190941.120461-2-hernan.vargas@intel.com (mailing list archive)
State New
Delegated to: Maxime Coquelin
Headers
Series fix device queues initialization |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Hernan Vargas July 8, 2024, 7:09 p.m. UTC
  To prevent incorrect readings, initialize FFT and MLDTS queues to 0.

Fixes: 089148fc3f09 ("bbdev: add operation type for MLDTS processing")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 drivers/baseband/acc/rte_acc100_pmd.c              | 1 +
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 2 ++
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c       | 2 ++
 drivers/baseband/la12xx/bbdev_la12xx.c             | 2 ++
 4 files changed, 7 insertions(+)
  

Comments

David Marchand July 12, 2024, 12:25 p.m. UTC | #1
On Mon, Jul 8, 2024 at 9:14 PM Hernan Vargas <hernan.vargas@intel.com> wrote:
>
> To prevent incorrect readings, initialize FFT and MLDTS queues to 0.

All calls to bb drivers info_get are preceded with a:
        memset(&dev_info, 0, sizeof(dev_info));
        dev->dev_ops->info_get(dev, &dev_info);

So I don't really follow what this patch is trying to fix.
Can you provide details?
  
Chautru, Nicolas July 17, 2024, 5:13 p.m. UTC | #2
Hi David, Hernan, 
This is not a fix per se (ie. no bug vulnerability), just keeping code consistent as the PMDs already set such unused queues to zero in the code (see existing code). 
Just keeping that existing coding style for the new operation for code consistency. 
We probably don’t have to fix on stable branch, so we may rephrase this commit as a cosmetic coding consistency change.

Thanks
Nic

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, July 12, 2024 5:26 AM
> To: Vargas, Hernan <hernan.vargas@intel.com>
> Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
> maxime.coquelin@redhat.com; Chautru, Nicolas
> <nicolas.chautru@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> stable@dpdk.org
> Subject: Re: [PATCH v1 1/1] drivers/baseband: fix device queues initialization
> 
> On Mon, Jul 8, 2024 at 9:14 PM Hernan Vargas <hernan.vargas@intel.com>
> wrote:
> >
> > To prevent incorrect readings, initialize FFT and MLDTS queues to 0.
> 
> All calls to bb drivers info_get are preceded with a:
>         memset(&dev_info, 0, sizeof(dev_info));
>         dev->dev_ops->info_get(dev, &dev_info);
> 
> So I don't really follow what this patch is trying to fix.
> Can you provide details?
> 
> 
> --
> David Marchand
  

Patch

diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index ab69350080f0..9b12fa7048c2 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -1030,6 +1030,7 @@  acc100_dev_info_get(struct rte_bbdev *dev,
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = d->acc_conf.q_dl_5g.num_aqs_per_groups *
 			d->acc_conf.q_dl_5g.num_qgroups;
 	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = d->acc_conf.q_ul_4g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = d->acc_conf.q_dl_4g.num_qgroups;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = d->acc_conf.q_ul_5g.num_qgroups;
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 9b253cde280d..dad16ad422b5 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -625,6 +625,8 @@  fpga_5gnr_dev_info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_
 	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = 0;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = dev_info->max_num_queues / 2;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = dev_info->max_num_queues / 2;
+	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = 1;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = 1;
 }
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index a4a963f74dbf..c6a3c3805a04 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -659,6 +659,8 @@  fpga_dev_info_get(struct rte_bbdev *dev,
 	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = dev_info->max_num_queues / 2;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = 0;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_DEC] = 1;
 	dev_info->queue_priority[RTE_BBDEV_OP_TURBO_ENC] = 1;
 }
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index bb754a539580..19039ba4ece1 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -108,6 +108,8 @@  la12xx_info_get(struct rte_bbdev *dev __rte_unused,
 	dev_info->num_queues[RTE_BBDEV_OP_TURBO_ENC] = 0;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_DEC] = LA12XX_MAX_QUEUES / 2;
 	dev_info->num_queues[RTE_BBDEV_OP_LDPC_ENC] = LA12XX_MAX_QUEUES / 2;
+	dev_info->num_queues[RTE_BBDEV_OP_FFT] = 0;
+	dev_info->num_queues[RTE_BBDEV_OP_MLDTS] = 0;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_DEC] = 1;
 	dev_info->queue_priority[RTE_BBDEV_OP_LDPC_ENC] = 1;
 	rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);