From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205262; b=ddOG02I3oJG6+2rzo3WNHJFwgdqoxm3gAmVLmpRSaoLsVopeGqeG4YZnPjz5A9/o2IFO crWH6bfPz9csv/WGF1gtngZqZq4ARNHp2la5V0w1oPNrKISWQFM8yWkuJoTh9M/O8djJU wfs1RQ2AIPF7fv0cDgs+l59Oc3w98N5OaG5dv0cMlSzIjQA+mL4Gj52H+74QgxmXh7ZO+ bzJxLQWU8Mh6jW/Cua//Z2ipbJY8iZhT7Z7LbXIbQ+HfBxy8pTY46B9H3uc7+hIVV+unE 2tfBer2NDyMoFC7UE8etHuwRcFrhtEr08tPv3l3mPJDusuQqcOapZ2vTMOkDHK2JaOA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796205262; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=JHuLsJmdW2eiE/dPQk6rVIVlo6gIUiiRISo1PN9RDoc=; b=HQFZ4HZsC8qDex2CMtiBykv6OsklGQ8rgcYgETV3M4AGFC8tpJBsV9xXDDfdeegJsXaD CJobdBL3OhFLDmItZeqsfAejvFBzJeJzoJtFUQPC2SjnQbd5rybiCCyjLD16ZjHXcteH4 5Kg9cEBd3qZ8jmeZRaJj6glZ8kDsuSkm/0RDa/fKTdiGOc3+jNa6Or9i0VBHjGKhPA8Va hzY0f/N/bC6OHbJH0VjPTgoo80wklQM/IsbSDpDRUwa+avqRelFQc7l1n/mTKVWNoVZmv +boQGZ1yINET2Tk6PWQIn21ElN2Zcx46x5N0b2F4Z/ImwCHXfS3clJWZPyyWcP3LALg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=dHmXkWVF; arc=none smtp.remote-ip=194.13.80.246 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 C1FD3606A32F for ; Wed, 2 Dec 2026 09:54:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C1FD3606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=dHmXkWVF Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C338DA0044; Wed, 02 Dec 2026 10:54:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1796205259; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JHuLsJmdW2eiE/dPQk6rVIVlo6gIUiiRISo1PN9RDoc=; b=dHmXkWVFB3labdt/L18sHX9qf7AyZIQCTUTO9/xT8F9fiJqc4VbtgOKRkN/i4IHuu7dQqG 7CZ4IDz7SvIfd+h5i1OpLwnZujmDzoxvZWUk42txPH5rvB8hvoJXaPT7AA4uxqjNdCIOie /SmNgkRmELAdpbBmxG74lpkKODaT3DGFhNgapnhYjBdpNq+McpSd733Ru04aqBBw03hRT8 deee88ZLtTKnBBKQEYVWGyar4c1TIiSBHWl3hy3C+xw/pEisWLVBtb1jDOD0uU2JucQu++ Tvc3fTz9eAO7k0ebMLKkFrgFcVP4H2Eeay0+mDVUSlWhjipoAfEYwF5irHg4wg== X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Date: Wed, 02 Dec 2026 10:54:18 +0100 From: Nicolai Buchwitz To: James Clark Cc: Florian Fainelli , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Russell King , Broadcom internal kernel review list , Jonathan Lemon , netdev@vger.kernel.org Subject: Re: [PATCH net 2/2] net: phy: broadcom: fix one-step P2P timestamping In-Reply-To: <729e09f62c40ac871cd6aba1a66f78db4706c61b.1795772837.git.jjc@jclark.com> References: <729e09f62c40ac871cd6aba1a66f78db4706c61b.1795772837.git.jjc@jclark.com> Message-ID: <5e3709e3f7a003fc53d556725cfb0961@tipi-net.de> X-Sender: nb@tipi-net.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 On 27.11.2026 10:50, James Clark wrote: > On a Raspberry Pi CM4 and CM5, with one-step P2P, the BCM54210PE PHY > sends an incorrect Pdelay_Resp: its correctionField does not include > the time between receiving the Pdelay_Req and sending the Pdelay_Resp. > This is because the driver sets up the PHY as for two-step. The peer > then measures a path delay that is tens of microseconds too large. > > With one-step P2P, use mode 1 for Pdelay_Req on receive and for > Pdelay_Resp on transmit; in this mode the PHY adds the time between the > two to the correctionField. Also skip the normal processing of an RX > timestamp for a Pdelay_Req, since in this mode the PHY does not insert > one. Reject one-step P2P when the filter is HWTSTAMP_FILTER_NONE, since > that filter turns off the PHY's processing of received messages, which > would make the correctionField of Pdelay_Resp be incorrect. > > With this patch, on the CM4, the path delay measured with one-step P2P > is the same as with E2E, over L2 and UDPv4. The PHY keeps the UDP > checksum of Pdelay_Resp valid over UDPv4 and UDPv6, still captures the > TX timestamp of Pdelay_Resp, and handles a Pdelay_Req and Pdelay_Resp > on > either side of a second boundary. > > Fixes: 39db6be781cd ("net: phy: broadcom: Add PTP support for some > Broadcom PHYs.") > Cc: stable@vger.kernel.org > Signed-off-by: James Clark > [...] Tested-by: Nicolai Buchwitz # CM4, CM5 Reviewed-by: Nicolai Buchwitz Thanks, Nicolai