Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2443594rdb; Mon, 20 Nov 2023 10:53:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKsPa/xrnuCRKtn2sbSrs11TNygkW2UgG8AG7pMitIPfLp5PSFNIFLbr980fmSmKJoZioV X-Received: by 2002:a17:902:a5c9:b0:1cc:60ca:8f24 with SMTP id t9-20020a170902a5c900b001cc60ca8f24mr6972505plq.45.1700506385297; Mon, 20 Nov 2023 10:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700506385; cv=none; d=google.com; s=arc-20160816; b=wPkEByJ38zPQBZ4bF4Fifg3MTdbaCGPeKuQ+Row9tueCDtgbbx0JqHvvoS1bJ1W/jD nADXJJXLeldYDjAD6bf0fZ+rinT5M9QGge+SzHSmf+8lzFdTir9ViacGHtJKahOAsAT8 K5VkJ73B89ogXgEW+rju9QG2foskEDCNIAkgZBomLGb7rNJGfBHj4vIIeN9L+eT9QRT/ XCV/l5SNRpY2uyBIgws+ZkuuP0+1CCsH6AqnBHpcKTselb/HLkZd5t+Ps7hnxSynOLAP KUgk+vh1IntvjaG8KtViwynW74ZjxsZ3gHkIPChstiKRULiwFebwnECC3rfCxDKOkP97 EB4A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+/1nRwEXWd0NyOy3wXV+/QMFIDUggQdfl8+wCNGFbhs=; fh=pHeA3zpoGdRdD841ou/cI6DVqeVOZTt78pHq+pB+bmY=; b=qi74FwtnDaamBsjGvzUiy8BQ757IOoPziZzdDAC944Xs5Z4UVLliYUOYOQw9sQmDME s+GusyxBcKSHjNyeGemZZm6Als7MpuDo1PiZiXMQp1DwtbcpM5heK7vePcnko0LmaY/N 3Qi+7SFRJWskAQjHugaEATdNXtpC/lDiWKorESQ/CiyRRRKVs9FVq1gZQVZZpaZR9/wq wiyfZ1gjd7xKL071pXeliWZMCFLnX92SGETumeWY0vOb6rOLQpOCUbv5+y7Z1X05cS95 mSyY4ZZTqZ0a0Vi+4FaSsEB/Mda2NzhVS+4Q8BXGsdgPiF+w7kfDZrhhBKH3pp2fC5s2 wULQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rNbB3zQe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d7-20020a170902cec700b001ce67644c86si6823031plg.567.2023.11.20.10.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 10:53:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rNbB3zQe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BA91080A90F5; Mon, 20 Nov 2023 10:52:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjKTSvz (ORCPT + 99 others); Mon, 20 Nov 2023 13:51:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjKTSvy (ORCPT ); Mon, 20 Nov 2023 13:51:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106ACC9 for ; Mon, 20 Nov 2023 10:51:51 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78D3EC433C8; Mon, 20 Nov 2023 18:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700506310; bh=W2rRlTlnaz7y/dAe1I9YW0SDSX4YDJ+JQ3JUeJOiE0w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rNbB3zQeaasobMgO2bQs8/WPmiPXJbIDkO1FZ0gDFmszp9kZh9fbi93mFAZk5KlBd aQ/HZB1Wvnbt+upxuRvZIOsq8nMjK2X2djatxv59SNRwN0GZhzsPHrwnm9Fz+Z21v+ 5sB9bLtKXVL5JM10/YqtRfJH0rXWG2td1ME7SSqFfGLJ30Uc5o2I9DEowX8gvYXuHL PsT0QQvjlMIR78QjEmfipugjDOnyepK7FbfOEuEIfKEIQ/WgBXWBHPWtE1g/bcSgYd wIaDWgZxt1nw3dGOyO8be3NpJWV8nsMSt5HYtzpk0/q57sQba9DWI6UlWYrJs8xbKU DkJx+TKPlcsLg== Date: Mon, 20 Nov 2023 10:51:48 -0800 From: Jakub Kicinski To: Andrew Lunn Cc: Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable Message-ID: <20231120105148.064dc4bd@kernel.org> In-Reply-To: <157c68b0-687e-4333-9d59-fad3f5032345@lunn.ch> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> <20231114-feature_ptp_netnext-v7-15-472e77951e40@bootlin.com> <20231118183433.30ca1d1a@kernel.org> <20231120104439.15bfdd09@kmaincent-XPS-13-7390> <20231120105255.cgbart5amkg4efaz@skbuf> <20231120121440.3274d44c@kmaincent-XPS-13-7390> <20231120120601.ondrhbkqpnaozl2q@skbuf> <20231120144929.3375317e@kmaincent-XPS-13-7390> <20231120142316.d2emoaqeej2pg4s3@skbuf> <20231120093723.4d88fb2a@kernel.org> <157c68b0-687e-4333-9d59-fad3f5032345@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 10:52:03 -0800 (PST) On Mon, 20 Nov 2023 19:39:35 +0100 Andrew Lunn wrote: > > What about my use case of having a NIC which can stamp at a low rate > > at the PHY (for PTP) and high rate at the DMA block (for congestion > > control)? Both stamp points have the same PHC index. > > How theoretical is that? To me, it seems more likely you have two PHC. Very practical. mlx5 does this today, based on guessing and private ethtool flags. > The PHY stamping tends to be slow because of the MDIO bus. If the MAC > has fast access to the PHC, it means its not on the MDIO bus. It > probably means you have the PHY integrated into the MAC/SoC, so the > MAC can access it. But if its integrated like this, i don't see why > PHY stamping should be particularly slow. So you can probably use it > for congestion control. And then you don't need DMA stamping. Tx stamps are harder to carry back to the host all the way from the PHY than from the DMA block when DMA completion is signaled. Rx stamps seem much easier to carry down the pipeline but apparently some vendors are incapable of doing that as well. > Do you know of real hardware with a MAC and a PHY sharing a PHC? mlx5 for sure, but other designs, too. PHY, NIC pipeline and PCIe PTM may all need to time stamp from a single time counter.