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 0ABA74624E for ; Mon, 17 Feb 2025 18:08:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01DB7402DF; Mon, 17 Feb 2025 18:08:37 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 7DE45400EF for ; Mon, 17 Feb 2025 18:08:35 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-38f325dd90eso1561491f8f.3 for ; Mon, 17 Feb 2025 09:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812115; x=1740416915; 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=RYgIfueF4YLGOh+spCfVVH8mTLvl2MbnuaZSVE59X1k=; b=ZUOxyFVWzbMeB6zkvh+fmiSZT8Dm/UacS+SQ3dGA3BblFWbJSicWZxThAAEwjuh1Nt tCvxpjF9JlOxjp+6RxJOmj5ONskdTc+xR9HO9xQEQ5CnH/9qJwBVN9reVG1ZPLS7Wy99 W35r07oPqmAPkRSvbCbmAxyJlCw4rvlUBrkdj8w4KuMjUmzGAyaoCqIj5Cs1GyF2du/9 ayiYgUHg1dNxGunTF8LxapY5NKKcOBMVMNKCvsSMNs/Jnxpyad4VG697/FNmXrN3zwPb +HNYFWSjVJvx/k//6B75R4Kw6IpHn2qFjNLqJBK4ah4pcnFVJoXRujm4qwgXUD3R5L5q 0HvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812115; x=1740416915; 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=RYgIfueF4YLGOh+spCfVVH8mTLvl2MbnuaZSVE59X1k=; b=sdKDxjLIRiH1hXMgVDhc0fpVQc6lWCvOjyqVwxwaz5fZLsgVC6ean6gPNDuhNT1toZ naZY1H//1SQkIh3gxyQesLCieqTzcrMHkZnvJhod9Nq8XfBokAPzZC3CWuiHMmZCRgwE 5wJgaBejA58iUjLoJxc/w3zjyWFKHdye1fVahkmnzx4FbouyjY6PsR6mJtutZzKGyAgP LyVV8Ei3EnUWbt1ecKyQsuLeyQftQmsb1bKm4TdbLGZ7PlVUfZw7JUEBBVi+gwK+04/0 ldB+QyeoT5Zm0FY5o12bAQVy7+gjOPGj1UGTghlruPc+HTvGkaxZ4ABg36XjLs886U60 panA== X-Gm-Message-State: AOJu0YzV7s7kfohywA+oQUM/webix9yqDi18w1OsG1CT7NxE8B0tyqBh qc1dK9AXFjCsPdfbrKTzeMX5NPiKwUZLBpWtoTXK3COytP6XKo0nGC+rtngdZK6KLg== X-Gm-Gg: ASbGnctpE8yms3khUFqMPVkbe4+NAFhQ6FIYAsOM6zJll+DKhdX14YkfWekLAYY0ewV ICZEdAuowykWNinJN6X6gsEY0hIEFvNnkQjGlJjWYliQesSay/xDo63Bixf3ADICisqoVD5NO0V Je/MPHekn2qhNLjPQ+BiHcHGA/XKg2mqenYLhdMVEatE4C3IEVpmoEEcnbV4VLYn73A+HZL2wNS MVN6P07tN/vlC9ynwnu69kpLg25il7vu/Wq4pkXBOpWPcpXzBEAUSkJPvfUwwiouN4cvT1qM566 JT/p+4UtB8cVcqkqEU0QkQ== X-Google-Smtp-Source: AGHT+IGPIbzBjGv0Py0s3j6t5Xsx5mADY1V+LVFDNSLzRyFEa4aCPeC9hQLQyu+FbpMBSOxwz+L68A== X-Received: by 2002:a5d:5888:0:b0:38f:287a:43e2 with SMTP id ffacd0b85a97d-38f33f11a6amr7932206f8f.11.1739812115040; Mon, 17 Feb 2025 09:08:35 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4398cb4de78sm14443035e9.24.2025.02.17.09.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:08:34 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'examples/ptpclient: fix message parsing' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:40 +0000 Message-ID: <20250217170456.1068278-67-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-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.8 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/19/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c5437fdd9c14ffc378d6d5b855d3301c79f64500 Thanks. Luca Boccassi --- >From c5437fdd9c14ffc378d6d5b855d3301c79f64500 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 5 Feb 2025 08:23:10 -0800 Subject: [PATCH] examples/ptpclient: fix message parsing [ upstream commit 19630bd0d735badb06143086d4f1c50d726b7bad ] Calling memcmp on same structure will always be true. Replace with same conditional used elsewhere. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client") Signed-off-by: Stephen Hemminger --- examples/ptpclient/ptpclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index cdf2da64df..ecc6e09765 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -365,7 +365,7 @@ parse_sync(struct ptpv2_data_slave_ordinary *ptp_data, uint16_t rx_tstamp_idx) ptp_data->ptpset = 1; } - if (memcmp(&ptp_hdr->source_port_id.clock_id, + if (memcmp(&ptp_data->master_clock_id, &ptp_hdr->source_port_id.clock_id, sizeof(struct clock_id)) == 0) { -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:19.197297689 +0000 +++ 0067-examples-ptpclient-fix-message-parsing.patch 2025-02-17 16:13:16.866441592 +0000 @@ -1 +1 @@ -From 19630bd0d735badb06143086d4f1c50d726b7bad Mon Sep 17 00:00:00 2001 +From c5437fdd9c14ffc378d6d5b855d3301c79f64500 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 19630bd0d735badb06143086d4f1c50d726b7bad ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 27d06dd91d..c344e7db1e 100644 +index cdf2da64df..ecc6e09765 100644 @@ -23 +24 @@ -@@ -367,7 +367,7 @@ parse_sync(struct ptpv2_time_receiver_ordinary *ptp_data, uint16_t rx_tstamp_idx +@@ -365,7 +365,7 @@ parse_sync(struct ptpv2_data_slave_ordinary *ptp_data, uint16_t rx_tstamp_idx) @@ -28 +29 @@ -+ if (memcmp(&ptp_data->transmitter_clock_id, ++ if (memcmp(&ptp_data->master_clock_id,