Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp37840rdd; Wed, 22 Nov 2023 08:50:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF45gIXHkaVyMhWoKbtR31pPh2lr5vBLzaRtC8gv1cRHJVPTHR/kCiKRBDFnLX/FKwA3U4S X-Received: by 2002:a17:90b:1d10:b0:281:d84:a97e with SMTP id on16-20020a17090b1d1000b002810d84a97emr40970pjb.2.1700671858712; Wed, 22 Nov 2023 08:50:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700671858; cv=none; d=google.com; s=arc-20160816; b=OC1f7HYwg/+/MmFfwmBF4r7Tt29VrvX3I3ZffqK0rWkpRL0zuCJ1//IySYcPnbE60d 2KA/NLwGMl/yhR3hjR7q4hHlZtXySpYFzbtQppZlBfzd4mokRhD3AoerebiGn88QLbeb wn22fMfWBANNTIdVe9E9TPV2esqg2I0baxH+Q1PWLP15EPXqeol8dZRqJLGRr9C/Iwym ZPs42EF5RAnMsWcYGuZHWlvHJP7H4QZwpYg3BC1blTeRtN7HqrUvGzov8tXM57+5d81/ KmoOB5U6klHupQM9Yc9vgOQvdOfh0NytV3vRk5YoPviGbt6yAy+Kqmc2zGxs2awx+B+B zBoQ== 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=ljZMoNwe8OeZp8AAra0HojvSowfg3XjgxwvodIHWmBg=; fh=R5kBmJySSBdAH4m2RtTvd5gBSup+rk9XN+LvkgmMOaw=; b=EbUWHqf1wAkJd+YnpKd5Vv/8muqPL2yN9+DCHXPcM2+sD5tXkwBMbGJNwY+arDsSNM W6pzHiFLpcADHNd1DiYaf5Iob9io4sDAYcmIDRHMXiQkuNyxkzcM1+Tmsxs0qaBSepkW 30R0EsfVMzBdydzcuiaVJ2/+/sO10S5h9Q8IBszdV1uP7iH55PK4dqPdNs2WqBhPFUlE WbY3O/+J5OYA8nAXUPI/ofbdvuphGxuZlOjzcVdToIg4OAHmYnY+fCZ2rvY8Ikm7Pa7Q hcEtBuUgGS4JzcaOOXUeebgeYd1ALy6n49CKXWEX8RHvV3iFT6iJ3DCHtV82H+hZRRHi JQjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fPSeQNCQ; 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 o10-20020a17090a3d4a00b0028098007c8csi3995pjf.84.2023.11.22.08.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:50:58 -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=fPSeQNCQ; 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 1A8AC80990E3; Wed, 22 Nov 2023 08:50:27 -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 S231948AbjKVQuP (ORCPT + 99 others); Wed, 22 Nov 2023 11:50:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235134AbjKVQuH (ORCPT ); Wed, 22 Nov 2023 11:50:07 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB7C6D59 for ; Wed, 22 Nov 2023 08:50:02 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A345C433C7; Wed, 22 Nov 2023 16:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700671802; bh=ZFMcFjU59M2XNKlhy1XsxNfFuYDu0NpI3SyILQsRT0Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fPSeQNCQqy1/x5905Xjdl5nq7QlL/tId3x7pQFXoAGW37wFFRtiWTGUUKJ/YJUR4e /9Nxv3QiRn8YLbTS71k2DfvyQ873pq9HsTshUHDbAfumGHRH/hgfGs37zMYSknImv9 2xRa9GS6P1vBKasQ+XP/mf0W5RFjTGB6kwo6DeL1O3Fp+5kESIh3JsdUS0G7XAUsjb ZF4IxuO7V4cc8x+FJfcCYQkcPXegfEeqzgJX/x+Q9hBd7sxwgthverEd2ugTpnjJ/3 h2rS0RRV8qd1ovaKTwKS7AR9+USkfjbswYTljgoSpMPAywz1G34liMSX23P6pfv+2w 935H/le0J7+hg== Date: Wed, 22 Nov 2023 08:50:00 -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: <20231122085000.79f2d14c@kernel.org> In-Reply-To: <20231122140850.li2mvf6tpo3f2fhh@skbuf> References: <20231120142316.d2emoaqeej2pg4s3@skbuf> <20231120093723.4d88fb2a@kernel.org> <20231120190023.ymog4yb2hcydhmua@skbuf> <20231120115839.74ee5492@kernel.org> <20231120211759.j5uvijsrgt2jqtwx@skbuf> <20231120133737.70dde657@kernel.org> <20231120220549.cvsz2ni3wj7mcukh@skbuf> <20231121183114.727fb6d7@kmaincent-XPS-13-7390> <20231121094354.635ee8cd@kernel.org> <20231122144453.5eb0382f@kmaincent-XPS-13-7390> <20231122140850.li2mvf6tpo3f2fhh@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 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]); Wed, 22 Nov 2023 08:50:27 -0800 (PST) On Wed, 22 Nov 2023 16:08:50 +0200 Vladimir Oltean wrote: > My understanding of Jakub's email was that he wants to see the functionality > offered by SIOCGHWTSTAMP and SIOCSHWTSTAMP converted to netlink. I don't > think that ethtool is the correct netlink family for that, given that > these aren't ethtool ioctls to begin with. Maybe the new netdev netlink > family. The conversion in its basic form would offer exactly the same > functionality. Well, ethtool has been the catch all for a lot of random things for the longest time. The question is whether we want to extend ETHTOOL_GET_TS_INFO or add a third API somewhere else. And if we do - do we also duplicate the functionality of ETHTOOL_GET_TS_INFO (i.e. getting capabilities)? My vote is that keeping it in ethtool is less bad than 3rd API. > The _listing_ of hwtstamp providers is what could be done through ethtool > netlink, similar but not identical to the way in which you are proposing > today (you are presenting blanket "layers" which correspond to netdev and > phylib, rather than individual providers). > > The concept of an "active phc_index" would not explicitly exist in the > UAPI. Thus I'm not sure what's with this TSINFO_SET being floated around. > The only thing would exist is a configurable rx_filter and tx_type per > hwtstamp provider (aka "{phc_index, qualifier}"). User space will have > to learn to select the hwtstamp provider it wants to configure through > netlink, and use for its class of traffic. "Active provider" is the one that has TX_ON, rx != FILTER_NONE, right? > This is why I mentioned by ndo_hwtstamp_set() conversion, because > suddenly it is a prerequisite for any further progress to be done. > You can't convert SIOCSHWTSTAMP to netlink if there are some driver > implementations which still use ndo_eth_ioctl(). They need to be > UAPI-agnostic. Right, definitely. > I'm not sure what's with Richard's mention of the "_2" variants of the > ioctls. Probably a low-effort suggestion which was a bit out of context. > His main point, that you cannot extend struct hwtstamp_config as that > has a fixed binary format, is perfectly valid though. This is why > netlink is preferable, because if done correctly (meaning not with > NLA_BINARY attributes), then it is much more extensible because all > attributes are TLVs. Use NLA_BINARY, and you will run into the exact > extensibility issues that the ioctl interface has.