Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1068104rdg; Fri, 13 Oct 2023 09:15:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQIM/N57XpYUBPAMNIUkiT0hdMyMSAE5F8SbivL6AvVEIo8E3wdYdJe6OhDoDNsxaPMGne X-Received: by 2002:a17:903:1106:b0:1c9:c735:2d67 with SMTP id n6-20020a170903110600b001c9c7352d67mr10117122plh.47.1697213716443; Fri, 13 Oct 2023 09:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697213716; cv=none; d=google.com; s=arc-20160816; b=zsZk+W7ZweaeYWJYIeVr+UhZ4n6Q+tb7UKnjLafS5u9IeEc+U4opSyDb9As/kep9D+ uqs5dsMsoK1ZWFJ5Y9/HPwXszSxsPt54Lj5tyxkXGMPxdmE4cA5Ex4D//wBqvY0tEAm1 1U5MEmr89I9Gzf6T4bx5KjsahMZgBQwfeQNTJJH63bg+G/DsIAqUqLcXro5dnym3XNge +Xy0evYf9d+/Fg5cPMasJsp8evr+rSPL29FB1KeVq0bZy36xwerm8HhJpGwthLwXeH4A 6HoJ3ai/dU5xqqsPgY1ipp+jGgOq7qG1fNbnYqSneOvElPwEYWNJOdNERI1GETBs6YwY bFRQ== 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=GrwS+vcMsoSAhYMGFWj4mmzPUzSI7XQUIUxm/ba9Oes=; fh=9xarlwFZW0f9pIZO89xJY3Kq9Dr05nBFSpH97EHUxeM=; b=qtJ60nbozXB5qswyScoSx+2yWpymKlyMahXXEmJEO5ZJv8zpcoU5SfbPlFX6Mbws67 LMdxmab2Qj+jXEouIPMFT3j7UUqawrBwNT+ra3LsaTrMcx7z9Najul9qHey8HnLTUAB7 FvPI/Ifl0UVjXhTABxY8xE5FQxEidpz8HEXo6+MHXQtgWEDZam4vri3IHeIv2uuL6V6x 7OkMSlkG9BSoVyyExmj+DgoYIhNoulnnGA4/vf7AcO7X234j8Lmv6AcB94d+j1Qwkz12 ql6zCcFS5BP5ocx2FPpz5r6M1N1KLRtuuJygLZcz4f/zxuiRWsIh0b4vmyivg8wV61p3 oJBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=437tGYUj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t16-20020a170902e85000b001c61bd9db5csi5180848plg.317.2023.10.13.09.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:15:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=437tGYUj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8C44682B4878; Fri, 13 Oct 2023 09:15:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232386AbjJMQO7 (ORCPT + 99 others); Fri, 13 Oct 2023 12:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230500AbjJMQO5 (ORCPT ); Fri, 13 Oct 2023 12:14:57 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F3B465AC; Fri, 13 Oct 2023 09:13:03 -0700 (PDT) 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=GrwS+vcMsoSAhYMGFWj4mmzPUzSI7XQUIUxm/ba9Oes=; b=437tGYUjy0dzd+LEBxcKMzHlB8 C993jtkni0Txa+O1ssK3iB7hyVKWDlKTQXuJrcxVDyRVbeYzEjTlX2xZm2DLk1lfvMmRjQ1HEzYpG 8+aG9vIy5F5Eusv+Ec9uvwyG51TsJEyYfEyO7jnpxgVHo65qjjT5hKdie/CRdvQ2g5Cg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qrKkx-0026yZ-8G; Fri, 13 Oct 2023 18:11:19 +0200 Date: Fri, 13 Oct 2023 18:11:19 +0200 From: Andrew Lunn To: Jakub Kicinski Cc: =?iso-8859-1?Q?K=F6ry?= Maincent , 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: <6ef6418d-6e63-49bd-bcc1-cdc6eb0da2d5@lunn.ch> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231013090020.34e9f125@kernel.org> 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 (snail.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:15:15 -0700 (PDT) > > All these possibles timestamps go through exclusively the netdev API or the > > phylib API. Even the software timestamping is done in the netdev driver, > > therefore it goes through the netdev API and then should have the > > NETDEV_TIMESTAMPING bit set. > > Netdev vs phylib is an implementation detail of Linux. > I'm also surprised that you changed this. > > > > > + */ > > > > +enum { > > > > + NO_TIMESTAMPING = 0, > > > > + NETDEV_TIMESTAMPING = (1 << 0), > > > > + PHYLIB_TIMESTAMPING = (1 << 1), > > > > + SOFTWARE_TIMESTAMPING = (1 << 2) | (1 << 0), Just emphasising Jakubs point here. phylib is an implementation detail, in that the MAC driver might be using firmware to drive its PHY, and that firmware can do a timestamp in the PHY. The API being defined here should be independent of the implementation details. So it probably should be MAC_TIMESTAMPING and PHY_TIMESTAMPING, and leave it to the driver to decide if its PHYLIB doing the actual work, or firmware. Andrew