From: Jakub Kicinski <kuba@kernel.org>
To: James Clark <jjc@jclark.com>
Cc: "Théo Lebrun" <theo.lebrun@bootlin.com>,
netdev@vger.kernel.org,
"Richard Cochran" <richardcochran@gmail.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, "Nicolai Buchwitz" <nb@tipi-net.de>
Subject: Re: [PATCH net v2] net: macb: fix ordering around PTP timestamp read
Date: Mon, 14 Sep 2026 17:39:57 -0700 [thread overview]
Message-ID: <20260914173957.2840e0e3@kernel.org> (raw)
In-Reply-To: <20260910040658.18359-1-jjc@jclark.com>
On Thu, 10 Sep 2026 11:06:52 +0700 James Clark wrote:
> + /* ptp_read_system_prets() uses smp_rmb() internally,
> + * which does not guarantee ordering against MMIO reads.
> + */
IMHO the fact that the gem_readl() is a relaxed read is more relevant /
unusual in this case?
Also clashiko points out that this function may be called per packet
with sts as NULL so it's worth wrapping these barriers in if, I think
that's a good suggestion?
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260910040658.18359-1-jjc@jclark.com
> + rmb();
> first = gem_readl(bp, TN);
> + /* Ensure the PHC read completes before taking
> + * the post timestamp.
> + */
> + rmb();
--
pw-bot: cr
prev parent reply other threads:[~2026-09-15 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 4:06 [PATCH net v2] net: macb: fix ordering around PTP timestamp read James Clark
2026-09-10 7:13 ` Théo Lebrun
2026-09-15 0:39 ` Jakub Kicinski [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=20260914173957.2840e0e3@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jjc@jclark.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=theo.lebrun@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.