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 B1B69A0524 for ; Fri, 5 Feb 2021 12:36:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4ED34067B; Fri, 5 Feb 2021 12:36:21 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 29610188A33 for ; Fri, 5 Feb 2021 12:36:20 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id d16so7266667wro.11 for ; Fri, 05 Feb 2021 03:36:20 -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=Xbt2jmKAMWcyBVg+HhXjCJXS8EqQEi/BuU7Y+WhcKD0=; b=DUqfnM2lcmlsk6nQ0BCotryHtPUZwUxvi9iMEEZFaHeu7Y+ie5V3DjRctak/rRmZj5 19/HjUVwUxX1bo8hyyE2+v4BN88C3VGcQJqkreoU9/ndtaXdyfwcVj/6Yk8Q9O630uUz 45Z4z133H7nMEeIQs36TjB2z6t1HlT/q2AobmPJFb8TcAP1T/bLcw81d2ycQFebaGo2n XEoeGjXCxrRc1etUYi+5EDfxG0vH9Kfk3wG6DcP+jli0AVVJFH5XmUnl6HO7YawrtqjO Ul95ji3+g2Ln9hKYs2kyFlR4mTti7psSJmlhNcq42NZ35vWf1ikfwWboehFcXx+yUij+ OpvQ== 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=Xbt2jmKAMWcyBVg+HhXjCJXS8EqQEi/BuU7Y+WhcKD0=; b=ZFEzxujt2NTAhHF77LLSJUnZQEgmHStut4oZQMfIMSumFvVrzrYnT4t8J27pAvM2ke f2MNc5zobo7rT5tn0GFwEreIle6J1rvcuCHi0bKW4eBQ6ypDQ5Z4zJgZDgTV2VTpU75I +cn1BJj6w45bb+Dtm5yliX8VyxOwnk9ffbLqKhUGMaWtA109yExcuXkR5ZR3EGt0jyzr 9vd6cUR9jDUBLTnh8zPagsXU78yZKCjuPC47rJoAA4hkkCPjoNf/fkEguguNyCn3TFPY Ik9ZwZ5EUk1l4JVQ+sx+N/fhEjFI2/iq7+ywU2Jpz9J1oEmFwj2Kv8sVjT8Nk15g/zy7 uoKQ== X-Gm-Message-State: AOAM533+tJtUiEdij0wj4JOPIk5P7RHB84NqsUvj/subgL5+SqoXkAuq UPTqV3VzJBq2IhgMRUZ/lmhsF+hW9DRAPSiJ X-Google-Smtp-Source: ABdhPJwVQpgEtwCjwtRDAxAky/zIGF2h1geunzjg8sJshlstJ31MejKUN7lEEEzXrbzvMn1rQGcuCw== X-Received: by 2002:a5d:6691:: with SMTP id l17mr4520515wru.372.1612524979975; Fri, 05 Feb 2021 03:36:19 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m18sm12002148wrx.17.2021.02.05.03.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:36:19 -0800 (PST) From: luca.boccassi@gmail.com To: Feifei Wang Cc: Ruifeng Wang , dpdk stable Date: Fri, 5 Feb 2021 11:18:16 +0000 Message-Id: <20210205111920.1272063-210-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: add info output for main core' 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/8b0f6895e29d9c9c35f53ee623fbe86771e406b7 Thanks. Luca Boccassi --- >From 8b0f6895e29d9c9c35f53ee623fbe86771e406b7 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Thu, 14 Jan 2021 18:31:00 +0800 Subject: [PATCH] examples/eventdev: add info output for main core [ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ] When the main core is set as tx/rx/sched/worker core, it also needs to print some information to show this. Thus, add info output for the main core, and add a "dump" function to print core information for the sake of code simplicity and easy maintenance. In the meanwhile, fix the count error. For the variable "worker_idx", it should be incremented when the core is set as worker core. However, when the main core is set as rx/tx/sched core, the worker_idx is also incremented. Though this error may not have a substantial impact due to that the main core is the last launched core, but it should be corrected from the perspective of code correctness. Fixes: 1094ca96689c ("doc: add SW eventdev pipeline to sample app guide") Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- examples/eventdev_pipeline/main.c | 55 +++++++++++++++++++------------ 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index ae50591b88..9982d5bfb0 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -22,6 +22,32 @@ struct config_data cdata = { .worker_cq_depth = 16 }; +static void +dump_core_info(unsigned int lcore_id, struct worker_data *data, + unsigned int worker_idx) +{ + if (fdata->rx_core[lcore_id]) + printf( + "[%s()] lcore %d executing NIC Rx\n", + __func__, lcore_id); + + if (fdata->tx_core[lcore_id]) + printf( + "[%s()] lcore %d executing NIC Tx\n", + __func__, lcore_id); + + if (fdata->sched_core[lcore_id]) + printf( + "[%s()] lcore %d executing scheduler\n", + __func__, lcore_id); + + if (fdata->worker_core[lcore_id]) + printf( + "[%s()] lcore %d executing worker, using eventdev port %u\n", + __func__, lcore_id, + data[worker_idx].port_id); +} + static bool core_in_use(unsigned int lcore_id) { return (fdata->rx_core[lcore_id] || fdata->sched_core[lcore_id] || @@ -413,25 +439,7 @@ main(int argc, char **argv) !fdata->sched_core[lcore_id]) continue; - if (fdata->rx_core[lcore_id]) - printf( - "[%s()] lcore %d executing NIC Rx\n", - __func__, lcore_id); - - if (fdata->tx_core[lcore_id]) - printf( - "[%s()] lcore %d executing NIC Tx\n", - __func__, lcore_id); - - if (fdata->sched_core[lcore_id]) - printf("[%s()] lcore %d executing scheduler\n", - __func__, lcore_id); - - if (fdata->worker_core[lcore_id]) - printf( - "[%s()] lcore %d executing worker, using eventdev port %u\n", - __func__, lcore_id, - worker_data[worker_idx].port_id); + dump_core_info(lcore_id, worker_data, worker_idx); err = rte_eal_remote_launch(fdata->cap.worker, &worker_data[worker_idx], lcore_id); @@ -446,8 +454,13 @@ main(int argc, char **argv) lcore_id = rte_lcore_id(); - if (core_in_use(lcore_id)) - fdata->cap.worker(&worker_data[worker_idx++]); + if (core_in_use(lcore_id)) { + dump_core_info(lcore_id, worker_data, worker_idx); + fdata->cap.worker(&worker_data[worker_idx]); + + if (fdata->worker_core[lcore_id]) + worker_idx++; + } rte_eal_mp_wait_lcore(); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:38.498251727 +0000 +++ 0210-examples-eventdev-add-info-output-for-main-core.patch 2021-02-05 11:18:29.166697965 +0000 @@ -1 +1 @@ -From 198b5448433ed329becaf47003faf038132fbb7f Mon Sep 17 00:00:00 2001 +From 8b0f6895e29d9c9c35f53ee623fbe86771e406b7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 198b5448433ed329becaf47003faf038132fbb7f ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org