🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10696

Re: [PATCH net] net: ethernet: ti: am65-cpsw-nuss: Enable timestamping of unicast PTP packets

#10696
From: Sebastian Andrzej Siewior
Date: Tue, 03 Nov 2026 23:17
46 lines
11741 bytes
On 2026-11-02 20:51:17 [+0700], James Clark wrote:
> On a BeagleY-AI (J722S), ptp4l as a unicast master (unicast_listen) logs
> "received DELAY_REQ without timestamp" for each unicast Delay_Req, and
> its port goes to FAULTY after "timed out while polling for tx timestamp"
> for the first unicast Sync.
> 
> am65_cpsw_nuss_hwtstamp_set() does not set the TS_UNI_EN bit (bit 24) of
> the port's TS_CTL_LTYPE2 register. According to the TRM (J722S TRM
> SPRUJB3D, 12.2.1.4.7.13.5.1 Ethernet Port Receive Event and
> 12.2.1.4.7.13.5.2 Ethernet Port Transmit Event), this bit must be set
> for the port to timestamp PTP event messages over UDP sent to a unicast
> address; without it, only messages sent to the PTP multicast addresses
> selected by the TS_107 and TS_129 to TS_132 bits are timestamped. TI's
> netcp_ethss driver for the Keystone 2 Ethernet switch, which has the
> same timestamping registers, always sets TS_UNI_EN.
> 
> Set TS_UNI_EN along with the other bits. With this change, ptp4l in the
> same setup gets timestamps for the unicast Delay_Req and Sync messages.
> 
> Fixes: b1f66a5bee07 ("net: ethernet: ti: am65-cpsw-nuss: enable packet timestamping support")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Clark <jjc@jclark.com>
> ---
> This was discovered while using ntpperf -D/-N to evaluate PTP hardware
> timestamping performance. The patch was generated by an LLM coding
> assistant.

I have here a AM642 EVM and eth0 here uses am65-cpsw-nuss. I didn't
manage to get ntpperf up but 
	ptp4l -i eth0 configs/UNICAST-{MASTER|SLAVE}.cfg

uses UDPv4 and should do what you describe. But then I noticed that it
uses 224.0.1.129 as destination which is enabled by TS_129 and does not
look like a unicast address. Buh.
netcp_ethss sets TS_UNI_EN but it does not set the other TS_ bits. The
reference manual in Annex D (for am64x) describes how matching works but
it does not say if TS_UNI_EN should be enabled in addition to the other
TS_ bits, which match a specific address, or not. It just says it
matches either this with the specific bit set or anything with the UNI
bit.

It continues to work for MC with this bit set so
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Sebastian
Technical Details
Message-ID: <20261103231750.R8W01B3E@linutronix.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356056-linux-kernel-netdev=dewy.ru
References: <20261102135117.419539-1-jjc@jclark.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356056-linux-kernel-netdev=dewy.ru
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: ethernet: ti: am65-cpsw-nuss: Enable
 timestamping of unicast PTP packets
Date: Wed, 4 Nov 2026 00:17:50 +0100
Organization: Usenet Network
Message-ID: <20261103231750.R8W01B3E@linutronix.de>
References: <20261102135117.419539-1-jjc@jclark.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="3284242"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:VGNpDtyb4wX1WytIohHr0ljUSyA= sha256:PKlkLun+Cda4KNRdrhz+VENmQ7n5X+/lCkoGAsb71jQ=
	sha1:EykT26TgiQbc82HiiyFHYbgw2PY= sha256:Ebox9gX2uFFydQ3RxnxvRP9D9NQlK6rfcGUdFklLmz4=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 26F0F112A71; Wed,  4 Nov 2026 02:18:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=linutronix.de header.b=zXsf7Yoc; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=PMv1RD75
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id EYry0ueaLPM2;
	Wed,  4 Nov 2026 02:18:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-356056-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 1F908112A57; Wed,  4 Nov 2026 02:18:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 4A8916067B4; Tue,  3 Nov 2026 23:18:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793747879;
	b=x79NknkDZPcS/M5fQ7ILhpEaOSUdVVS7KjZhqndHdA0zFAn3fWyrt4dtY3by5YKlUcmK
	 F1ojXH983E0KZlsWJcmO9GjRANqoX3AWFKvmmgCFxRCmEnvzAPaHY9OjbQHRq/cBIff09
	 Xaf+QpmzZoCyWD3GqNVmKrtxbbXBmjYLkqxRF5yCSW4nopK0S0x7lBJdatfMXXYTq7K86
	 RM7tFBZN3QxybRXkfHjHxiSEjGFYShhVncO67rI3aCnM9UxLRRYBG0nbyB3yrWQCGPQ7S
	 R6DhbzjFAVA0svl3r+iBN0KleY3bN9qlwqfKm5qRUEBLg9nnRY239o3Pchq6929TyJg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793747879;
	h=X-Original-To:Received:DMARC-Filter:Date:DKIM-Signature:
	 DKIM-Signature:From:To:Cc:Subject:Message-ID:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To;
	bh=WqNNSoFVGkzMo6pK4A+r0nyZRgEKN7rRbtYYlknDqFI=;
	b=IETKdmEYfVo6stwYIXpip6RVWra7BeSAJA1KMbh0zKGmWfK7Cs6qCaTOHMLYk9yVEubd
	 nsegi+84+Otdwellip5CtxjQc9W/b7IOis79Qm73brGGpWjn18O6iKzN6A3BWwAhUSGXl
	 joaqKDaul8GV558eBvoVpkmJPKdWM9PMLbY1zO4Oc1yx86++neer6P+W08JC3PpnIPM0K
	 O83tHvKeyDmjdL3dzwsUglq65q31vmL+NuKlmOiYY+EfbmcwFgRmYofKp443ISIv8o967
	 FDaIunZ7pqfWyZFDRO6GQgiotcll+Hlm8wun2gH55ViwE0QknyGovPy8QWF4KMtOvZw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=zXsf7Yoc;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=PMv1RD75;
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 96384606A32E;
	Tue,  3 Nov 2026 23:17:59 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=zXsf7Yoc;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=PMv1RD75
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793747876;
	b=oVvrxRPmyi9j6xsNqQVr0JSod/YDvRcyn/ojEYanZp02SZisl1YhdSAN84GfiedpS4nc
	 v8Kg10UbxnWSGTce2hHS8AdqffmBU0lhC/GUL3lC234JgohCoZnQMwzBFGdtgjoWaRPRK
	 smt+/VRhzn3BK3NUFkU3iJ4BVn5S3URuQg7x+qSnM/IRUVZCL4YbiUEvtq3wQYDJxmTjd
	 NQAHYT0oEIfWVXcZTksud0PgA4DJ+e9XR8F/zOzPBr0LvLxDcWuaRBUVBKjAG5mvu82As
	 xi7+6NQNExKys8TM8YeWLpr9LnbWls8nY4vCbRv8bS151uMYrc19dMNLBKJ+UxanDwA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793747876;
	h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=WqNNSoFVGkzMo6pK4A+r0nyZRgEKN7rRbtYYlknDqFI=;
	b=oU6kLIdHlhKJzQSkqgdwgfGWPXt70E8h2xisv7IH+ZipT+4h+BifutVdsq8dkvi2kFBc
	 7KjB8spQGN3yFkznC+dIKW1R5wzck/d+OfpYJnTUBjsTbsPoerAtK99GMa/2Fq3H0kwNb
	 c8XH8j1sMNJGNI2PrESjSS6QTeBDn/DEtin8RFcYPlXY1WTEg38MltXz5MyLhqKwiWDbY
	 qrNIPlarUAjp7hMN0L2YyChdiCBiENLVPtn0aam57iQ0kY69UCW6Dptku+BM/C5fljuoM
	 oMziCBeuHRFfKmQ4Bip0+RYw75GJF3M+1fHnaV2GPBorURzcR5Y5n9GMxrR1ssGwEXg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=zXsf7Yoc;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=PMv1RD75;
	arc=none smtp.remote-ip=193.142.43.55
X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64315606A324;
	Tue,  3 Nov 2026 23:17:55 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 64315606A324
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020; t=1793747871;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=WqNNSoFVGkzMo6pK4A+r0nyZRgEKN7rRbtYYlknDqFI=;
	b=zXsf7YocqOwQekIPxLBpeH4vlcgq4v/Z0L8nj8+Z4O3hML1phARFLTDqy8KX0fKXf0o/Vp
	EcnJoU5NMrwFaQREMur1rx2HgmPSEv8ebDUzs7oSs+1oH7kN/0IzjvVcqg1CpLENoHhgZ0
	U7OVwspuKkkDEA5MNIl6ZwivoBOwKCs24uEIpNUAPr+GJL3GDARfu/nmwi0v7NEhSZZzdw
	oADhD2a+tzD6aNVDxdYBc5H8/81XShJ7LCeiaMBByF6FPyblOZ//gI/gcBxekp7Uf+Tt/j
	TqKdWJEfpxX8j/meODcOPmm0F4jjCGinQa0Tf0dVHlxR+n3AGO8/UzPV+hb1Vw==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1793747871;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=WqNNSoFVGkzMo6pK4A+r0nyZRgEKN7rRbtYYlknDqFI=;
	b=PMv1RD75fNiAj3wq/WumgKR4Go0gQrlRBHhZfd24HZcaEcOy/e7eC+sMLmjcrH7j32aGcV
	sM7LyPf0/T+aDjAg==
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Chintan Vankar <c-vankar@ti.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	Simon Horman <horms@kernel.org>,
	Daniel Zahka <daniel.zahka@gmail.com>,
	Alexander Vassilevski <oss@vassilevski.com>,
	Nora Schiffer <nora.schiffer@ew.tq-group.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Robert Nelson <robertcnelson@gmail.com>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261102135117.419539-1-jjc@jclark.com>