Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3590678pxp; Tue, 8 Mar 2022 18:15:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOURPiAmk5D7yKPIoVL/MpQpQ2iD/95f3DTOTX+SBe5NNYdK6oAgJ8Z5V86X20Hkn5tZkf X-Received: by 2002:a17:90a:20a:b0:1be:e850:1a37 with SMTP id c10-20020a17090a020a00b001bee8501a37mr7950746pjc.28.1646792121364; Tue, 08 Mar 2022 18:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646792121; cv=none; d=google.com; s=arc-20160816; b=AMQtJMdTI0elr/1oLC+fWRxJpBoYrsS+h4lD2djUm9egvUMUeBFLXU9naeDrJJEtZ+ Uv6SvpD0CsuO+KnXN34U3SlQFFjisZqGHg72Uw7ir2On6X70vCQVJHr/WUYd2ioAkipS 6uI4sqa5KwtbfID+uKqs5QIAzKTrcZXix6Fg0IEk21m/EMNeROAF++Txw+bVzfUOxRbL osRZfa4gAsIWM9+lizLajx2Q8HZrthpKKFVIz/6iAg0C9Mz9TCQf2eyRal1EdAEftidL wC4KNDVBSP6WZ9ZLEBDBaLVDxoDX4Z6hzHbDBqVAT/c0wb01JsNv0eZhozE7SYOdV1me clAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PXnF7xsg0OHmYSnSkaojnPw+kchBbwd7FnMF7nPOl9U=; b=szQuB8qrR9XgBoFUfvWD3eZq3UldDxJlB014t/zIdBAW6Kaaf/9Ce/m9AfhKYcGCvb 0/N8e5x8Ige6G1R9ID+9MSvWUPbTEtYFiIi25c1WRYUgVS2L877C2dWS6SeocBzv0EqO Pb926SnMBnUg6JeRmF/C6XBKTfPcodciBn0L1gMU7YYX8uRDPip95R0kjNBqR+kU8WfZ B53OSfcyZJ1O0wuB/X1uoQC/VZHqbHxVokPhiGxJczptJk4s9urM5BQbjKJxJrs17Ssw vcmpj6hFJ1Se+plGdXqIhU6B7NbrFdSAZCMoxPL6G6LPYLxgbrQu0cWhaPoBS7vkp/sR avig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hxwj8ZfH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h7-20020a056a00170700b004f1282aea39si552244pfc.372.2022.03.08.18.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:15:21 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hxwj8ZfH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 31689D95FF; Tue, 8 Mar 2022 17:07:43 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbiCIBHY (ORCPT + 99 others); Tue, 8 Mar 2022 20:07:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbiCIBHP (ORCPT ); Tue, 8 Mar 2022 20:07:15 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D06F5D2240; Tue, 8 Mar 2022 16:47:07 -0800 (PST) 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=PXnF7xsg0OHmYSnSkaojnPw+kchBbwd7FnMF7nPOl9U=; b=hxwj8ZfHgideD0FeK4cxhmnIKt CcfdqsPVOJh+YEuqUrIx25ppVNhTORh3V3ZxpkhD0b6V83+Op77NqDLRHo+35Cr6swl0+/doQY6Y3 ukV059i3641PXzTfxJpy0ycHHiNelFPQ+5lw5kL+fwxYK6pYAa464nFXn1qjsLoNxB1I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nRjNu-009sFO-3G; Wed, 09 Mar 2022 00:36:54 +0100 Date: Wed, 9 Mar 2022 00:36:54 +0100 From: Andrew Lunn To: Horatiu Vultur Cc: Divya.Koppera@microchip.com, netdev@vger.kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, richardcochran@gmail.com, linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, Madhuri.Sripada@microchip.com, Manohar.Puri@microchip.com Subject: Re: [PATCH net-next 2/3] dt-bindings: net: micrel: Configure latency values and timestamping check for LAN8814 phy Message-ID: References: <20220304093418.31645-1-Divya.Koppera@microchip.com> <20220304093418.31645-3-Divya.Koppera@microchip.com> <20220308154345.l4mk2oab4u5ydn5r@soft-dev3-1.localhost> <20220308221404.bwhujvsdp253t4g3@soft-dev3-1.localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220308221404.bwhujvsdp253t4g3@soft-dev3-1.localhost> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 08, 2022 at 11:14:04PM +0100, Horatiu Vultur wrote: > The 03/08/2022 19:10, Andrew Lunn wrote: > > > > > > So this is a function of the track length between the MAC and the PHY? > > > > > > Nope. > > > This latency represents the time it takes for the frame to travel from RJ45 > > > module to the timestamping unit inside the PHY. To be more precisely, > > > the timestamping unit will do the timestamp when it detects the end of > > > the start of the frame. So it represents the time from when the frame > > > reaches the RJ45 to when the end of start of the frame reaches the > > > timestamping unit inside the PHY. > > > > I must be missing something here. How do you measure the latency > > difference for a 1 meter cable vs a 100m cable? > > In the same way because the end result will be the same. The latency from the RJ45 to the PHY will be the same. But the latency from the link peer PHY to the local PHY will be much more, 500ns. In order for this RJ45 to PHY delay to be meaningful, don't you also need to know the length of the cable? Is there a configuration knob somewhere for the cable length? I'm assuming the ptp protocol does not try to measure the cable delay, since if it did, there would be no need to know the RJ45-PHY delay, it would be part of that. > > Isn't this error all just in the noise? > > I am not sure I follow this question. At minimum, you expect to have a 1m cable. The RJ45-PHY track length is maybe 2cm? So 2% of the overall length. So you are trying to correct the error this 2% causes. If you have a 100m cable, 0.02% is RJ45-PHY part that you are trying to correct the error on. These numbers seem so small, it seems pointless. It only seems to make sense if you know the length of the cable, and to an accuracy of a few cm. Andrew