Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp331394lqo; Wed, 8 May 2024 00:35:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBFzNcsybNgDumcFqw46YkoU9fgnPIa8NmxIi5GPRWjFW+wD+ciUOz14j5A3xtYQCnjAmsEwpQsk2JOuCzqSRIP9+BTXrhH3qF8ZwDHA== X-Google-Smtp-Source: AGHT+IHxH7xRb0x8dFcz5kzAHT8S/VwX+ae5+uZrAGD5VYPQZtSyQ35UzwECKH+BG2+7sKjAJbX/ X-Received: by 2002:a05:6358:341b:b0:18d:8ef1:e77c with SMTP id e5c5f4694b2df-192d30549c7mr238287455d.15.1715153759386; Wed, 08 May 2024 00:35:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715153759; cv=pass; d=google.com; s=arc-20160816; b=S/+bHA03JTAG1+5CGQR610q/tbD86gBdRwfdaLoEWzURTTvSh++RGnu0m73Cr1pcLP l4C6nnG+3MbpF9+W9wr1jwPQrssG02f6w5jpWt2tWVLUvuwR48R5JOpBwpziMP3BzFXG ILDqxIp7GXsMSe7tHK5HQhZFmGHOGdmZhyBvi3ahtAbpr5jRgv1SeU2lnGFOQCb+ZtWE TOlNA+PlPKZ2bG41AUaucUGY/w2FxlDbPGQc0hSXs3mU5PHqb2tBA/dXhw6dErQrnw0j 8mqEzthkMDdiiPkFNH7t0m70wpxqflTqolROT+XWdGADeH+VhwSDGKdnGeVGRAniv/J3 HWzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=KkZ21tBIn9t/kCg46TL0pTvrvKEB3JvG5pj/gvK9EIk=; fh=FEf1gLQgi7kJKwqcDJKp0QdRifN96uiSQN8wwKlO7vo=; b=gefJHe/WIoJcqgJOPgezqiMvbM/OeP+GfDMHXfG5ax4QHWjURO0FpXFMjlgeSyOJhZ E/t1LnblfxtWIyiIJHkTyP8+HY3IWp9bm+JL89ZTdZKtqWfxyCHO4K8sG+8YC/Usb3mc rkbaqlOxOILrr9jVDHeiWSShnlezKG0PC7EDaNo8D07EBscw4XU42qr/1mAPY3JogRsp LU+DW5QSBVLUBhhK1cQkG5lX32RJE0zOmFnGpbma3eemtBAyb/emJzZRTZuIv3twcvsm YilsJ6YHwJD5U3BMtrvCVnphsB9d0W2rpBGJ9EmXLtb2KL5FjATwSt1FScKo4e/VcUhu 3r5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="svp+IF/T"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-172816-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y192-20020a638ac9000000b0061dc5b4c44fsi7418533pgd.264.2024.05.08.00.35.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 00:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172816-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="svp+IF/T"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-172816-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 05527284866 for ; Wed, 8 May 2024 07:35:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0FDD2C69C; Wed, 8 May 2024 07:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="svp+IF/T"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8bcXkBMf" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C29A02838E; Wed, 8 May 2024 07:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153750; cv=none; b=H60pd4fEQAyuTmbqkJ7622cd0uumLlwVNW4/46XFu9F0x4JiNrKnGLqDoGOrl/pkzztjd1TAYvgADh+a8xZmzq4wNgx4IMPz/vgtRZv20A8EVK1kgoBoEBP8D3RtmEdEZpmV5uJElu5yMyyGGgurK0qYaZ/eNhmLTpdCaOTY1aM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715153750; c=relaxed/simple; bh=+5g5QpxJMtaJvT70uE1ceROVuu2JiRFjGyRfAc6zepw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=OdJBDOKlgeC0b9bZnn0VevCaR7gCtmtGTAtZX8NLxEbZLJzwLy6Cd+9Y4WAKE10NpuEmMAdJWGfu9GQwJOCC+qYao8JGncoWBedVFkFOKqG3IvV9Fndwl/GbuatyOlp+uFJHT+LsAEtSf1FcfI+L9UXbgE0jEYNMW+JrtuRnPa4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=svp+IF/T; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8bcXkBMf; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715153747; 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=KkZ21tBIn9t/kCg46TL0pTvrvKEB3JvG5pj/gvK9EIk=; b=svp+IF/TwErw6+p1C+x2zDMpO/0e+2PsvJZvRHYdiAfS/YlxoDliB3q4aISOIGvfSL7aCP bKvT+r3aIo1ycTG9bRJnjFDfVlyl5x3Jzx8gp4bZ0flm3Db8eZqWHgYEnEaivqgBR9WoSt 5UfGt8zQmwzmmbbE6ZuL7DRv2wajz3rCfzJV/oZsYY5ul7ml4oIjLVrBg5XGGKvQKSvdFp T0bhHybkwqgPY3nyNLYEfFU2DepPkFz0UIfd9Cnqau7Oo9d/quBb5x+LzIQvqCL+abrK47 aVIfq6hPz0KPzFmWXop+RvNrzmLlZRR3gmpUJdRyV8yD03Zz05Y/VuVXfC+2GA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715153747; 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=KkZ21tBIn9t/kCg46TL0pTvrvKEB3JvG5pj/gvK9EIk=; b=8bcXkBMfK+OTmNCjndKlO3bV8kvHgUdCx3idGurjnVB54zcNtfbCBIu7hWyjAi48Zjp3R2 3iD73MK47/4kafBg== To: Mahesh Bandewar , Netdev , Linux , David Miller , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Richard Cochran , Arnd Bergmann , Sagi Maimon Cc: Jonathan Corbet , John Stultz , Mahesh Bandewar , Mahesh Bandewar Subject: Re: [PATCHv4 net-next] ptp/ioctl: support MONOTONIC_RAW timestamps for PTP_SYS_OFFSET_EXTENDED In-Reply-To: <20240502211047.2240237-1-maheshb@google.com> References: <20240502211047.2240237-1-maheshb@google.com> Date: Wed, 08 May 2024 09:35:46 +0200 Message-ID: <87fruspxgt.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, May 02 2024 at 14:10, Mahesh Bandewar wrote: > The ability to read the PHC (Physical Hardware Clock) alongside > multiple system clocks is currently dependent on the specific > hardware architecture. This limitation restricts the use of > PTP_SYS_OFFSET_PRECISE to certain hardware configurations. > > The generic soultion which would work across all architectures > is to read the PHC along with the latency to perform PHC-read as > offered by PTP_SYS_OFFSET_EXTENDED which provides pre and post > timestamps. However, these timestamps are currently limited > to the CLOCK_REALTIME timebase. Since CLOCK_REALTIME is affected > by NTP (or similar time synchronization services), it can > experience significant jumps forward or backward. This hinders > the precise latency measurements that PTP_SYS_OFFSET_EXTENDED > is designed to provide. This is really a handwavy argument. Fact is that the time jumps of CLOCK_REALTIME caused by NTP (etc) are rare and significant enough to be easily filtered out. That's why this interface allows you to retrieve more than one sample. Can you please explain which problem you are actually trying to solve? It can't be PTP system time synchronization as that obviously requires CLOCK_REALTIME. Thanks, tglx