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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Jul 15 00:34:42 CEST 2023


Hi,

FYI, your patch has been queued to stable release 20.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/16/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cc66c3e913846380edbba2d95171864f9212075a

Thanks.

Luca Boccassi

---
>From cc66c3e913846380edbba2d95171864f9212075a 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

[ 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>
---
 .../baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c   | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 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 04c16f80fb..c68f552a0f 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -563,17 +563,21 @@ static int
 fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
 {
 	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
-#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;
+#ifdef RTE_LIBRTE_BBDEV_DEBUG
+	if (d == NULL) {
+		rte_bbdev_log(ERR, "Invalid device pointer");
+		return -1;
+	}
+#endif
+	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.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-14 23:33:09.070705438 +0100
+++ 0013-baseband-fpga_5gnr_fec-fix-starting-unconfigured-que.patch	2023-07-14 23:33:08.503305419 +0100
@@ -1 +1 @@
-From 490501e6cbe48503aeadb20f89915a3949b70aa8 Mon Sep 17 00:00:00 2001
+From cc66c3e913846380edbba2d95171864f9212075a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 490501e6cbe48503aeadb20f89915a3949b70aa8 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 99390c4816..6b0644ffc5 100644
+index 04c16f80fb..c68f552a0f 100644
@@ -22 +23 @@
-@@ -567,17 +567,21 @@ static int
+@@ -563,17 +563,21 @@ static int


More information about the stable mailing list