From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: James Clark <jjc@jclark.com>
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
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 [thread overview]
Message-ID: <20261103231750.R8W01B3E@linutronix.de> (raw)
In-Reply-To: <20261102135117.419539-1-jjc@jclark.com>
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
prev parent reply other threads:[~2026-11-03 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 13:51 James Clark
2026-11-03 23:17 ` Sebastian Andrzej Siewior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103231750.R8W01B3E@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=c-vankar@ti.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=horms@kernel.org \
--cc=jjc@jclark.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nora.schiffer@ew.tq-group.com \
--cc=oss@vassilevski.com \
--cc=pabeni@redhat.com \
--cc=robertcnelson@gmail.com \
--cc=s-vadapalli@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®