Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp40735rdd; Wed, 22 Nov 2023 08:56:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzHH6ZCDKwPGId9Xvu7kjeTgZMtzLrIzCMlkhpZ6s//CytDJ7SBYb8SGIypTtC/rcoXYJm X-Received: by 2002:a05:6a21:6da3:b0:187:bb9c:569 with SMTP id wl35-20020a056a216da300b00187bb9c0569mr82801pzb.5.1700672168837; Wed, 22 Nov 2023 08:56:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700672168; cv=pass; d=google.com; s=arc-20160816; b=EYjHpibaKfQa2Q2JBzoibps8cjNVmqp10fRG+y/HrY/TooaFnPoezGZkzDNNzzvLlW dLoNCEeDXhzevw36DK/36SYA9Xa7oE8eiy1FnvKGdiDxtsQOZZSVi1w0SO46ZdTc2Kqd 6WEK990v11mgCZk2My1NhXTYWX/T7F46XqTHcIAwXK7l58YJhqGwA7AAkypYlKMP+nbu Tu2eFDv2WenV/OoCFAZNtXMf18osRqb7/E6Zrupdkx6QBtkdvFROJQDiupaYfH8VnBhI wvgYc6qaMJj84fH3Z3YqGTTwIwIg9y9rV/OJ19mF1BEkLsEmGGDG1NtSRkiSqYq8QZRz ww3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LC6/CCI19y3mej7aCljpwZtqahgDY7XfvYwJKEZSQ6E=; fh=mlDiEEW4tk1mqE4L4iaJ2wpLfNu2mdnqqYAmu67Ksm4=; b=k5cGWnv2zUKdUbp4sVl2g77SpVsNqmPa9Iow0xau2GWPvVhN+cyLi36m7xb7HXDGjQ 0NNrZhaR4GPJguKaqoD7YBUqin+ps83jp5mMX2N6r/ne4ZGJs/ZzAv9OETWBhEVv0B4+ O2ouuXSrh+BZL8iVojQWVhZHJ/tKoqwCfW89DJhykiEshX766jxyQum7mHLc2W94NssH 4jBrjf36D4ZVgyWZ7+tZpuoA6Vs4cMomcHxrU69QtlXdfiFD/GVeo9Pd7qdXWCssUHRK rutlUqcem1r94BHHEA7QkSeaF59ZPDbFEwv1HzQcFl41K7Jmnf+jPdFmuEX4i2ATEjBH rFwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y93y0woH; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id d12-20020a63d70c000000b0056336fb99aasi12580121pgg.850.2023.11.22.08.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:56:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y93y0woH; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B71DC8073860; Wed, 22 Nov 2023 08:55:59 -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 S1343840AbjKVQzg (ORCPT + 99 others); Wed, 22 Nov 2023 11:55:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343845AbjKVQza (ORCPT ); Wed, 22 Nov 2023 11:55:30 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2076.outbound.protection.outlook.com [40.107.21.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E239197; Wed, 22 Nov 2023 08:55:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCjKgZc7l7ROGmaDYkLoEh6IxvZlOdnrhua476vWM2JKRLxqxwerSQSXNn9XzyXWlKpsOfKoHK3CCimvzZOcZOKOIlafe3gkEjk8br0Pb+ea7rpkHrysJlIrTbAJXDERGbwdLDVJoZRcrqJ2zHDaSfuGDAd4eoQtgSrW48aEWPyLqjDqLToGrdrHYC6k63OuvWIj7xkNMZGAR4lKSuoRWFTDuMlyz+rqg+SlZ4yQFpC0sjVdb6PtA6oUackPZKGTqxktHgpzhIRuaPBYlqnO30BGPoRYOjSTRmKMOBYjLrbnpONz2lOrUGUAKQOAPd+0gmsvW1jGfUMu00e965njJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LC6/CCI19y3mej7aCljpwZtqahgDY7XfvYwJKEZSQ6E=; b=iQujh0BJb7YSsMz5n1m2dFQWMn+yndNjVW5/WdFpAvwxdUxxGPCLyzu84vhRZxhLflnXxv7pIvg+tXCzX0kZsPmTiLMxmjypGkW/qKdKZ6OC1NtpZs6M4Sz1HPaq61o7XuzETCbGdl46QOfXB+CurrmpQKvv1Ukb1AqMT7CCfrKjxDeXWIZ7tOmrBDkzlm0ndCWFb+Yxc26+6iO2gecAjLOOO27b4oFPUEK2noIrR0Sj2sXkchEF1jvUBwzrWPcqFy5tBfedytcpNiQhViLFTwPw1NETAgrBPtNsd02z3cdGHKlR1rdd5yvNqN362Jwrk3MCYxK6hq16stgiCf0HWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LC6/CCI19y3mej7aCljpwZtqahgDY7XfvYwJKEZSQ6E=; b=Y93y0woHp/80uAmmcvvRlNmVjbengLd5rrtKPDBBu7kHUhajzXISTrc5sa4cUZOBzf5fsP+ETaPze885LahQqcVLFEgF3saAAiEYIzkF1QHYDxrbTjw01S45h88DfRmdy1TC0D/lK4B+zH3KwtMiQkHUti83DshH+k+xpEMgrzs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6459.eurprd04.prod.outlook.com (2603:10a6:10:103::19) by DU2PR04MB9212.eurprd04.prod.outlook.com (2603:10a6:10:2fb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Wed, 22 Nov 2023 16:55:22 +0000 Received: from DB8PR04MB6459.eurprd04.prod.outlook.com ([fe80::4dc0:8e9a:cf2b:137]) by DB8PR04MB6459.eurprd04.prod.outlook.com ([fe80::4dc0:8e9a:cf2b:137%5]) with mapi id 15.20.7025.017; Wed, 22 Nov 2023 16:55:22 +0000 Date: Wed, 22 Nov 2023 18:55:17 +0200 From: Vladimir Oltean To: Jakub Kicinski 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: <20231122165517.5cqqfor3zjqgyoow@skbuf> References: <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> <20231122085000.79f2d14c@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122085000.79f2d14c@kernel.org> X-ClientProxiedBy: AM0P190CA0013.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::23) To DB8PR04MB6459.eurprd04.prod.outlook.com (2603:10a6:10:103::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB8PR04MB6459:EE_|DU2PR04MB9212:EE_ X-MS-Office365-Filtering-Correlation-Id: 655750a6-22e2-4e4a-12be-08dbeb7bd0de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CnDAdwnE2LhK6++6JLUrMzwkqaOaIarRtMxlKc2opeKCRm3nBWw62UW3azmBmDDgFUtPK4iqCRS27/d4EtIMHkg13b8zjpOAxWF3rhiwZw+Mk5AEbGH/m6etupuYNoepX7kcP+VUmo0+s6VwrGXGnJ538eqtAd6/ekNqo+RmwVFIzFFkWf9kxw/vLpkfbbM5M4XTOgatbWs73bZUdZDQXu3BChbwNXlRzkjqKYL8BqgsG1RlwZGyHkk7JUfMIdRPqUyQxhRMki1PYI/gnAjS5Hb/pD473n6fvgud71iteJzHmtU8ayB9yMOkVNL5sGOQ4cN+ZzbK6in5dZRF80Qu7kwTc4hNyJlTbNrPlAJACpctehbbGD14Bek0gTPwJvZr6QP11pxdxljcUG8kUNeyupkHtN+m7Cx0vdamO+SzhFiOnydhB4nKA0XQp77gX/gxeJn+Mj2xLDwJbSkfP5dp1Ngt7ei5iFPNn9mEqOdPi8MhDPBRiznnokGq3jzGuIWDjT3OFF3oUBtiRyyCN3qpofRGl+QAkbBVhsUz3o+QoIbB5Z6J0cvcuasjjSVGgrVA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR04MB6459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(376002)(396003)(39860400002)(366004)(346002)(136003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(66899024)(1076003)(478600001)(6666004)(6486002)(9686003)(6512007)(6506007)(38100700002)(86362001)(5660300002)(2906002)(41300700001)(33716001)(66476007)(7416002)(83380400001)(6916009)(26005)(44832011)(66946007)(8676002)(8936002)(316002)(54906003)(66556008)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m2a9pjJXkd7w0PzD98IUjLNi91LCnddJfo3/oKfF0F4IhCeLgkR+r7zIXoNs?= =?us-ascii?Q?gWWe+6/PshIkMptkSebLYB+/uJmAjEo451bECyKpBD+EV210h4L7GawZISoB?= =?us-ascii?Q?kIgZoMMUO3ErIdX4g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JPp00oBuIFcA?= =?us-ascii?Q?cpkUtCxTxX65AuOnIDc7dDz421sVQMlaXC06iUwU3JUWtnDZlRrLvze7aFAz?= =?us-ascii?Q?+s5ghFDRKAjZ1VHQ0AGZc2GH0tLvihGemEJguaRg8k5dduD7CEWs1JCQ/6bN?= =?us-ascii?Q?ZXto90244/fZLtfcLl3AqlF8copysWDruvgDqyrZgpEmpfalmbNoZ6AlH97m?= =?us-ascii?Q?nKSTXiYy99BHVXi26Uv2FylVn1YN7cVqQOb0DzSXMxp1DVJYZhWV/lJ+eyRI?= =?us-ascii?Q?3u8w+E7DN1Tv+6PjKZSEWm3YYWcW1m3kzAlqq6LByJlWgBYn/GsV48Z3LHuh?= =?us-ascii?Q?Py+7kuo3AomiNpsculy3bNqrfpZ6d9MvGUtHkxWll4+knKilZonUtcWxhzUJ?= =?us-ascii?Q?47ht2fZ+465SC4Qk+o5xPjX2aywU1FaGNXqNkqiJ0JNgfGykGqGlRf2UjZ2W?= =?us-ascii?Q?Yu+kKfed4RNyCfLsmDVmTiNTOdFbvoCdUBqfxW2PlZpYEJ6WtdwMMJ6s1t9V?= =?us-ascii?Q?xYIRdcYqiVTOAbOt0OOtzkBST6eCwEjwI8PkD4ZAlFepjSA2kuAHve8kUaUY?= =?us-ascii?Q?CoUcfNDmr62X5lH0uQiGSs42eZ44EBfL8/vk5r51c1fzw9vPi6SBZf6ThN6U?= =?us-ascii?Q?FA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 655750a6-22e2-4e4a-12be-08dbeb7bd0de X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2023 16:55:22.2408 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IP1vdJCu7pWdcvSuBO06iqVbMRd5UuE1/W7O/X3H+p2AMqpadhh3QbYp0tDlFldbk5/WCkuViEobpoOrbKsDog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9212 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]); Wed, 22 Nov 2023 08:55:59 -0800 (PST) On Wed, Nov 22, 2023 at 08:50:00AM -0800, Jakub Kicinski wrote: > 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. With SIOCSHWTSTAMP also implemented by CAN (and presumably also by wireless in the future), I do wonder whether ethtool is the right place for the netlink conversion. I wouldn't suggest duplicating ETHTOOL_GET_TS_INFO towards the netdev netlink family. > > 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? In the "implicit" definition of an "active hwtstamp provider", yes.