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 0F66842CBC for ; Thu, 15 Jun 2023 03:33:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0916C42D35; Thu, 15 Jun 2023 03:33:53 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 2AC5640DDA for ; Thu, 15 Jun 2023 03:33:52 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3111547c8f9so123136f8f.1 for ; Wed, 14 Jun 2023 18:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686792832; x=1689384832; 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=L5I9xaIuoWWao6gM2+wmdM5xN10+k1IJvwNaZqDness=; b=WgcEBTMGIHetD5PJ1kMKIrcVZh0vB6gXqAbd7H561K/fGrrTzFfggvkD8shCtSCMin BhvxGS+cFkinl3YKn3dFq27YDEVAexOO9DCC6eYMnlBZ8vycWEpgARxPt5nNvQQDZY29 F4ovOJV2YKY48Xmf0t75n1ac8Zh3Q/o8uo86t/7WlRPRBx7/ZSMU1Sv3YN7URDpmnf6W sAgORkPFoiyeV64P7FhdD4ji0Xd2EMIa3/dPqap/9HfagGcOUBliFNgC9RZ/13csamad IQKCO8BKebFFwQU9pbe0YwX9WSe6X9MScNY8H5+StFzsxs5v9Bz+oK8BghHjJacgTPoG kHuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686792832; x=1689384832; 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=L5I9xaIuoWWao6gM2+wmdM5xN10+k1IJvwNaZqDness=; b=kSDkqpGG1MvmJaMa+ID6nlPDUi1mgWB5VrUccs/YrY5jF+/qhfRcsxSseLpG7TJRte GLooNYznfIxYssiySab32EzEbi3p7HFzmHExwwnidBK6TXNiEsBHHAXmC1PojZIOOtu3 cPOD47VVFmDbURz/wxeHNNRfhUsgubNzKY0vjxbRrrDuzkxFK+vYnNN8sY7x5CdImChI MugGZ7nFcmNMegIe4McZF4Lbq+itRjmLbk/bxzoVXesqj1+uDQMgFBy1BP0bABHw9NjK nYQrFj19FJa+pRQdZE7pWwJdcArcILkYbKeSF+pfbaZ2TOYoyifItMzdQ5dbSmY4khvk xQNg== X-Gm-Message-State: AC+VfDwIyr7QUlQ6hpZsnw0KUcvhKZyU1BnuKMJqNf6A2NIrLy5ojLYr GqYuA3LTcMQrWKH2BnIAEFUNshYqnzIZ/w== X-Google-Smtp-Source: ACHHUZ7/nQRkueIxgHYvEAozEmtuoIh3G4C6gA9KB9Q1RLxIGttaB7fWT16wzkW2xyoII/Fr+TOv7A== X-Received: by 2002:a5d:4b84:0:b0:309:4da8:7713 with SMTP id b4-20020a5d4b84000000b003094da87713mr11296937wrt.64.1686792831799; Wed, 14 Jun 2023 18:33:51 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id f3-20020a7bc8c3000000b003f1958eeadcsm18651695wml.17.2023.06.14.18.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 18:33:51 -0700 (PDT) From: luca.boccassi@gmail.com To: Erik Gabriel Carrillo Cc: dpdk stable Subject: patch 'eventdev/timer: fix buffer flush' has been queued to stable release 20.11.9 Date: Thu, 15 Jun 2023 02:32:12 +0100 Message-Id: <20230615013258.1439718-17-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615013258.1439718-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-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.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 06/17/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/67fbfd84f1d58f28f7190d17d923ba786c4a5b6d Thanks. Luca Boccassi --- >From 67fbfd84f1d58f28f7190d17d923ba786c4a5b6d Mon Sep 17 00:00:00 2001 From: Erik Gabriel Carrillo Date: Wed, 12 Apr 2023 14:56:37 -0500 Subject: [PATCH] eventdev/timer: fix buffer flush [ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ] The SW event timer adapter attempts to flush its event buffer on every adapter tick. If events remain in the buffer after the attempt, another attempt to flush won't occur until the next adapter tick, which delays the enqueue of those events to the event device unnecessarily. Move the buffer flush call so that it happens with every invocation of the service function, rather than on every adapter tick, to avoid the delay. Fixes: cc7b73ea9e3b ("eventdev: add new software timer adapter") Signed-off-by: Erik Gabriel Carrillo --- lib/librte_eventdev/rte_event_timer_adapter.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index fac32e2b2d..67b442ff44 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -765,17 +765,18 @@ swtim_service_func(void *arg) sw->n_expired_timers); sw->n_expired_timers = 0; - event_buffer_flush(&sw->buffer, - adapter->data->event_dev_id, - adapter->data->event_port_id, - &nb_evs_flushed, - &nb_evs_invalid); - - sw->stats.ev_enq_count += nb_evs_flushed; - sw->stats.ev_inv_count += nb_evs_invalid; sw->stats.adapter_tick_count++; } + event_buffer_flush(&sw->buffer, + adapter->data->event_dev_id, + adapter->data->event_port_id, + &nb_evs_flushed, + &nb_evs_invalid); + + sw->stats.ev_enq_count += nb_evs_flushed; + sw->stats.ev_inv_count += nb_evs_invalid; + return 0; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-15 01:56:35.657806496 +0100 +++ 0017-eventdev-timer-fix-buffer-flush.patch 2023-06-15 01:56:34.531540517 +0100 @@ -1 +1 @@ -From 53b97347cc84e8df53426c7917a4b65296264c02 Mon Sep 17 00:00:00 2001 +From 67fbfd84f1d58f28f7190d17d923ba786c4a5b6d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 53b97347cc84e8df53426c7917a4b65296264c02 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ - lib/eventdev/rte_event_timer_adapter.c | 17 +++++++++-------- + lib/librte_eventdev/rte_event_timer_adapter.c | 17 +++++++++-------- @@ -23,5 +24,5 @@ -diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c -index 23eb1d4a7d..427c4c6287 100644 ---- a/lib/eventdev/rte_event_timer_adapter.c -+++ b/lib/eventdev/rte_event_timer_adapter.c -@@ -855,17 +855,18 @@ swtim_service_func(void *arg) +diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c +index fac32e2b2d..67b442ff44 100644 +--- a/lib/librte_eventdev/rte_event_timer_adapter.c ++++ b/lib/librte_eventdev/rte_event_timer_adapter.c +@@ -765,17 +765,18 @@ swtim_service_func(void *arg) @@ -51,2 +52,2 @@ - rte_event_maintain(adapter->data->event_dev_id, - adapter->data->event_port_id, 0); + return 0; + }