Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13303944rwl; Wed, 4 Jan 2023 06:26:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXvW72vqgpxUcK/NVVaLpkeraewlB/3mFgGuLMepuxkNvdvYEWj14bSv+AARQ8SiyALWrYU4 X-Received: by 2002:a05:6402:4518:b0:46c:b2a7:1e03 with SMTP id ez24-20020a056402451800b0046cb2a71e03mr36808740edb.36.1672842368322; Wed, 04 Jan 2023 06:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672842368; cv=none; d=google.com; s=arc-20160816; b=JUYKhWiu15lvRdLCzigigxlnNvzNiDtSPWse6PUrO9s78Yjx4gfPoGhRyXGYCw30pQ 10BxlXoroeBU39W+uPjLx7KExnnlMK7XS1YTyJvxuzX3ACd0zWxCer7l9s1/Bypi68UZ Ji/361FA7rMfNa3mtOZAgQ5ESLlDvkLj37s29yYloFz/9e489IhuM6QFCVLojLHxeMzy g9EreeHP2W2J8/nimHzetHCD/tiTlRjKSzOoZC+9wuBv9YqfEBEH7GWrJXT5dGrSNmh8 R0EEJATwSXSan/Abvr4oIhf+KtgR4Tn3N25oxy/nrxX+kxmUstt9DmcZOqZxYuYNIHzW m73Q== 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=de0fsbDFK8Do19BQAR7aafoZxjpL1KzhidshGnF0gZI=; b=mIQVltAzfsDylt2p5yLuOnP970DALK7jE/Vy4gXPTcViCtIsoCcEWtvKwaB6pWpA1n YNkjzMf5k+dy2YKDi7kwwKnM1f8MmeMu8aNwWKIoegyOYcIXO9GtueYeH3bpuqyt/v1s PE2vpZOErmZu41R7O1iMpiTeOBN8nNj4I1jAlPoU+3egagwFirm5pItXh7LwqNelFd2h Njl48nEMxUAtYe9sAR0zP+hAKEAiQrn1+bKuxHdpiKuSsgSViCM1eBaWXH+WRZpzZaMt JgUbd9zgVMU4DjgP3hTCsKw56494xxnlMcF5dRY9zAoDVFvRNa14negkoZOdKEoSpQOa 2grA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hkXjnBjx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id un2-20020a170907cb8200b007701a050273si23890491ejc.942.2023.01.04.06.25.53; Wed, 04 Jan 2023 06:26:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hkXjnBjx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239568AbjADOJb (ORCPT + 58 others); Wed, 4 Jan 2023 09:09:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239539AbjADOJJ (ORCPT ); Wed, 4 Jan 2023 09:09:09 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E74632187; Wed, 4 Jan 2023 06:08:56 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id u9so83006472ejo.0; Wed, 04 Jan 2023 06:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=de0fsbDFK8Do19BQAR7aafoZxjpL1KzhidshGnF0gZI=; b=hkXjnBjx2cV4x4t6RbptpRZcCEXzz28rMq59Tp5Qi5iQQeE6gXWFwCuFeb2WEA2Veb rGXfl7qxCzdka8EIuS0m1+IXrZtmir8uB78XqnzjM11qjez4P+OB+4vLerAzZXZAR4X+ IhQXuF6bmVvUlaEaKNy9vOWatcC7sUsvJ44nN99kYlh2mJEVToiSfayuZr1wvHuiaM+b u6uJ/f4wZGhTBDbcOX/L7uL9mYBLz9BeVWymKr3rWsDWfujrnGgvJ88Hj2vgV1p2lSEp alUog5ZwfGf53FCbpeWsIA5bPW/fOzDdoaAEot5bTYhPRnibjmIhrHxVQhtyjDJCFlKr qM2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=de0fsbDFK8Do19BQAR7aafoZxjpL1KzhidshGnF0gZI=; b=2ZuQCs1GRHjwluNfpNRsZ78pUZvhCuL9hZOB1X5XvnQbc33ua8SLuVF1r03agsFbQ7 QH/l6SWpiuxCKh1bUl63WtYGlj86oYybPRg6PEB4K9Az4GhcW06LQhA8wNPTeEjPVv8L 8ZpROWNZUbmWCZt40vZRlCMVl6c6tMunhJFbztByXs1g1lP+728Q2TuLhxbOeERj5yTl wkCaUswclV451MPk3Brh7U2FvZJPlM/UuZYXUz4xcObnj/BkT2Cj0NUMxt8S2tbKoZlY R/jfwqmWXkj/167i24c+Efu4/rvYVjSn/YjSgqa7uvKDg6Th/1ahBOz9W3H5a66OXkQO T4hQ== X-Gm-Message-State: AFqh2kr9tsmXZi1zy0ZmGfWEX94akZiH6Bq2dVYecq4If+5FLIy4ZZfG rJ8FxO7cfN/GHvL3SD9Dt+4= X-Received: by 2002:a17:906:dfcd:b0:7ff:7876:9c5d with SMTP id jt13-20020a170906dfcd00b007ff78769c5dmr40458836ejc.62.1672841334817; Wed, 04 Jan 2023 06:08:54 -0800 (PST) Received: from skbuf ([188.26.184.223]) by smtp.gmail.com with ESMTPSA id g7-20020a17090670c700b0084c7574630csm9755283ejk.97.2023.01.04.06.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 06:08:54 -0800 (PST) Date: Wed, 4 Jan 2023 16:08:52 +0200 From: Vladimir Oltean To: Arun Ramadoss Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, Tristram.Ha@microchip.com, richardcochran@gmail.com, ceggers@arri.de Subject: Re: [Patch net-next v7 04/13] net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock Message-ID: <20230104140852.udslp3zjwfgbpq3i@skbuf> References: <20230104084316.4281-1-arun.ramadoss@microchip.com> <20230104084316.4281-1-arun.ramadoss@microchip.com> <20230104084316.4281-5-arun.ramadoss@microchip.com> <20230104084316.4281-5-arun.ramadoss@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230104084316.4281-5-arun.ramadoss@microchip.com> <20230104084316.4281-5-arun.ramadoss@microchip.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Wed, Jan 04, 2023 at 02:13:07PM +0530, Arun Ramadoss wrote: > From: Christian Eggers > > This patch is used for reconstructing the absolute time from the 32bit > hardware time stamping value. The do_aux ioctl is used for reading the > ptp hardware clock and store it to global variable. > The timestamped value in tail tag during rx and register during tx are > 32 bit value (2 bit seconds and 30 bit nanoseconds). The time taken to > read entire ptp clock will be time consuming. In order to speed up, the > software clock is maintained. This clock time will be added to 32 bit > timestamp to get the absolute time stamp. > > Signed-off-by: Christian Eggers > Co-developed-by: Arun Ramadoss > Signed-off-by: Arun Ramadoss > --- Reviewed-by: Vladimir Oltean