Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp307828rdb; Sat, 17 Feb 2024 09:07:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUE3uJTVHFEl4u5n8A3k/AJ0LH/HMp316IYd3gxtCI312rls3SeUNnAQQgYKyko2F6aVBVHUI9wf7VP5fTAR/CEBlj/aQyaKwBBIee9w== X-Google-Smtp-Source: AGHT+IH0R119t+0kotri9rui+hUScPSpVNiOP7Z0LfFPgw3nyOC4yKf2hqY8WjEgIHVh5zh6nFYa X-Received: by 2002:a05:622a:388:b0:42c:8054:8a with SMTP id j8-20020a05622a038800b0042c8054008amr12841584qtx.27.1708189672005; Sat, 17 Feb 2024 09:07:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708189671; cv=pass; d=google.com; s=arc-20160816; b=03RdqSxiT2NWXp6cNMQUp4HXXB9ypctl3G0u+hjpE2uy24CJuo3WPFD1nuGU7Ga9PL HatAm37Pim8/aj9oBT00k/V0l2IbZ8070GnnsGQAGhXLck9kt6EPAgYNowKwi7PNSpQt 7w2UTYYztnWUFNE3z5niBylrRKNqneK1k/Z0hLixmd4E8TkUMdBus4mLQpkhHxa41q6e fJHjOtuSgYbqddfdNT0lVyqakSg6PbSz/hXqiMBRXTY+8mWAgn0v2K5MYz8zboWJ4UNu vZX7JJtiJMT3bVsbbfp56zQWRMTk76M4w6l303qWle2Og3e5Ad2WTbGfOxzDntsUPlGl +B0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GRWtM/ktgdCwvK0hR9nKaqw64qBDSz1jmEq5mVbyKEI=; fh=WRjJBipeRZp4WND6tCu7eFnh3ZWobecBqThuU7I/Pj8=; b=kePF4eLsEtoSYAVrhrEsyVfa/GQWkKHAQpk+JEvUc/HFg2A6vAT0EOOKWyIosB6W09 nyIL43NMvBSfKtkD8c2wu6umdW6RJPUEJn+sX20bB7OElCSkTrQ4XJs9N892wROHaJTE U3Z3IVHS0G0FD3s4K+msUk9K7P8PNpCMnmIIlK2am8R4wh77Jn3yT0V7iZWULYmqU0tu T2Fqa3xuTbFEnKNseAG2UoFzLcSjkmf9+0rcP/5WaVmH+mFLrrWJtbRhKaTf0/ptGwX/ QLW9qlSBI1UaqrjYBuFxolzNWqudjm3sVwEyRVD5++qifN78Kzw4WOIojcnm80jcGKVI vG0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=r8rhlLNO; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-69983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i17-20020ac860d1000000b0042db333b677si2215570qtm.707.2024.02.17.09.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 09:07:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=r8rhlLNO; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-69983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B369E1C215FA for ; Sat, 17 Feb 2024 17:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C6547D419; Sat, 17 Feb 2024 17:07:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="r8rhlLNO" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 DC6971E515; Sat, 17 Feb 2024 17:07:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708189661; cv=none; b=T7mdOhMfVboUTiwGUSz+zUin/QerKLcsY3/zeFnmSKjJMEC3dtakad5lbbBzYQtiRr5a08q9rHaljzrzHWxSiOblqegvtvEGUZuiOkMkm7UD7rQfYmYqN5+ye1Pn0IyiKFYliAvX5upXOyRN+19PW6NeNZoowh0Q1b8p6ztR0fY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708189661; c=relaxed/simple; bh=P7I4J4DdTmbjWZu4aPEcn7nHHUmnnyqGemw9zvzq0QE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cGw2ln+/1GEi8rqyFLzFOLRfECl2uy0rrH+XInavUXxqSDfIJ8DuAJLZDS+uAE+YLHNscmqb8iICrtgTBW1pGnK9JiyuwLz3/PWcIe4pXTrXZxyz7DaxRY4BaPKElBHu2LSNexFAmXW6RHhYLIiDNrJzC7g0tE1RJyX+uI2jZDM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=r8rhlLNO; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=GRWtM/ktgdCwvK0hR9nKaqw64qBDSz1jmEq5mVbyKEI=; b=r8rhlLNO/6AsRMW9Zz9sSPI1in X85y7Wf6RkjfunwAJY5tc8qcYWnXOm36cfDJOK73KUO8Ke/FKjLRhKm5+yJePUl0hi0wN+fMH30Y7 a0G/rEr7JEyNyx1aUeIrYTgC5bG5UOpx80RLwapFYOKc1X6p0WBitYkafxeD2Kc0Ha54=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rbO9z-0084Zo-Cv; Sat, 17 Feb 2024 18:07:31 +0100 Date: Sat, 17 Feb 2024 18:07:31 +0100 From: Andrew Lunn To: Rahul Rameshbabu Cc: Kory Maincent , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH RFC net-next v8 04/13] net: Change the API of PHY default timestamp to MAC Message-ID: References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> <20240216-feature_ptp_netnext-v8-4-510f42f444fb@bootlin.com> <87jzn4gtlv.fsf@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87jzn4gtlv.fsf@nvidia.com> On Fri, Feb 16, 2024 at 10:09:36AM -0800, Rahul Rameshbabu wrote: > > On Fri, 16 Feb, 2024 16:52:22 +0100 Kory Maincent wrote: > > Change the API to select MAC default time stamping instead of the PHY. > > Indeed the PHY is closer to the wire therefore theoretically it has less > > delay than the MAC timestamping but the reality is different. Due to lower > > time stamping clock frequency, latency in the MDIO bus and no PHC hardware > > synchronization between different PHY, the PHY PTP is often less precise > > than the MAC. The exception is for PHY designed specially for PTP case but > > these devices are not very widespread. For not breaking the compatibility > > default_timestamp flag has been introduced in phy_device that is set by > > the phy driver to know we are using the old API behavior. > > > > Signed-off-by: Kory Maincent > > --- > > Overall, I agree with the motivation and reasoning behind the patch. It > takes dedicated effort to build a good phy timestamping mechanism, so > this approach is good. I do have a question though. In this patch if we > set the phy as the default timestamp mechanism, does that mean for even > non-PTP applications, the phy will be used for timestamping when > hardware timestamping is enabled? If so, I think this might need some > thought because there are timing applications in general when a > timestamp closest to the MAC layer would be best. Could you give some examples? It seems odd to me, the application wants a less accurate timestamp? Is it more about overheads? A MAC timestamp might be less costly than a PHY timestamp? Or is the application not actually doing PTP, it does not care about the time of the packet on the wire, but it is more about media access control? Maybe the applications you are talking about are misusing the PTP API for something its not intended? Andrew