Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2557891rdg; Mon, 16 Oct 2023 08:01:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqAJZKb+gzXGQskrbLj2u4dqQfSLD85lPXNstbtBzUNiP8U5EFANnmqZvFh/22jU4rDjKg X-Received: by 2002:a05:6a21:788b:b0:171:4921:f1b7 with SMTP id bf11-20020a056a21788b00b001714921f1b7mr19140615pzc.41.1697468461112; Mon, 16 Oct 2023 08:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697468461; cv=none; d=google.com; s=arc-20160816; b=lzgbO5XMbJ6PJlkrLG+GYnZs5jubJIu3hEOd0Zow1KDogq79kM6Qefceo7jxHo/YGK EP9Os7+2mKXmXapabWfOqLZTA4Ik2AR5nNkqzkp2JzQyGB1yedWlxEetKw6ANIpETaxz H0b5p4NMSo2lf9Xsoo6TQNRlNHPosoB0jaN6SMd7EPxuAF2nHrMNlUn4CP7J1CJTz3zq lklgOYkWbCRXP6QHVbdcZYNNUxU/4wS7ZI7VirNeDUUyNdcCDLSE3mArHflyE1UTAZGG QUqSftDu0bgA/KlcLAcucQsTtKzssTNMbS88vSQDWvCa6Ke37b59KacUjys0wH9GFm22 JbDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=ppkDtMZrQStND01nwr+Zoe8BhS+PL2DK/7cIl9/gVis=; fh=psDXZ/1J6aepbe5WGf0gWGEQ70M/c17P944t1VG0PCs=; b=CNAtz5nSsdNnbkvkwhmSJ+vjNrWR6QztMVuS2wgU4c8lWk4SIjGmjRGAIW3YXUwKnX mN6S+7eQtZO++ptC26XRIzar7m9gpdTbHTjkCUESgapXrA7tYaWEOU6276eFfUkzaDeV rBfQZGMlWrbgbon7XdUeHHFe+Uq6u2SWKQvlm48+mmT9A18LOsqFK8uJyl6nBwYdeeHw NYcsbviGx0Tquj+JUGLT9XazPcQmzCCNo2MKk0F5dW1xlqldFIdb6xOH3i0XuwZwo1CE sD9OXVmaUq1MgvO5WJd2udFL9lDW5Fmb7tv8QGtnrs3nLuOTa7Ycil6PxHzrh0K1brcq lG6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Tunkb17v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o6-20020a639206000000b0058ae63187e5si9349771pgd.830.2023.10.16.08.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 08:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Tunkb17v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EBA7E80A32E4; Mon, 16 Oct 2023 08:00:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233606AbjJPPAk (ORCPT + 99 others); Mon, 16 Oct 2023 11:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232675AbjJPPAi (ORCPT ); Mon, 16 Oct 2023 11:00:38 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0A6AB; Mon, 16 Oct 2023 08:00:35 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 24F11C000F; Mon, 16 Oct 2023 15:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697468434; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ppkDtMZrQStND01nwr+Zoe8BhS+PL2DK/7cIl9/gVis=; b=Tunkb17v62OZltx/uVcuSmnnpvWaf7eWs14cCjQdXud+YiNmf9b8dfoPyPsytcqbQeQA7L VjDS1Pg9jpuQnAnijOqM3DGaanf6fTb5Cf8aMTzJjn1GojBFJ7s0YsVS6fIQ9bzpn/+Qfs Jf4Nu8NbRMdud4fuJhsLVQEHgho6QWEEf6bbp6SkDP8UqjCabpuvecGIHcNQzgQG4kp0nG qjwaADz2RPE6f+A1hOT/B0vSjFEZK8mHoBAoCnRLg3U5QtwvNedz2MOi0j/V/BKC0HSURL eg3XISnf5MiyIMfl1O/nq/5YUUH6KZb4EHOffsD4rvWbrLqA7e6bvD2XMcSuhg== Date: Mon, 16 Oct 2023 17:00:27 +0200 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Jakub Kicinski Cc: Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Thomas Petazzoni , "David S . Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Horatiu Vultur , UNGLinuxDriver@microchip.com, Broadcom internal kernel review list , Heiner Kallweit , Russell King , Richard Cochran , Radu Pirea , Willem de Bruijn , Vladimir Oltean , Michael Walle , Jacob Keller , Maxime Chevallier Subject: Re: [PATCH net-next v5 08/16] net: ethtool: Add a command to expose current time stamping layer Message-ID: <20231016170027.42806cb7@kmaincent-XPS-13-7390> In-Reply-To: <20231016072204.1cb41eab@kernel.org> References: <20231009155138.86458-1-kory.maincent@bootlin.com> <20231009155138.86458-9-kory.maincent@bootlin.com> <2fbde275-e60b-473d-8488-8f0aa637c294@broadcom.com> <20231010102343.3529e4a7@kmaincent-XPS-13-7390> <20231013090020.34e9f125@kernel.org> <6ef6418d-6e63-49bd-bcc1-cdc6eb0da2d5@lunn.ch> <20231016124134.6b271f07@kmaincent-XPS-13-7390> <20231016072204.1cb41eab@kernel.org> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 08:00:54 -0700 (PDT) On Mon, 16 Oct 2023 07:22:04 -0700 Jakub Kicinski wrote: > On Mon, 16 Oct 2023 12:41:34 +0200 K=C3=B6ry Maincent wrote: > > > Netdev vs phylib is an implementation detail of Linux. > > > I'm also surprised that you changed this. =20 > >=20 > > This is the main reason I changed this. This is Linux implementation > > purpose to know whether it should go through netdev or phylib, and then > > each of these drivers could use other timestamps which are hardware > > related. =20 >=20 > For an integrated design there's 90% chance the stamping is done=20 > by the MAC. Even if it isn't there's no difference between PHY > and MAC in terms of quality. Ok, but there might be quality difference in case of several timestamp configuration done in the MAC. Like the timestamping precision vs frequency precision. In that case how ethtool would tell the driver to switch between them? My solution could work for this case by simply adding new values to the enu= m: enum { NETDEV_TIMESTAMPING =3D (1 << 0), PHYLIB_TIMESTAMPING =3D (1 << 1), MAC_TS_PRECISION =3D (1 << 2)|(1 << 0), MAC_FREQ_PRECISION =3D (2 << 2)|(1 << 0), } Automatically Linux will go through the netdev implementation and could pass the enum value to the netdev driver. > But there is a big difference between MAC/PHY and DMA which would > both fall under NETDEV? Currently there is no DMA timestamping support right? And I suppose it fill= fall under the net device management? In that case we will have MAC and DMA under netdev and PHY under phylib and we won't have to do anything more than this timestamping management patch:= =20 https://lore.kernel.org/netdev/20231009155138.86458-14-kory.maincent@bootli= n.com/