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 7BC9543CAD for ; Thu, 14 Mar 2024 01:13:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 610FF42E40; Thu, 14 Mar 2024 01:13:24 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 7315340297 for ; Thu, 14 Mar 2024 01:13:22 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33e1d327595so200170f8f.2 for ; Wed, 13 Mar 2024 17:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710375202; x=1710980002; darn=dpdk.org; 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=H3RlCa0xGV7BIHbPNyPUcbChybOSbvS5zzrqf3RAtWo=; b=iz4jOrXMuOO9QfGQ0fqKb3gZ7DndQhuNsynAWQo4UiUCE9Zqq27irbA/Xz6sMkEmxt jeWAT78Na7uQn0ZUF1Lm3k4BEy5FjQOgU4x9tUxPu0l5pAWQA07VSJBAReHcPCDTpRrK 1XHRW0OtBpXbrabEajtVXiMxEq0O3jIeNk/BJfWpyfUUQC/OkYwF6YnfTVQbZmZVgOaA +xzxyB3lXZ3Ibq2tyd7mV1wrJr6vJlnlhO+Utcz+GwHSFNjPPaACUkv9+0p0dmMNKtB/ SYRv6rhSN2fTnSo5tHLq4KVf+cyueL8W6rp67uVz76F6dLOQQ5KNLZWlD3t2xwXsG1OU 2nRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710375202; x=1710980002; 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=H3RlCa0xGV7BIHbPNyPUcbChybOSbvS5zzrqf3RAtWo=; b=CEbwglgUAvbYZrYxODjSFbfNMpUdhh1tNZNX5ErV6wdlNgCFVggN4Sd6kT8mNoW4fJ DhVjnpYwDZOX7bTBvhuHM4AZ29ac4heb6UmjcTCsYk/v2c4anEwO7Nf8FMzoKTCZyppj fdJatYxkpu4qk2LMejVOL5PRm62LGdDGurP2bqbnDIIqV/n9bSfgWstqm/pONW8uX8Pm MML8k3vXNYaZSH0S7O50h7Gh0ZK+VhwgbJT02hGeN4SgVmIh+PD5sK7lZOg+qOKeGFZy xPNQxSE4IKS2W93Q4A4yk6Jlynzz+bupTUmRS1V0JqBVLGvLxjQoQp3FwncpFUEXR778 QYXg== X-Forwarded-Encrypted: i=1; AJvYcCVhgX2k6U0jRf0psEvlBplVL4Cj/tkoc7RXvY3m8LsvdjyZZyb/mPZU4YRMeyDFqmiCLIFpeP7k6eoCzu2UmtY= X-Gm-Message-State: AOJu0YyLPaAPSjNGfKkog3cgDWeRBGsvxcgesA33+720FNR7ZmmRyx7q wSQMdcR9mh7wjccz1loJskpRQB5x4wUxvm3+3DZE2ARSeQqix7YEi4SZmRxrQU4= X-Google-Smtp-Source: AGHT+IEHfR/RelmNUXgpZVWF/nhhtc30+fWtkX4i162ysQ/SyP+S3Su5SE3ZqWBEPLQqIHJMnvV8RQ== X-Received: by 2002:a5d:414e:0:b0:33e:c528:c900 with SMTP id c14-20020a5d414e000000b0033ec528c900mr63443wrq.55.1710375202041; Wed, 13 Mar 2024 17:13:22 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id bn5-20020a056000060500b0033e49aebafasm298514wrb.3.2024.03.13.17.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 17:13:21 -0700 (PDT) From: luca.boccassi@gmail.com To: Konstantin Ananyev Cc: Konstantin Ananyev , Pavan Nikhilesh , dpdk stable Subject: patch 'examples/l3fwd: fix Rx over not ready port' has been queued to stable release 22.11.5 Date: Thu, 14 Mar 2024 00:09:57 +0000 Message-Id: <20240314000957.2810803-61-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240314000957.2810803-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-102-luca.boccassi@gmail.com> <20240314000957.2810803-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 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/16/24. 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/bd00ef3b097eae5625f96655cf04842ee8530c40 Thanks. Luca Boccassi --- >From bd00ef3b097eae5625f96655cf04842ee8530c40 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Fri, 1 Mar 2024 16:39:31 +0000 Subject: [PATCH] examples/l3fwd: fix Rx over not ready port [ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ] Running l3fwd in event mode with SW eventdev, service cores can start RX before main thread is finished with PMD installation. to reproduce: ./dpdk-l3fwd --lcores=49,51 -n 6 -a ca:00.0 -s 0x8000000000000 \ --vdev event_sw0 -- \ -L -P -p 1 --mode eventdev --eventq-sched=ordered \ --rule_ipv4=test/l3fwd_lpm_v4_u1.cfg --rule_ipv6=test/l3fwd_lpm_v6_u1.cfg \ --no-numa At init stage user will most likely see the error message like that: ETHDEV: lcore 51 called rx_pkt_burst for not ready port 0 0: ./dpdk-l3fwd (rte_dump_stack+0x1f) [15de723] ... 9: ./dpdk-l3fwd (eal_thread_loop+0x5a2) [15c1324] ... And then all depends how luck/unlucky you are. If there are some actual packet in HW RX queue, then the app will most likely crash, otherwise it might survive. As error message suggests, the problem is that services are started before main thread finished with NIC setup and initialization. The suggested fix moves services startup after NIC setup phase. Bugzilla ID: 1390 Fixes: 8bd537e9c6cf ("examples/l3fwd: add service core setup based on caps") Signed-off-by: Konstantin Ananyev Signed-off-by: Konstantin Ananyev Acked-by: Pavan Nikhilesh --- examples/l3fwd/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index a4f061537e..329427ae4f 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1512,7 +1512,6 @@ main(int argc, char **argv) l3fwd_lkp.main_loop = evt_rsrc->ops.fib_event_loop; else l3fwd_lkp.main_loop = evt_rsrc->ops.lpm_event_loop; - l3fwd_event_service_setup(); } else l3fwd_poll_resource_setup(); @@ -1543,6 +1542,11 @@ main(int argc, char **argv) } } +#ifdef RTE_LIB_EVENTDEV + if (evt_rsrc->enabled) + l3fwd_event_service_setup(); +#endif + printf("\n"); for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-14 00:09:23.421846804 +0000 +++ 0061-examples-l3fwd-fix-Rx-over-not-ready-port.patch 2024-03-14 00:09:20.717617286 +0000 @@ -1 +1 @@ -From 495709d32be87cb962c55917b19ad7d4489cde3e Mon Sep 17 00:00:00 2001 +From bd00ef3b097eae5625f96655cf04842ee8530c40 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 495709d32be87cb962c55917b19ad7d4489cde3e ] + @@ -31 +32,0 @@ -Cc: stable@dpdk.org @@ -41 +42 @@ -index 3bf28aec0c..d4fb5d1971 100644 +index a4f061537e..329427ae4f 100644 @@ -44 +45 @@ -@@ -1577,7 +1577,6 @@ main(int argc, char **argv) +@@ -1512,7 +1512,6 @@ main(int argc, char **argv) @@ -50 +50,0 @@ - #endif @@ -52 +52,2 @@ -@@ -1609,6 +1608,11 @@ main(int argc, char **argv) + +@@ -1543,6 +1542,11 @@ main(int argc, char **argv)