Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2532057rdb; Mon, 20 Nov 2023 13:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMTTnfIx5GDbkbriEdQjarMByUNqArB/p8T6dHigsrywgjlg8a+9hTez+F7hbj1YoZT/1x X-Received: by 2002:a05:6830:2099:b0:6b9:a6ef:2709 with SMTP id y25-20020a056830209900b006b9a6ef2709mr9612461otq.8.1700516333144; Mon, 20 Nov 2023 13:38:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700516333; cv=none; d=google.com; s=arc-20160816; b=KHp6LwomsMquqFU6voZyXdiBR+cnSPUNtmLzG+PDeb/46GLDZ17jFKfxuI/FI31YwZ ex/Vm4qdZiM2Rzx5dmp5E/bBMGhkzpNnkPZabkhuNbU1+8uUYU0eNLQ1bSV/nP4/q5XU tWZ7VwWy41rkDAiOV6UzzBFX0googbtNwkEUpzQjILhK2Eyxdiy2472mZRGW/0b9lby9 OWsEQAChTiEq8HpckIdelP0w9w8kRGsxysKeRzHB/yjaCXm5rNcg+5Xkc3BHBBESwCiZ hSAHlwROrOhLFExbAGoEEMgYGkZmfad4yS1eX7HP+K0nSHacLSOsv9ocqNhke8pGQLJM zZKg== 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=5Ha4ZuuNizP9Fz5R+1Sm36t9/1561UbYAbhWyCtE1F4=; fh=R5kBmJySSBdAH4m2RtTvd5gBSup+rk9XN+LvkgmMOaw=; b=ifLKNy4XQ+//3hY1GUh8VKqOK4/+OV7H4jorF+80SMjCwZst5l/+SKCB7/nCpHXtYO QTsrJVkdl67T1Ii+vWcnTB6ozllC/eO3AaPjq8zMgeyLYMO+qxfPJcpO/IcHr6U/+AXp oZIjdiqkmzAnaDxoockY8nI2RUl7uCT6z+G6D4A6IIfRng2TPVJfLjVyYEICGNSeyWBn JuD0p6WZxBhYxz55odOhJvNtg32OS//DgM9VHkHV6gSI+kbrzNQMPQmzyKnQmNquAKkf q0rLaor5d+CKrDxK7jNjcJfEUu7elE/ZYNGwZv4JzQqBSq78OgMxrlTcAMCKujk4L+bF +Q7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CdNq4Agx; 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=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cb21-20020a056a02071500b005bdfbf34f9csi9540834pgb.735.2023.11.20.13.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:38:53 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=CdNq4Agx; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 62C82802DA90; Mon, 20 Nov 2023 13:37:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232003AbjKTVho (ORCPT + 99 others); Mon, 20 Nov 2023 16:37:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbjKTVhn (ORCPT ); Mon, 20 Nov 2023 16:37:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32D899 for ; Mon, 20 Nov 2023 13:37:39 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75AEDC433C7; Mon, 20 Nov 2023 21:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700516259; bh=R8d5DEDGigkNAFbk6cm05T5sdaFfbW9r9xeJSv+nEM0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CdNq4Agx/5Lh12IrFa4SP/P1QMpBsjmDsuWTwI9ap1y4jYystf2HHApsKQhXiirfw 5wY3x1qwWbiKKIpCRvpGud1kG2ogyUQRrQL8Q6vvcrQoDGcBV3UFNjOxjyf25d/ft4 PfGOHq9VsS8cPA5DIck4yFwBqfOQs3UPdg6PqrlUbgOPpO7JCom4GiEqOApwI3MPUW LFpAdCyDJ0WBxv9QPlPe6uVS9Sr1RhYdqc7L0WOWqUiRheguE7EI5nt3lbVZByXnFV 7F8s9kjj59a27dj6fU3Aub768mo2q2fqzMS6uwHl+HuzbJ+03R8KTgD4WC3WACLxBx 4uWi/Qt89VEfw== Date: Mon, 20 Nov 2023 13:37:37 -0800 From: Jakub Kicinski To: Vladimir Oltean Cc: =?UTF-8?B?S8O2cnk=?= Maincent , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , 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: <20231120133737.70dde657@kernel.org> In-Reply-To: <20231120211759.j5uvijsrgt2jqtwx@skbuf> References: <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> <20231120190023.ymog4yb2hcydhmua@skbuf> <20231120115839.74ee5492@kernel.org> <20231120211759.j5uvijsrgt2jqtwx@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 13:37:47 -0800 (PST) On Mon, 20 Nov 2023 23:17:59 +0200 Vladimir Oltean wrote: > Forget the concept of an active hwtstamp provider, just open up the > knobs of _all_ possible hwtstamp providers for a NIC. Simultaneously! > To make one active and all the others inactive, just use > HWTSTAMP_FILTER_NONE/HWTSTAMP_TX_OFF for all except one, and the desired > enum hwtstamp_rx_filters / enum hwtstamp_tx_types for the active one. > Live with this expanded configuration model for a while, just restricted > for a single active timestamping layer, and then, once user space is > ready for an enhanced struct scm_timestamping which supports potentially > multiple cmsgs with distinct hwtstamps, remove the restriction and let > it all rip! Everybody gets their pony! > > Additionally, SIOCSHWTSTAMP is kinda rusty, has a fixed binary format, > and is not extensible to target a specific hwtstamp provider. So a > netlink conversion of that, as a first step, would of course be great. > > Is it an accurate summary? Yes. For now we can impose the requirement that only one can be active easily at the kernel level. But the uAPI should allow expressing more. > You've partially answered above. The mix of timestamps coming from the > PHY/MAC and those coming from the DMA is unrepresentable in today's > UAPI, and is just fine-tuned to work for the existing use case of "PTP > gets PHY/MAC, everything else gets DMA". > > Still not 100% clear what would the proper UAPI (separate user-controllable > RX filters for PHY, MAC and DMA) gain, in addition to what exists in mlx5. Too late for mlx5 but I'm anticipating that more vendors will start needing such configuration in the future. At which point it will be good to have an API in place.