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 88BD2A0524 for ; Fri, 5 Feb 2021 12:36:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FC6F188A34; Fri, 5 Feb 2021 12:36:19 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id D39F7188A30 for ; Fri, 5 Feb 2021 12:36:18 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id j21so2945417wmj.0 for ; Fri, 05 Feb 2021 03:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RsNePhJeg5pcEWV8K/c50GrqMGrVTPA5Dn3yFTO3+tg=; b=FHjFCryhnEHNM5SJHXuIbrnNWINtH5f9PVJh3nVOi9uxHWNG5FQkBfXuLLLDuIQgsc cRWYmDjQE2y4l/PICfbZriUmQ62YdncmhsAHbn3+T8GbtaZKKLcSOuZgwHIIl8RHSONw AXBxiEn57cdgwKdnn1b/F4+aby2p+jJadjG9pu16c3QoBbovjWoRONNO7ybvEZ8HfFqw lRSdTNXgBYldf/1h87mqkfzSflBlB7zvlYTFtlQksu1Min8pLpbdQtZ58x47px3bCSox zDloOW8Uyc5v9QNDSVyDvL4kN8Q6aOXvPz28T4ucOS7/AK2xiIS/DLjun8rN8ZBe+kex 9tjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RsNePhJeg5pcEWV8K/c50GrqMGrVTPA5Dn3yFTO3+tg=; b=NO3R1lC168q40+0pJ3QbyCfW3Ontswhew+lME1YcoZ0irAM8nPJYAbsYeVdox62IS7 2zdUjMTnObCgh/DHZUo+fk1awZJ+xOioKGMGS0WkFdojirrVJcF9+bicNw3ZmMmi1dLk VEGx2537gYFo9xFxDGsUP2srq2/XxFVdsKIpHRxTmBBODgLSdn3JfbyPi13fKDrqA8eF brdMIPKb2I/KrLIkCeAz8iXtnsqM2Psk+0g8jOgfPx8Zxbbpoa+bL0V48PKDk0d5Fsqg idnTT3g8alf7R9Gjcww1Qz+kPYdfEcNl7Lq6Xuw7qY/WsA/Nz5KpMrxj/PNDorVEE9ff rRiA== X-Gm-Message-State: AOAM5337tcftZhg69n+a3meK6ohQKoW+7LJCjvFD8auLEDu92c6hby+Y G1e0AIDfRypZKmlXKCgnDGBb2UX573m3GV9x X-Google-Smtp-Source: ABdhPJzXSrRTqdq1fXZPBD3MPHqbTdzRa3rV3ulXCF2ucqTWU0UhE5Q7YIA/gmLcuPG3JCEjtf2dmA== X-Received: by 2002:a1c:6a02:: with SMTP id f2mr3313583wmc.36.1612524978655; Fri, 05 Feb 2021 03:36:18 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id c9sm8905930wmb.33.2021.02.05.03.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:36:17 -0800 (PST) From: luca.boccassi@gmail.com To: Feifei Wang Cc: Ruifeng Wang , dpdk stable Date: Fri, 5 Feb 2021 11:18:15 +0000 Message-Id: <20210205111920.1272063-209-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/eventdev: check CPU core enabling' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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/d80220608085cdc142652b70b9fb82529c603138 Thanks. Luca Boccassi --- >From d80220608085cdc142652b70b9fb82529c603138 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Thu, 14 Jan 2021 18:30:59 +0800 Subject: [PATCH] examples/eventdev: check CPU core enabling [ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ] In the case that the cores are isolated, if "-l" or "-c" parameter is not added, the cores will not be enabled and can not launch worker function correctly. In the meanwhile, no error information is reported. For example: totally CPUs:16 isolated CPUs:1-8 command: sudo gdb -args ./dpdk-eventdev_pipeline --vdev event_sw0 \ -- -r1 -t1 -e4 -w F00 -s4 -n0 -c32 -W1000 -D cores information: rte_config->lcore_role = {ROLE_RTE, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_OFF, ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE, ROLE_RTE} output information: ... [main()] lcore 9 executing worker, using eventdev port 0 [main()] lcore 10 executing worker, using eventdev port 1 [main()] lcore 11 executing worker, using eventdev port 2 This is because "RTE_LCORE_FOREACH_WORKER" chooses the enabled core. In the case that the cores are isolated, "the lcore_role" flag of isolated cores are set as "ROLE_OFF" by default(not enabled). So if we choose these isolated cores as workers, "RTE_LCORE_FOREACH_WORKER" will ignore these cores and not launch worker functions on them. To fix this, add "-l" parameters to doc and add lcore enabled check. Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide") Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- doc/guides/sample_app_ug/eventdev_pipeline.rst | 5 +++-- examples/eventdev_pipeline/main.c | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guides/sample_app_ug/eventdev_pipeline.rst b/doc/guides/sample_app_ug/eventdev_pipeline.rst index 4508c3dcc8..19ff53803e 100644 --- a/doc/guides/sample_app_ug/eventdev_pipeline.rst +++ b/doc/guides/sample_app_ug/eventdev_pipeline.rst @@ -34,6 +34,7 @@ options. An example eventdev pipeline running with the software eventdev PMD using these settings is shown below: + * ``-l 0,2,8-15``: lcore to use * ``-r1``: core mask 0x1 for RX * ``-t1``: core mask 0x1 for TX * ``-e4``: core mask 0x4 for the software scheduler @@ -46,8 +47,8 @@ these settings is shown below: .. code-block:: console - .//examples/dpdk-eventdev_pipeline --vdev event_sw0 -- -r1 -t1 \ - -e4 -w FF00 -s4 -n0 -c32 -W1000 -D + .//examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \ + -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D The application has some sanity checking built-in, so if there is a function (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index 823f8b51c2..ae50591b88 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -239,8 +239,15 @@ parse_app_args(int argc, char **argv) if (fdata->worker_core[i]) cdata.num_workers++; - if (core_in_use(i)) + if (core_in_use(i)) { + if (!rte_lcore_is_enabled(i)) { + printf("lcore %d is not enabled in lcore list\n", + i); + rte_exit(EXIT_FAILURE, + "check lcore params failed\n"); + } cdata.active_cores++; + } } } -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:38.462968102 +0000 +++ 0209-examples-eventdev-check-CPU-core-enabling.patch 2021-02-05 11:18:29.166697965 +0000 @@ -1 +1 @@ -From 3d15913432f12a2abcaa00122502eb944feeeb29 Mon Sep 17 00:00:00 2001 +From d80220608085cdc142652b70b9fb82529c603138 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3d15913432f12a2abcaa00122502eb944feeeb29 ] + @@ -37 +38,0 @@ -Cc: stable@dpdk.org