Article View: linux.kernel.netdev
Article #23264Re: [PATCH net 4/5] ice: remove redundant cross-timestamp PTP command
From: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 23:00
Date: Thu, 26 Nov 2026 23:00
89 lines
11687 bytes
11687 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In ice_capture_crosststamp()
(drivers/net/ethernet/intel/ice/ice_ptp.c), the patch drops the…
--
ice: remove redundant cross-timestamp PTP command
This patch changes ice_capture_crosststamp(). It no longer programs
GLTSYN_CMD with READ_TIME before the ART/device cross-timestamp capture,
and no longer clears it with NOP afterwards. The commit message says the
hardware never needed the READ_TIME step, and that writing the shared
GLTSYN_CMD register only adds a potential race.
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
> index 8908b4f3db353..db1d0e42ae52c 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
> @@ -2183,9 +2183,6 @@ static int ice_capture_crosststamp(ktime_t *device,
> /* Snapshot system time for historic interpolation */
> ktime_get_snapshot_id(ctx->snapshot_clock_id, &ctx->snapshot);
>
> - /* Program cmd to master timer */
> - ice_ptp_src_cmd(hw, ICE_PTP_READ_TIME);
> -
[Severity: Medium]
The commit being fixed describes this step as a requirement seen on
hardware, not as an assumption. 88c360e49f51 ("ice: Support
cross-timestamping for E823 devices") says:
The GLTSYN_CMD register must be programmed with the READ_TIME
command. Otherwise, the cross timestamp will always report a value of
zero for the PTP hardware clock time.
This commit message only says:
It was assumed that this change was needed for E823 devices, which
turned out to be not true.
Is there a datasheet, erratum or firmware/NVM detail that explains why the
earlier observation was wrong? Was testing done across all E823 silicon
steppings and NVM versions?
If the requirement still holds on some E823 configuration, the capture
would still look successful, because ctl_active clears. The zero PHC time
would then be returned without any check:
ts_lo = rd32(hw, cfg->dev_time_l[tmr_idx]);
ts_hi = rd32(hw, cfg->dev_time_h[tmr_idx]);
ts = ((u64)ts_hi << 32) | ts_lo;
*device = ns_to_ktime(ts);
ice_ptp_getcrosststamp() selects this routine for ICE_MAC_GENERIC,
ICE_MAC_GENERIC_3K_E825 and ICE_MAC_E830, so every device that supports
cross-timestamping goes through this path. phc2sys uses
PTP_SYS_OFFSET_PRECISE by default when it is available. A PHC time of 0
would show up there as a very large offset and could make it step the
clock.
Separately, this patch carries a Fixes: tag and will probably go to
stable. Could the commit message describe the user-visible symptom of the
old code? Right now it only calls it "a potential race source".
The race looks real. ice_capture_crosststamp() holds only the
cross-timestamp semaphore (PFHH_SEM / E830_PFPTM_SEM). It does not hold
the PTP semaphore that ice_ptp_lock() takes in the settime, adjtime and
incval paths, which also program GLTSYN_CMD.
So the old READ_TIME/NOP writes could overwrite a prepared INIT_TIME,
ADJ_TIME or INIT_INCVAL command, and a clock adjustment would be lost
without any error. Could that be stated in the commit message for
backporters?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125224428.4126195-2-anthony.l.nguyen%40intel.com
Technical Details
Message-ID:
<179573400778.3135.2988543819162963844@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372381-linux-kernel-netdev=dewy.ruReferences:
<20261125224428.4126195-5-anthony.l.nguyen@intel.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372381-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 4/5] ice: remove redundant cross-timestamp PTP command Date: Thu, 26 Nov 2026 23:00:07 +0000 Organization: Usenet Network Message-ID: <179573400778.3135.2988543819162963844@kernel.org> References: <20261125224428.4126195-5-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="588908"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:i+mpNJYZ3Wo/EnNoEmSDzig9S3Q= sha256:AAkLrxnPXWzhWPaR/gHfZKyDI5YmHK+rOspyf4IcMbE= sha1:D6S2jXiX3eBroYLDX0oK8dtyhQc= sha256:kx9m94tLv4sK/JtQ+tZDlLOchdD83FmjHOBR9UiUa8Q= 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 886EC125F0A; Fri, 27 Nov 2026 02:00:29 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 EjbMcbx_Bwcw; Fri, 27 Nov 2026 02:00:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372381-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D421E125F0F; Fri, 27 Nov 2026 02:00:17 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 89A2B2C38E; Thu, 26 Nov 2026 23:00:10 +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=1795734010; b=ZbrD7YWY2wcMDldDavLEhBhRLqoJeq5CKe+Zx0ZoeVSC7DM9Ep8lSOwchsbfrxEDYlch zE+lKuoGy1+fcbg0YoPW3JDCzEjYyCoMU4BU1VodK3HSlxIQd8FZatZqj0K4FrKF3R6RF fVcE0szEcrbQmKXbLsOXBLTXvl2yJhyX0x77ZJgXSe16TmuCNv4PRukAYURRGL0p7mCtl MBmoMSbW1QLSvzqcYoBvB9zZ7ZUm3EXTiu/rEHtRmQUIBcv0Yqt+QeDUrz+ngY+xkFJof K0nHh29cAgaKYITdz8kFiXUIYD676P7JEzmELN5tvlNjs2C0ceA1e+qS4C5wrNr1qGQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795734010; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=nsTRjSTVyMy0HrGE0M7XcfK7MfniVZMdtJ/IkyyInRU=; b=dXlogf+mLxu/PlAkM0Aj6ehLWM34setHqQgd/3GiJ/4dG8FLlCexqmsGn08l7YB+iwPD 9uulHg28etg0D8nWbpG8YAR+mq/1nrYZP9o6wW9amdt5FtixipH6J9zu91vlbe2+GF1nn PPYvR61Ks1Ohn2M3Wavh4dkd6PI2DeD4hunjN0MK3CeLUZCUszZ4f0G83eyQHeQTATiry 3g7+6OBYzqIO+0bw25iBR0sqdJnCW8pMVELqPTbjRq6DLmgSIWQLrJJHb7EextWt6K0Fo 7lg8wpWaSeTFdVlOdPZGpSXOxPcYlFEZEszlOO8JJEEk2JLItM/WlMCBFkPl6EwamVw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IzBqj6dw; 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 625E4606A326; Thu, 26 Nov 2026 23:00:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IzBqj6dw X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795734009; b=1y2KTeOCiYI5tI/b9WXl3rOKN1MpV34he4mB5+tLz9LqTn+0rX9k8YPPl1XJFpJrL/t+ nlRbvqHJUlXWKvLoxh1E7tCAWV72uq2sCDANKDYlomhDWGjBLLT9dWzrorZvdXRmcPy2g hKvhJA1yAeBvaL4Zv8XAzpAbzY0o26694IMbnG4E4MEAyj1RoguAFVVJ2GDsNv+u3jxJ/ KEZHILA975hJEPSzh4btL3xPY9LOoStDF8BSl5sHkitdOvEBRZlGawizWzNleELpq9kVY PD0Ua09rBL35V0xD+FN3fNJ9TRUBpwFNZywuph+RYYG7Un0zks0tygxcxSwJ286U0+g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795734009; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=nsTRjSTVyMy0HrGE0M7XcfK7MfniVZMdtJ/IkyyInRU=; b=CkmtSNte1VvMRmiqDJLRrBKdnuCdXFtzFhz0USOM9CF5MTsxQAykNqpVwVixJBB11Xg4 LUvEtm8v4s+rPCsFhsBWKvcVrTrrrY6Ms6o8SQ2ZoSf/0IcFl3nnPpRknrFrygCXcl8FX octr7KN1DC6tNIkUNC7WiJPfIGsqCQWn1zEQVhk7nYh2mcDSTKcgZCxlVfR1v2IZ9CayY xB9RwkQ8Z18lXzyP0yZUsxIX9UGf5UfLTPjfxVbAVFZme3NmoAQW5cV7XtOVYlBzbpZeI 2bKjwk5asMQXRLDOLln/5cuBk+6w7TNtRQY0em4cq53MR4B2/wtYvr+vtT5pKGhyXsA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IzBqj6dw; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82630606A31C for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 23:00:09 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3055D1F00897; Thu, 26 Nov 2026 23:00:08 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795734009; bh=nsTRjSTVyMy0HrGE0M7XcfK7MfniVZMdtJ/IkyyInRU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=IzBqj6dwSZb0tC4sMrxygBEk9YmLxRj6gcEsVSI5OLXm1wrMmqNr0Y4qRCWwmDlHr fpZ2o+6zKNFYLM5gWB+/XXKC7VZ4Tu+P9beY2kQKlKk3mUSjE1f+tecJRsRXjVHRgF 5XZmK0du5ghx9bsut3w6cFhKrLg6CJ06rCdUjfeYSaZVL6y0v4CVEkzKpg1rUs5g6w RNQ3TK1Mb/9l7RuyLxI6Kj+OH2SHShz1bxiKvRJpvCQjGelIDrw1rYfo4YDsdu1SoH saQtzUyHXs3fP+AoeJ5fB1EKDLiTDe7BTfzBiOVWn0s+IzxLB2x6do3Rs69gWe93m5 QPa8+ElcCfbrw== X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, andrew+netdev@lunn.ch, willemb@google.com, netdev@vger.kernel.org, grzegorz.nitka@intel.com, przemyslaw.kitszel@intel.com, aaron.ma@canonical.com, maciej.machnikowski@intel.com, jacob.e.keller@intel.com, richardcochran@gmail.com, sergey.temerkhanov@intel.com, milena.olech@intel.com, horms@kernel.org, aleksandr.loktionov@intel.com, ayush1x.singh@intel.com X-In-Reply-To: <20261125224428.4126195-5-anthony.l.nguyen@intel.com> X-sashiko-severity: Medium 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