From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01805A051C for ; Tue, 11 Feb 2020 12:23:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA6072B9C; Tue, 11 Feb 2020 12:23:48 +0100 (CET) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by dpdk.org (Postfix) with ESMTP id 1C5CB1BE9E for ; Tue, 11 Feb 2020 12:23:47 +0100 (CET) Received: by mail-wm1-f49.google.com with SMTP id c84so3047513wme.4 for ; Tue, 11 Feb 2020 03:23:47 -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=6bbF9R8HJuECgFxUIxar40IIBRjf+O/4IYbIius0HVg=; b=jn2UH1aphdsUD4tox6L2jwhoRhQP5xuCeDkw2wsWOpFzzUqwtYiQFEqQXEvFA6zKc/ c4/EvxGpVbHfclMagg8miCVDCzd0eC2swIeeuYAAUZenQTSj8XqgdH/8aHzjAyzXgrkn OQGu0EV7JQFbOYZz9R64QqwIDtB5BUlk4n8J7XAGzBVfwqiSbvQURtLs0m3w67YjRidE F4oGwWgs+fcuCGv632P8HmdEC+wCjGDnh5nnmNPZStGam7m/jtiU6F7oO8CZLqkNgTJZ IhNMevEf5TxSSbn39nay7dhFk2xt7cTDClnacde6iqZSfiHMj9VymgnllbPcvNi19yp3 yVjg== 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=6bbF9R8HJuECgFxUIxar40IIBRjf+O/4IYbIius0HVg=; b=spsRGywrq84XPDk7sLVj23V3zPLLI0LIEaLptCUdunjC8RrCYBCh/4iLFXm8YWMcQG wy9edQw/+ArtI/mgyvTmdYgAC4dEGcmQsH9HplrKWGx0OOuNzSfO3ZH+S3Y1am9z7qan vT5l2lgak2/whjKl8p0WOmCIMn9cJiFwbhYPBVPbWTYFwJT1DPZCBNGtM4CWwI+FAqLp 5ouxdAFyArCTcJW4I05hT/9elToMnlULhfBDOEv+8u5r7t2kySRCuMsh47eIGEmS4+KV QAzocQQkd32StZjnq56u4r26K1Epikc3L1ljUuswgefjCP5v0RLhcDrpJkCybWIwpQmT sQEA== X-Gm-Message-State: APjAAAUBYpOz7GmCw4fFvVBeqSqGP/GICahCHtoYqpT0hhOx/DkPRzsO Q7dVPnPXL5nrhwPLLdOS15+zW2bz X-Google-Smtp-Source: APXvYqzUX1EKUGhojGoEaS03DT597fOs4iN35ZAhdTIE1V6rhiDMcaY38hgIrWtX8X2RqeiGHCB9xA== X-Received: by 2002:a1c:f713:: with SMTP id v19mr4918267wmh.113.1581420226750; Tue, 11 Feb 2020 03:23:46 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id e1sm4972713wrt.84.2020.02.11.03.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:23:46 -0800 (PST) From: luca.boccassi@gmail.com To: Pavan Nikhilesh Cc: dpdk stable Date: Tue, 11 Feb 2020 11:19:22 +0000 Message-Id: <20200211112216.3929-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/l2fwd-event: fix event device config' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 19.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/13/20. 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. Thanks. Luca Boccassi --- >From 807a4bdc1f226f474d3b995b42289cb8a7fd081c Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 20 Dec 2019 19:57:41 +0530 Subject: [PATCH] examples/l2fwd-event: fix event device config [ upstream commit 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d ] Always enable implicit release since we don't support explicit release in datapath. Master lcore is used only for printing stats so don't allocate event port for it. Fix service launch for event device without distributed scheduling. Fixes: bcb6f841d42a ("examples/l2fwd-event: setup service core") Signed-off-by: Pavan Nikhilesh --- examples/l2fwd-event/l2fwd_event.c | 2 +- examples/l2fwd-event/l2fwd_event_generic.c | 9 ++++++--- examples/l2fwd-event/l2fwd_event_internal_port.c | 11 +++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c index 0379c580d6..38d590c14c 100644 --- a/examples/l2fwd-event/l2fwd_event.c +++ b/examples/l2fwd-event/l2fwd_event.c @@ -67,7 +67,7 @@ l2fwd_event_service_setup(struct l2fwd_resources *rsrc) int ret, i; rte_event_dev_info_get(evt_rsrc->event_d_id, &evdev_info); - if (evdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED) { + if (!(evdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED)) { ret = rte_event_dev_service_id_get(evt_rsrc->event_d_id, &service_id); if (ret != -ESRCH && ret != 0) diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c index b7e467c1e1..b07306a17b 100644 --- a/examples/l2fwd-event/l2fwd_event_generic.c +++ b/examples/l2fwd-event/l2fwd_event_generic.c @@ -42,8 +42,10 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc) /* Event device configurtion */ rte_event_dev_info_get(event_d_id, &dev_info); - evt_rsrc->disable_implicit_release = !!(dev_info.event_dev_cap & - RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE); + + /* Enable implicit release */ + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE) + evt_rsrc->disable_implicit_release = 0; if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES) event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES; @@ -70,7 +72,8 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc) event_d_conf.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; - num_workers = rte_lcore_count() - rte_service_lcore_count(); + /* Ignore Master core and service cores. */ + num_workers = rte_lcore_count() - 1 - rte_service_lcore_count(); if (dev_info.max_event_ports < num_workers) num_workers = dev_info.max_event_ports; diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c index b382763dd9..5e6e8598af 100644 --- a/examples/l2fwd-event/l2fwd_event_internal_port.c +++ b/examples/l2fwd-event/l2fwd_event_internal_port.c @@ -27,7 +27,6 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc) .nb_event_port_enqueue_depth = 128 }; struct rte_event_dev_info dev_info; - uint8_t disable_implicit_release; const uint8_t event_d_id = 0; /* Always use first event device only */ uint32_t event_queue_cfg = 0; uint16_t ethdev_count = 0; @@ -44,10 +43,9 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc) /* Event device configurtion */ rte_event_dev_info_get(event_d_id, &dev_info); - disable_implicit_release = !!(dev_info.event_dev_cap & - RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE); - evt_rsrc->disable_implicit_release = - disable_implicit_release; + /* Enable implicit release */ + if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE) + evt_rsrc->disable_implicit_release = 0; if (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES) event_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES; @@ -73,7 +71,8 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc) event_d_conf.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; - num_workers = rte_lcore_count(); + /* Ignore Master core. */ + num_workers = rte_lcore_count() - 1; if (dev_info.max_event_ports < num_workers) num_workers = dev_info.max_event_ports; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:39.634284000 +0000 +++ 0016-examples-l2fwd-event-fix-event-device-config.patch 2020-02-11 11:17:38.311999701 +0000 @@ -1,8 +1,10 @@ -From 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d Mon Sep 17 00:00:00 2001 +From 807a4bdc1f226f474d3b995b42289cb8a7fd081c Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 20 Dec 2019 19:57:41 +0530 Subject: [PATCH] examples/l2fwd-event: fix event device config +[ upstream commit 345a22d5ec1ab70e9d965ae50558049e6c0f2f8d ] + Always enable implicit release since we don't support explicit release in datapath. Master lcore is used only for printing stats so don't allocate event @@ -10,7 +12,6 @@ Fix service launch for event device without distributed scheduling. Fixes: bcb6f841d42a ("examples/l2fwd-event: setup service core") -Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh ---