From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA560C5517A for ; Thu, 22 Oct 2020 11:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53F92223FB for ; Thu, 22 Oct 2020 11:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2897074AbgJVLNA (ORCPT ); Thu, 22 Oct 2020 07:13:00 -0400 Received: from mailout04.rmx.de ([94.199.90.94]:34163 "EHLO mailout04.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2897062AbgJVLNA (ORCPT ); Thu, 22 Oct 2020 07:13:00 -0400 Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout04.rmx.de (Postfix) with ESMTPS id 4CH4Tg5b6Qz3r1qD; Thu, 22 Oct 2020 13:12:55 +0200 (CEST) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin01.retarus.com (Postfix) with ESMTPS id 4CH4TR0tBFz2xqR; Thu, 22 Oct 2020 13:12:43 +0200 (CEST) Received: from n95hx1g2.localnet (192.168.54.94) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 22 Oct 2020 13:11:41 +0200 From: Christian Eggers To: Vladimir Oltean CC: Richard Cochran , Florian Fainelli , Andrew Lunn , Vivien Didelot , Jakub Kicinski , Rob Herring , Helmut Grohne , Paul Barker , Codrin Ciubotariu , George McCollister , Marek Vasut , Tristram Ha , "David S . Miller" , Woojung Huh , "Microchip Linux Driver Support" , , , Subject: Re: [RFC PATCH net-next 7/9] net: dsa: microchip: ksz9477: add hardware time stamping support Date: Thu, 22 Oct 2020 13:11:40 +0200 Message-ID: <2541271.Km786uMvHt@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <20201022105014.gflswfpie4qvbw3h@skbuf> References: <20201019172435.4416-1-ceggers@arri.de> <20201022090126.h64hfnlajqelveku@skbuf> <20201022105014.gflswfpie4qvbw3h@skbuf> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.94] X-RMX-ID: 20201022-131243-4CH4TR0tBFz2xqR-0@kdin01 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Vladimir, On Thursday, 22 October 2020, 12:50:14 CEST, Vladimir Oltean wrote: > If the hardware supports p2p one-step, it subtracts the ingress time > stamp value from the Pdelay_Request correction field. The user space > software stack then simply copies the correction field into the > Pdelay_Response, and on transmission the hardware adds the egress time > stamp into the correction field. > > So we were correct about the behavior, just not about the target > hardware. > > So, that's just not how this hardware works. What do you recommend? > Keeping a FIFO of Pdelay_Req RX timestamps, and matching them to > Pdelay_Resp messages on TX, all of that contained within tag_ksz.c? after applying the RX timestamp correctly to the correction field (shifting the nanoseconds by 16), it seems that "moving" the timestamp back to the tail tag on TX is not required anymore. Keeping the RX timestamp simply in the correction field (negative value), works fine now. So this halves the effort in the tag_ksz driver. Best regards Christian