patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7

Sevincer, Abdullah abdullah.sevincer at intel.com
Thu Nov 3 17:20:25 CET 2022


Sure, thanks Luca.

-----Original Message-----
From: luca.boccassi at gmail.com <luca.boccassi at gmail.com> 
Sent: Thursday, November 3, 2022 2:27 AM
To: Sevincer, Abdullah <abdullah.sevincer at intel.com>
Cc: dpdk stable <stable at dpdk.org>
Subject: patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7

Hi,

FYI, your patch has been queued to stable release 20.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5f85622673ab5c518eeeaae6c2b2ac3ba8946125

Thanks.

Luca Boccassi

---
>From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001
From: Abdullah Sevincer <abdullah.sevincer at intel.com>
Date: Wed, 28 Sep 2022 13:44:19 -0500
Subject: [PATCH] event/dlb2: handle enqueuing more than maximum depth

[ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ]

This patch addresses an issue of enqueuing more than max_enq_depth and not able to dequeuing events equal to max_cq_depth in a single call of rte_event_enqueue_burst and rte_event_dequeue_burst.

Apply fix for restricting enqueue of events to max_enq_depth so that in a single rte_event_enqueue_burst() call at most max_enq_depth events are enqueued.

Also set per port and domain history list sizes based on cq_depth. This results in dequeuing correct number of events as set by max_cq_depth.

Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure")

Signed-off-by: Abdullah Sevincer <abdullah.sevincer at intel.com>
---
 drivers/event/dlb2/dlb2.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c index 97ae8a8b7e..b71c697625 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev *handle,
 		cfg->num_ldb_queues;
 
 	cfg->num_hist_list_entries = resources_asked->num_ldb_ports *
-		DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT;
+		evdev_dlb2_default_info.max_event_port_dequeue_depth;
 
 	DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n",
 		     cfg->num_ldb_queues,
@@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
 	cfg.cq_depth = rte_align32pow2(dequeue_depth);
 	cfg.cq_depth_threshold = 1;
 
-	cfg.cq_history_list_size = DLB2_NUM_HIST_LIST_ENTRIES_PER_LDB_PORT;
+	cfg.cq_history_list_size = cfg.cq_depth;
 
 	if (handle->cos_id == DLB2_COS_DEFAULT)
 		cfg.cos_id = 0;
@@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port,
 	struct dlb2_eventdev_port *ev_port = event_port;
 	struct dlb2_port *qm_port = &ev_port->qm_port;
 	struct process_local_port_data *port_data;
+	int num_tx;
 	int i;
 
 	RTE_ASSERT(ev_port->enq_configured);
@@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port,
 	i = 0;
 
 	port_data = &dlb2_port[qm_port->id][PORT_TYPE(qm_port)];
-
-	while (i < num) {
+	num_tx = RTE_MIN(num, ev_port->conf.enqueue_depth);
+	while (i < num_tx) {
 		uint8_t sched_types[DLB2_NUM_QES_PER_CACHE_LINE];
 		uint8_t queue_ids[DLB2_NUM_QES_PER_CACHE_LINE];
 		int pop_offs = 0;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:28.792535817 +0000
+++ 0056-event-dlb2-handle-enqueuing-more-than-maximum-depth.patch	2022-11-03 09:27:25.461424145 +0000
@@ -1 +1 @@
-From 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 Mon Sep 17 00:00:00 2001
+From 5f85622673ab5c518eeeaae6c2b2ac3ba8946125 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c9e72326bd28cd456509d60bcbe38a15a0bb7d0 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 164ebbcfe2..7fd89e940b 100644
+index 97ae8a8b7e..b71c697625 100644
@@ -31 +32 @@
-@@ -860,7 +860,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
+@@ -460,7 +460,7 @@ dlb2_hw_create_sched_domain(struct dlb2_hw_dev 
+*handle,
@@ -38,3 +39,3 @@
- 	if (device_version == DLB2_HW_V2_5) {
- 		DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d\n",
-@@ -1585,7 +1585,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
+ 	DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n",
+ 		     cfg->num_ldb_queues,
+@@ -1137,7 +1137,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev 
+*dlb2,
@@ -47,3 +48,4 @@
- 	cfg.cos_id = ev_port->cos_id;
- 	cfg.cos_strict = 0;/* best effots */
-@@ -3033,6 +3033,7 @@ __dlb2_event_enqueue_burst(void *event_port,
+ 	if (handle->cos_id == DLB2_COS_DEFAULT)
+ 		cfg.cos_id = 0;
+@@ -2616,6 +2616,7 @@ __dlb2_event_enqueue_burst(void *event_port,
+ 	struct dlb2_eventdev_port *ev_port = event_port;
@@ -52 +53,0 @@
- 	int retries = ev_port->enq_retries;
@@ -57 +58 @@
-@@ -3041,8 +3042,8 @@ __dlb2_event_enqueue_burst(void *event_port,
+@@ -2624,8 +2625,8 @@ __dlb2_event_enqueue_burst(void *event_port,


More information about the stable mailing list