From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 2492E455AD
	for <public@inbox.dpdk.org>; Mon, 15 Jul 2024 17:30:12 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2050240DDC;
	Mon, 15 Jul 2024 17:30:12 +0200 (CEST)
Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com
 [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 9700240A71
 for <stable@dpdk.org>; Mon, 15 Jul 2024 17:30:10 +0200 (CEST)
Received: by mail-wr1-f44.google.com with SMTP id
 ffacd0b85a97d-3679f806223so3275651f8f.0
 for <stable@dpdk.org>; Mon, 15 Jul 2024 08:30:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1721057410; x=1721662210; 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=xbWtq0F+5h0WViUjMDp5PyT8P2TjIvQMcz65LthaFBo=;
 b=ar0B/o4G9IGVFh74qngJfjOoo7pZUqV+6KysPMfLzAQxu8TBR69Xoc/n5TORRXtNpD
 mtZdcsaSDgrEVvmtJdoadXg1oFCUMD1Q5nwRrXz8oO1eN9blGJZ/tZVXPOBCSAwjxviO
 jfBzbfubcuH97n+uK7FIFdXNIn0M57JWZoEBMXz0bDoPHEFHnoIwf6fpGri8se18K9lo
 SFw6qJwqTEGADcuLgznCFgOP7VMO8n9RoDsYdkgEoCEOEXMbhOG9nfl9qk13nUJbv0nX
 k6q296h+QRPpncgAm1zh8xuGeb1fIJNT2PVR2q32V3+u7gSU86XkxwSRt0BX43SKzLcy
 1HNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721057410; x=1721662210;
 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=xbWtq0F+5h0WViUjMDp5PyT8P2TjIvQMcz65LthaFBo=;
 b=qcCYBrosqjq3g+HWD7HK4U4/eZ/X8N32OkbuWv/3CMkUjYEqXMIrrTOrO+q0n/2qAu
 uny2yJnnoJ3TtiofEJBtKBMZ4NmSN44K8hCd257x5EaGDzbcr+GPL0JTgjJzTCvNcOed
 kvLJREtAtRAp5hB4Ts6IC3bLWBhXezXC9tRXzS2ns49CrXNkz16hF1B4FG5h73uQBfuy
 L77Gxsa9xAvdpWpokJMVNclolon5KSTXiXifA+H9Z7KEWxEcdUnZU8KcqBMhUKc8b/Qi
 6+6IRkoRH/elUPu7fyInGrOojsaQ4v5+gpU7Uax2y2e4IG+wcmO2iWhBQ6vupwwlC7hv
 FWFg==
X-Forwarded-Encrypted: i=1;
 AJvYcCU23TSXL2SvFLz68nuz+5l2hE1pl4sglrmCOBwNDuHg2uzKdcUmcelZIxJPZjg59NF6A1xOAvjMl7zxjsWfrlc=
X-Gm-Message-State: AOJu0Yz/hSQYC6mPWXd3QFRlFxGWXnz1KyoB1OS1n3XBkbqD3oxzEChB
 OUAZKMPTPn/QqcLEp1Rq9xtpB2k3MVA64NsUP894FaHXuohr5p/P
X-Google-Smtp-Source: AGHT+IHSzO65dPVqpUZyixOWxlNWomeIOOdWd8FOUiEjnsLEPULOp7t24+Vn5FECCisgNd+AKD8Jww==
X-Received: by 2002:a05:6000:18ac:b0:363:b3ea:7290 with SMTP id
 ffacd0b85a97d-367ff705360mr9287497f8f.20.1721057410259; 
 Mon, 15 Jul 2024 08:30:10 -0700 (PDT)
Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3680dab3b41sm6756833f8f.5.2024.07.15.08.30.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 15 Jul 2024 08:30:09 -0700 (PDT)
From: luca.boccassi@gmail.com
To: Dengdui Huang <huangdengdui@huawei.com>
Cc: Aman Singh <aman.deep.singh@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: patch 'app/testpmd: handle IEEE1588 init failure' has been queued to
 stable release 22.11.6
Date: Mon, 15 Jul 2024 16:26:35 +0100
Message-Id: <20240715152704.2229503-57-luca.boccassi@gmail.com>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com>
References: <20240624235907.885628-81-luca.boccassi@gmail.com>
 <20240715152704.2229503-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 <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/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/23e7802fa97b96123910544915d1ef8ef6b7135b

Thanks.

Luca Boccassi

---
>From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 30 Mar 2024 15:44:09 +0800
Subject: [PATCH] app/testpmd: handle IEEE1588 init failure

[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]

When the port's timestamping function failed to initialize
(for example, the device does not support PTP), the packets
received by the hardware do not contain the timestamp.
In this case, IEEE1588 packet forwarding should not start.
This patch fix it.

Plus, adding a failure message when failed to disable PTP.

Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
 app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 896d5ef26a..8d9ce4d6ce 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 static int
 port_ieee1588_fwd_begin(portid_t pi)
 {
-	rte_eth_timesync_enable(pi);
-	return 0;
+	int ret;
+
+	ret = rte_eth_timesync_enable(pi);
+	if (ret)
+		printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
+
+	return ret;
 }
 
 static void
 port_ieee1588_fwd_end(portid_t pi)
 {
-	rte_eth_timesync_disable(pi);
+	int ret;
+
+	ret = rte_eth_timesync_disable(pi);
+	if (ret)
+		printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
 }
 
 static void
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-15 16:19:37.479635703 +0100
+++ 0057-app-testpmd-handle-IEEE1588-init-failure.patch	2024-07-15 16:19:34.628207744 +0100
@@ -1 +1 @@
-From 80071a1c8ed669298434c56efe4ca0839f2a970e Mon Sep 17 00:00:00 2001
+From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3371771751..afea7735c7 100644
+index 896d5ef26a..8d9ce4d6ce 100644
@@ -27 +28 @@
-@@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
+@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)