Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2535644rdb; Mon, 20 Nov 2023 13:46:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvS27PFRxze2Cy6jrl3fPEDOvUgKIZJjbfiX4OmauCEOMUWw1UgqEMZ0DWH5ierEOSyi7J X-Received: by 2002:a17:90a:f3cc:b0:280:7cd2:429 with SMTP id ha12-20020a17090af3cc00b002807cd20429mr1018934pjb.18.1700516811105; Mon, 20 Nov 2023 13:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700516811; cv=none; d=google.com; s=arc-20160816; b=PZJyn1QFJ+lKpU+J9ONzmUn/YL2H8sKk9MPMhOu09mkisKcbAz2aUQeb2VGbhDh51t Qb2x9QzLWjGuzDpFUEV20fhLGPNmMZBSP89YdaqwVB+rYFuygZgx/HenIf9aOC77aggo KAnLYQZu8EmXXc5Y8Gx7K6s8Fl8V4epJxwpTNdCO0WzARolwY6SwCSclavaIAzUnDYVi INPdlWWa4qAr96Rs3r9LgPjTdkkhktpfFkVrZY0DQsZRSjTwxgYgQb8Lpx9GfyirsqRY wRc3ZtYMQtmwimSRWUJkXqmocl0mnGGFHPtebQRdlQ4ZBlUaQDoCvXrdIrSlPsVuiDEf hfeA== 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=vfvGoFEy1QpFgWj+w79URmMbPGRrZV/GlGfKsBc2TYU=; fh=/8F2tltf80/BTamn8J+0YrDXUrgR/0aVnhwuWgbReUo=; b=I68X4vo8ISh5F6IWV/EGggKZWjrkTmTIP1HZOvmjehylBzbKB7JNcdR+pK+8F8H2rT 7zVSFsHl1tosXWX3ODvxibTDjFRwZ0SAd1QtbklaUMsRMgwcq5uFOWn1iDHkfsT2/w2e QO7C6rPppD9saVD1LAC/rYFo6gMUoDQe3224u7sxcaCjbz48Uy02PYjx1t5m3Re4LTxi wrij5xvNcaYMmpLBVpMkpmjem+cBb7Igsjl3qmmDmDJqoh9YOqnPDvwIPAVqBw4ZXeeq iw1/ZS4QpK/Fk2m3IA7sye1sxHQZRjPlLVUIFH/WZfAJKuH9vQuoCtvNhz2mRs6nTI1/ jU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhk8t6N3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id gc5-20020a17090b310500b00280294ec225si10874987pjb.24.2023.11.20.13.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 13:46:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xhk8t6N3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 0AABE808682B; Mon, 20 Nov 2023 13:46:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232300AbjKTVqF (ORCPT + 99 others); Mon, 20 Nov 2023 16:46:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232359AbjKTVp5 (ORCPT ); Mon, 20 Nov 2023 16:45:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D239A4 for ; Mon, 20 Nov 2023 13:45:54 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7FB0C433C8; Mon, 20 Nov 2023 21:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700516753; bh=wTllnXLudtUSjHaEEAUK+L8ZBRUeteK9UhJ3dFHB6P8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xhk8t6N3NQbIK326t8vzbsC+Lh1F7QrLoyQS5Ngt/uCzxNxN1JnMsa3RF5AMjo7xP 1pKL4LaoF4ivTbBnK5MnMyKKLk03xf7wmnEKFUD8DGnnFmxJn1eZeW27On+/qwCKtQ zX6ux2sLm96LaMruFuqUAX1Jy99M6InH4ZT1n3ddfUCWg6mjZvUXxPHxe1iB9k/7aS Ttp3zViQ4WOpzAmGOkaZ1mKvrVk9rIFuOjdZ5acoNbUBA3U4s1BPhBWt3/TrgIPCSn NOWtkHeoIjZkNPv/E3rDBr1ug2f/aounyeTdaO5Fb7z1WvjfhWhapi177br/EGlHEQ g8CzuXOpLfAEw== Date: Mon, 20 Nov 2023 13:45:51 -0800 From: Jakub Kicinski To: Vladimir Oltean Cc: Andrew Lunn , =?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: <20231120134551.30d0306c@kernel.org> In-Reply-To: <20231120195858.wpaymolv6ws4hntp@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> <157c68b0-687e-4333-9d59-fad3f5032345@lunn.ch> <20231120105148.064dc4bd@kernel.org> <20231120195858.wpaymolv6ws4hntp@skbuf> 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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 13:46:32 -0800 (PST) On Mon, 20 Nov 2023 21:58:58 +0200 Vladimir Oltean wrote: > I'm still waiting for you to fully clarify the "per socket vs global" > aspect, but independently of that, at least I understand why this is a > counter-argument to my proposal. I need to tune it a bit (ASSUMING that > we want DMA timestamps to "look like" hwtimestamps, and not like their > own thing, to user space), because the PHC index would no longer fully > identify a hwtstamp provider, so we need something more. > > I imagine both ETHTOOL_MSG_TSINFO_GET and ETHTOOL_MSG_TSINFO_SET to > support a new (nest) nlattr called ETHTOOL_A_TSINFO_HWSTAMP_PROVIDER. > > This would contain (u32) ETHTOOL_A_TSINFO_HWSTAMP_PROVIDER_PHC_INDEX > and (u32) ETHTOOL_A_TSINFO_HWSTAMP_PROVIDER_QUALIFIER. It could be > extensible in the future, but this is the baseline and forms the key. > > The latter takes values from an: > > enum ethtool_hwstamp_provider_qualifier { > ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_MAC, > ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_PHY, > ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_DMA, > }; Sounds reasonable. Having more attributes than just PHC index works. Given the lack of distinction between MAC and PHY for integrated NICs I'd lean towards ditching the "layers" completely and exposing an "approximate" vs "precise" boolean. Approximate being the DMA point for NICs, but more generically a point that is separated from the wire by buffering or other variable length delay. Precise == IEEE 1588 quality.