patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Thu Aug 10 01:59:11 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=be74d3fef7f2767b7bcd21f592d922571b75bc35

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From be74d3fef7f2767b7bcd21f592d922571b75bc35 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas at intel.com>
Date: Thu, 25 May 2023 11:28:08 -0700
Subject: [PATCH] baseband/fpga_5gnr_fec: fix starting unconfigured queue
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]

Adding exception to prevent segmentation fault in case a queue is
started which was not configured earlier.

Fixes: c58109a8871d ("baseband/fpga_5gnr_fec: add queue configuration")

Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

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 ffd4334541..0dfeba08e1 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -569,17 +569,21 @@ static int
 fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
+	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
+	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
+			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
+	uint8_t enable = 0x01;
+	uint16_t zero = 0x0000;
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	if (d == NULL) {
 		rte_bbdev_log(ERR, "Invalid device pointer");
 		return -1;
 	}
 #endif
-	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
-	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
-			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
-	uint8_t enable = 0x01;
-	uint16_t zero = 0x0000;
+	if (dev->data->queues[queue_id].queue_private == NULL) {
+		rte_bbdev_log(ERR, "Cannot start invalid queue %d", queue_id);
+		return -1;
+	}
 
 	/* Clear queue head and tail variables */
 	q->tail = q->head_free_desc = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-08-09 21:51:20.565968300 +0800
+++ 0092-baseband-fpga_5gnr_fec-fix-starting-unconfigured-que.patch	2023-08-09 21:51:18.264352000 +0800
@@ -1 +1 @@
-From 490501e6cbe48503aeadb20f89915a3949b70aa8 Mon Sep 17 00:00:00 2001
+From be74d3fef7f2767b7bcd21f592d922571b75bc35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 99390c4816..6b0644ffc5 100644
+index ffd4334541..0dfeba08e1 100644
@@ -22 +24 @@
-@@ -567,17 +567,21 @@ static int
+@@ -569,17 +569,21 @@ static int


More information about the stable mailing list