Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1099651rdf; Wed, 22 Nov 2023 05:45:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJU4a6u56SR1g2MEehF9L0vSBCK2Ry/gEBgj0z2bjH1bRhJet4/3Nv7mEp+3XhD0aCl81Y X-Received: by 2002:a17:902:7892:b0:1cf:530b:d027 with SMTP id q18-20020a170902789200b001cf530bd027mr3757999pll.15.1700660749247; Wed, 22 Nov 2023 05:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700660749; cv=none; d=google.com; s=arc-20160816; b=AAQi38WpU4bi1CbwxGMrsY/XVkHXNyPL5yyWiOGLRrv6lNhNo3A/eHnyOYZDHXoNZo I2jt56UQKGVKaLbjRlsdQzU1V+vTF7AIxaZt4F6kcGTwG8mTeU91cGeJ7Ol2UJ4cjTLD F/0Qmz8Myg7RhhhxzpqZUvMopjVcfq7NJNbO2mstN4MHd34uAMlbz/Rquyp/3JQgdSD8 IlJHuDHWFwkbNHlxHUs0eQtcH22776b0oMyzOr5MrOJjTaxmmrJH6aTcj14cz3Tx4NJg 0p2KSOLkSvfLJUTEFjMJDR6Y672y5XASIXZshHV4cO5AGI/wSoJ+4cOaxB5lMaAtJRzF FA/w== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=HYGwltdt7UObW6m6TQ25cKM4YubrRmxjcFZzyasRZoE=; fh=hQD45QDJ2bysLyzBrZwQAvoyLp6O8fXgP0a8Jiv/jdw=; b=iiFx9pqK/GM5iZOZ/dI6do99U9zu+7pf8Tb/89CCr51c86BPRmvHckb5bvwfvewLho 5BdQYvSSndMVia+mI8Xpo0xXxbw9e1DCCRUTcYJpNhp1vx61YuLHpTI8UwYd8XloIEqv V2jbaDHnP0wHRrOBuS3Sf47FzNz6P/gd1Kg1/JDX2xOGx/CzFk7Y3pNzccsOIBj523qW V5fK53XY2xP1UopNeigKD2G04zDVxMOEhbQc8tlqgH/JfRM/gUEf+U++LbVCrw4U+gf4 wS+Wy6B/a0iGAimiwdPp/vA+Jvpma/ucn7hUdn7EAZmUmviYoY6yhjwOuWSsMCkYmIZI QxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Azq5OYes; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t12-20020a170902bc4c00b001c9b5a96d15si12311708plz.13.2023.11.22.05.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 05:45:49 -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=@bootlin.com header.s=gm1 header.b=Azq5OYes; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A2DBC807440B; Wed, 22 Nov 2023 05:45:18 -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 S1344203AbjKVNpF (ORCPT + 99 others); Wed, 22 Nov 2023 08:45:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343568AbjKVNpE (ORCPT ); Wed, 22 Nov 2023 08:45:04 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B2DD54; Wed, 22 Nov 2023 05:44:58 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id A59D71BF206; Wed, 22 Nov 2023 13:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700660697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HYGwltdt7UObW6m6TQ25cKM4YubrRmxjcFZzyasRZoE=; b=Azq5OYesRze4Ajgq1X2y6Rlqfe3W2ZoOlUQoeG1wJLotR/9VVFNBphuxj42UDzVKdrXQjy 9J56sFXmNMc9wrx+YEcpbHSJiQgwOUd8F4JQNU7O4bHRX+dVDUdasgfDd9O0H7T3M1b3Dn K1a5pXmttrk+jp6YLCwnw22xH011ECFtj7Ah0XLyEp0smrxan4YDdibKh58B9zfFOhGCXO mJAfGFHLGMD0V+oBvkyldD3GciM/GRX5qSWa+eoCX3B8ffXDl6QKceKhcXUbQ1DqzfyrED kt7Va5FGV08YXUCT1hF6KvShuTAQac8lU1ANUKXuTvN78G8FPCeCM3bZmnN5Ng== Date: Wed, 22 Nov 2023 14:44:53 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Jakub Kicinski Cc: Vladimir Oltean , 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: <20231122144453.5eb0382f@kmaincent-XPS-13-7390> In-Reply-To: <20231121094354.635ee8cd@kernel.org> References: <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> <20231120133737.70dde657@kernel.org> <20231120220549.cvsz2ni3wj7mcukh@skbuf> <20231121183114.727fb6d7@kmaincent-XPS-13-7390> <20231121094354.635ee8cd@kernel.org> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 05:45:18 -0800 (PST) On Tue, 21 Nov 2023 09:43:54 -0800 Jakub Kicinski wrote: > On Tue, 21 Nov 2023 18:31:14 +0100 K=C3=B6ry Maincent wrote: > > - Expand struct hwtstamp_config with a phc_index member for the > > SIOCG/SHWTSTAMP commands. > > To keep backward compatibility if phc_index is not set in the > > hwtstamp_config data from userspace use the default hwtstamp (the defau= lt > > being selected as done in my patch series). > > Is this possible, would it breaks things? =20 >=20 > I'd skip this bit, and focus on the ETHTOOL_TSINFO. Keep the ioctl as > "legacy" and do all the extensions in ethtool. TSINFO_GET can serve > as GET, to avoid adding 3rd command for the same thing. TSINFO_SET > would be new (as you indicate below). You say this patch series should simply add TSINFO_SET command to set the current phc_index? It won't solve your requirement of having simultaneous hwtimestamp and enabling/disabling them through rx_filter and tx_types. You want to do this in another patch series alongside a new SIOCG/SHWTSTAMP= _2 ABI? > > - In netlink part, send one netlink tsinfo skb for each phc_index. =20 >=20 > phc_index and netdev combination. A DO command can only generate one > answer (or rather, it should generate only one answer, there are few > hard rules in netlink). So we need to move that functionality to DUMP. > We can filter the DUMP based on user-provided ifindex and/or phc_index. Currently, the dumpit function is assigned to ethnl_default_dumpit. Wouldn't the behavior change of the dumpit callback break the ABI? > > Could be done in a later patch series: > > - Expand netlink TSINFO with ETHTOOL_A_TSINFO_HWSTAMP_PROVIDER_QUALIFIE= R. > > Describing this struct: > > enum ethtool_hwstamp_provider_qualifier { > > ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_PRECISE, > > ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_APPROX, > > };=20 > >=20 > > Set the desired qualifier through TSINFO_SET or through SIOCSHWTSTAMP= by > > expanding again the struct hwtstamp_config. Just wondering to have a insight of future support, in the case of several provider qualifier and the SIOCG/SHWTSTAMP_2 layout containing the phc_inde= x. Will we be able to talk to the two providers qualifiers simultaneously or i= s it not possible. To know if the SIOCG/SHWTSTAMP_2 layout would contain the description of the qualifier provider. If I understand well your mail in the thread it will be the case right? Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com