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 B432D46211 for ; Thu, 13 Feb 2025 11:04:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0ACF42F7E; Thu, 13 Feb 2025 11:04:17 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EA0BF42F7E for ; Thu, 13 Feb 2025 11:04:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739441055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZgPpDkbQq37LyV+5cjSQ78rxLc6OgSco3iXz87iNQJQ=; b=QheSE6VFXr/jDIp61Tjo09pnFcFqC5zbRDZJ3DjsX7Plepl0Roj1WzjyXnNhBl0a0hByWU 5JqE75nF6vBwV7igWF74SMnXQAFGoit7ynYcSvdeWzIT+eG/tsgfxVHyLsYp7gGG8pqCgy MXe2jHpI2FMcF2YuEFiIiv3p2ExuLFM= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-u5-goGGDONKFabDH3uhwLA-1; Thu, 13 Feb 2025 05:04:12 -0500 X-MC-Unique: u5-goGGDONKFabDH3uhwLA-1 X-Mimecast-MFC-AGG-ID: u5-goGGDONKFabDH3uhwLA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 381E018EB2C6; Thu, 13 Feb 2025 10:04:11 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E77EB1800359; Thu, 13 Feb 2025 10:04:09 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: dpdk stable Subject: patch 'examples/l3fwd: fix socket ID check' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:59:24 +0000 Message-ID: <20250213095933.362078-117-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: c5V0I5D6OHB3y_ZIjMRuclLi_cDhCt5DYUH7Twh9roY_1739441051 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.2 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/17/25. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/240570228ec5cea1bbfa64a21de1bc8ded10e3b8 Thanks. Kevin --- >From 240570228ec5cea1bbfa64a21de1bc8ded10e3b8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 5 Feb 2025 08:23:19 -0800 Subject: [PATCH] examples/l3fwd: fix socket ID check [ upstream commit a7216f081767c7259dd3fba5eda0ca7b0bcb4595 ] The expression: if ((socketid = rte_lcore_to_socket_id(lcore) != 0) && gets evaluated as socketid = (rte_lcore_to_socket_id(lcore) != 0) which is not what was intended. This is goes all the way back to first release. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Fixes: af75078fece3 ("first public release") Signed-off-by: Stephen Hemminger --- examples/l3fwd-power/main.c | 4 ++-- examples/l3fwd/main.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index ae8b55924e..7957ea6c95 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1413,6 +1413,6 @@ check_lcore_params(void) return -1; } - if ((socketid = rte_lcore_to_socket_id(lcore) != 0) && - (numa_on == 0)) { + socketid = rte_lcore_to_socket_id(lcore); + if (socketid != 0 && numa_on == 0) { printf("warning: lcore %u is on socket %d with numa " "off\n", lcore, socketid); diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 994b7dd8e5..ae3b4f6439 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -312,6 +312,7 @@ check_lcore_params(void) return -1; } - if ((socketid = rte_lcore_to_socket_id(lcore) != 0) && - (numa_on == 0)) { + + socketid = rte_lcore_to_socket_id(lcore); + if (socketid != 0 && numa_on == 0) { printf("warning: lcore %u is on socket %d with numa off\n", lcore, socketid); -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:46.862694090 +0000 +++ 0117-examples-l3fwd-fix-socket-ID-check.patch 2025-02-12 17:29:34.659947773 +0000 @@ -1 +1 @@ -From a7216f081767c7259dd3fba5eda0ca7b0bcb4595 Mon Sep 17 00:00:00 2001 +From 240570228ec5cea1bbfa64a21de1bc8ded10e3b8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a7216f081767c7259dd3fba5eda0ca7b0bcb4595 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index d279e664b3..e27b8531b5 100644 +index ae8b55924e..7957ea6c95 100644