Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp554808rdf; Tue, 21 Nov 2023 09:33:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpLRGtlGm/bQRd7Js9ZPwpA8Vq4cF7l2XQjbOiAZTg++LQiQ2PG/iYqdD7K6o6mSbrwKAv X-Received: by 2002:a05:6830:3b87:b0:6d3:1e5a:d927 with SMTP id dm7-20020a0568303b8700b006d31e5ad927mr13290397otb.5.1700587997176; Tue, 21 Nov 2023 09:33:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700587997; cv=none; d=google.com; s=arc-20160816; b=JTmZynREGMpNZb389VceX4HRBZXQpqhjZvHFzKqbZRGq6awOrpU1kH/Adh5bNdUTUZ zp/RwjI+dE6H0Z85KZE9dpHZAf9p8o8PyeOH9QOlIr3y2//kDwA3Tdxl02Yz5wo0puC9 C4kud8ICn7VUWfQiDioICbDqW0v+Dnquuw75XEoID9PGWFnqcM6hRjhcXTipP8RYl+OX /uzz7aN+HiEZPXQpILjAyKBeHgbQl19RkFeU6jMOMa5dw8GgnwmDcB9feAyWdoOhScS7 kFyekT8DACrkBk2zn8xAMlXeqX/k8J9LjKCa+K7t52UfmC//OxzJ54e9GOQn8x9PCBnT Xt2A== 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=B3kq6X9wDyuhC6coa3KMXDSFrs/k9gUPcRjKn0KIPLQ=; fh=MWt/aau18iZB4cBNRDtmAfDw6lQMgSQj1JsFQe1KAAc=; b=YQfPBQlrkhsGZwHdTZIXueqLuX2UsAyMtVGROYLg0CIMRRBL77j0RVgXbk8GuX+gA5 QDngLHTXvJdZZgspJBBn4r/chSLsf13tJat582dYnpa37QaUTgNR4tjx2cuTszZA3IOe x6+Q6eC0zzJAI5orMYXgQf9qRZ4P5ibXjJozF1iUMjMaltqDU+eSJFqDFHymwuoahXz+ 9D863ypKnzqbn4WGGPEITYDPeaEADVow+kpfEBaDp76aZOFin28MADXK3oksdpvyLzbJ mi++7rHZ0OmI1pkXjl8j/9fkR9y2AEtm8FSBGzd42pVrqyGBGxhp6yxniKypJohlN7Y3 AI0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=i5coG3f9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id c11-20020a631c0b000000b005b96d038729si10636320pgc.728.2023.11.21.09.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:33:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=i5coG3f9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id D1414814C69B; Tue, 21 Nov 2023 09:33:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233639AbjKURbY (ORCPT + 99 others); Tue, 21 Nov 2023 12:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjKURbX (ORCPT ); Tue, 21 Nov 2023 12:31:23 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD292A4; Tue, 21 Nov 2023 09:31:18 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id BBD25C0006; Tue, 21 Nov 2023 17:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700587877; 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=B3kq6X9wDyuhC6coa3KMXDSFrs/k9gUPcRjKn0KIPLQ=; b=i5coG3f9OL1PEPMekdoyYjnQkjcMp/pI4Kskf8SG8FKMbXhmgRmPhQDKLMzv6+WLjUsKrm 19qd908eimPKaWG28pCRrWAtwiKoxXxV2IGiP27STZM4NWnxZjWk3lKmit5XC3Ux1B5sqj EDaijmEeii8RGPTzP3It1HWJaC5vIpsMHNyfU3C6cFxnPl3Z5ZQavmic9/Xz3W1plKUaiT /TaIhJaXoJyQsWM4oBMIkko16n60cjTvenfRqZVKCy7URiNgMCRkc8cHjn03jhJYfHT1Sr pIiqcSCj4ga26l9Dtt4Y0pzH37+rp3nwXd+rxNfopYSlRMXqyBClgKB8LOHu4A== Date: Tue, 21 Nov 2023 18:31:14 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Vladimir Oltean Cc: Jakub Kicinski , 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: <20231121183114.727fb6d7@kmaincent-XPS-13-7390> In-Reply-To: <20231120220549.cvsz2ni3wj7mcukh@skbuf> 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> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 09:33:14 -0800 (PST) On Tue, 21 Nov 2023 00:05:49 +0200 Vladimir Oltean wrote: > On Mon, Nov 20, 2023 at 01:37:37PM -0800, Jakub Kicinski wrote: > > > Is it an accurate summary? =20 > >=20 > > Yes. > >=20 > > For now we can impose the requirement that only one can be active=20 > > easily at the kernel level. But the uAPI should allow expressing more. = =20 >=20 > I see. That's quite something to think about for K=C3=B6ry. In its defens= e, > I also agree that this idea seems the most orthogonal to everything else > that we have or may want to add in the future, and is not likely to > become obsoleted by some other mechanism that can achieve the same > thing, but in a more flexible way. It's just that it's quite the task. >=20 > I sense it may be time to dust off and submit the rest of my > ndo_hwtstamp_get()/ ndo_hwtstamp_set() conversions before a netlink > conversion of SIOCGHWTSTAMP/SIOCSHWTSTAMP could even take place... > https://github.com/vladimiroltean/linux/commits/ndo-hwtstamp-v9 Ok I kind of got an idea of what is your prerequisites. If I summarize, a solution could be this: - Expand struct hwtstamp_config with a phc_index member for the SIOCG/SHWTS= TAMP commands. To keep backward compatibility if phc_index is not set in the hwtstamp_co= nfig data from userspace use the default hwtstamp (the default being selected = as done in my patch series). Is this possible, would it breaks things? - In netlink part, send one netlink tsinfo skb for each phc_index. Could be done in a later patch series: - Expand netlink TSINFO with ETHTOOL_A_TSINFO_HWSTAMP_PROVIDER_QUALIFIER. Describing this struct: enum ethtool_hwstamp_provider_qualifier { ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_PRECISE, ETHTOOL_HWSTAMP_PROVIDER_QUALIFIER_APPROX, };=20 Set the desired qualifier through TSINFO_SET or through SIOCSHWTSTAMP by expanding again the struct hwtstamp_config. Do you think this is feasible? I might miss some core stuff. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com