From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EEE8A00C2 for ; Thu, 3 Nov 2022 10:31:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5127B40694; Thu, 3 Nov 2022 10:31:17 +0100 (CET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id C8E1C40693 for ; Thu, 3 Nov 2022 10:31:16 +0100 (CET) Received: by mail-wr1-f41.google.com with SMTP id a14so1726440wru.5 for ; Thu, 03 Nov 2022 02:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=upcuvO9b8ESB3lM/vvdzkpJr+SsyStNYTmWpoL8StkI=; b=TVLfZY2wkMvPls8q9To6QGZ0q7glDL+QBrvrd6hGx+ZMDFADsDqAxxq8t9igpoLVGi e2IQ+kfxznmzyJGdPF9hYQnK+Gc4sXspqKmiTs1q398jvt4MHVvv1pArroLsHIAFc9jD 6IfmGJXCNEy8Dmuk9paU+gT7Wf4AdZQ51tsp2+M2nh7md2WLAyzS0Jl0mvXJVUSjOfm2 OG39ZHJ5v6yNOH3Ebhbv4sgQ9baY4tpVpWhwg7WTvkRXzV8LLuQxNjfJhU2p9+Iad2W/ L8j6WbNAazxEzyL+vn0CA8J6O+AKJuW+wzf9ooDumiCBMyJLivQbyNXKpt2LmVh1/fDs oBlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=upcuvO9b8ESB3lM/vvdzkpJr+SsyStNYTmWpoL8StkI=; b=Ncss78rWiio+QNZv7XCgW1Ep74HGkunqV1tKIRlJfV5JYp3UdECbHJu1Z0Hj5iQUn9 xJrdfZTMB3NFtEeJEw3QLozexDnjdDm3r9m2SKT4YekDUBYkZ1uGYJLV9KbHJijpzAi/ 3JqtBXjy5hkWSydrMYxpeRgrgAMBn/wTbjh6IzTK67tlLM0ol2O150AjQ8hxTHIp0/dc d6phDm+mldVOWQDmcnZ/dd3GYfzNeDHzcPTSV6YQYsz0OgRSj7cpeW3lOe1I+lWDqMS9 yPr8V+x3S80Lzm3BAvQ60kp4XSVtHwylS8FdZGp/qf2MbJrbNFI5/A0sPy6i7OsXYYPV DF6g== X-Gm-Message-State: ACrzQf3eQkuFQhvBJheOn/CUHH5zH8UKZzJGdAzU3NNIOhLXoPYRFA84 7YR+5KDYTEfjWhhMSwyqfuQ= X-Google-Smtp-Source: AMsMyM4tOnCu9VLoJj6S9y0sll6boQbHzBCDdgHYr30s4KWdOKJaKctpqQeyWoah/LWPXSQMoN+Baw== X-Received: by 2002:a5d:4887:0:b0:226:ed34:7bbd with SMTP id g7-20020a5d4887000000b00226ed347bbdmr17374789wrq.561.1667467876519; Thu, 03 Nov 2022 02:31:16 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id v3-20020a1cac03000000b003b47e75b401sm4400621wme.37.2022.11.03.02.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:31:15 -0700 (PDT) From: luca.boccassi@gmail.com To: Abdullah Sevincer Cc: dpdk stable Subject: patch 'event/dlb2: handle enqueuing more than maximum depth' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:14 +0000 Message-Id: <20221103092758.1099402-56-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 --- 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@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,