Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1312337rdh; Fri, 24 Nov 2023 09:28:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnEH9vCPqoOcox8yF5a4cQiVEEHixc1awhngiCtBY80k55CWQDOyecYkj3fiQhlekt7QGU X-Received: by 2002:a17:902:b7c1:b0:1cf:59df:257 with SMTP id v1-20020a170902b7c100b001cf59df0257mr3641243plz.23.1700846895624; Fri, 24 Nov 2023 09:28:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700846895; cv=pass; d=google.com; s=arc-20160816; b=CKgRSIDM8enyrmgpHIwWK0aN9uwEbbkgT1c3aPv4MMD/9mhLR6xMXlczlb53BbJOg8 av41uC4hmyrjrvuvaptmZ3R01kSn7g0uQdU68htq3INy6dzc6asLbWWTrcjB7sEig4NJ yKoNypuwVc+vey5jUBZBOIaeD2gE6UpNc+/mtkpy3FgnIJTGQJO95qMsSFq0UPAcQzi6 FElKC7UpnHq+hRJ4WNobSPUvrD0bRlqj1IAiemxoajvol1a1tDnPNnBH20DJuaghavhb KkM7R3rqmT0vVqWpKOiOCgSnaV0nJhwc3PJiiKXiyB5e3IwZ47aL4dhkgB0DnzOz9Bp9 fx6g== 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=qpWbXAwNAFXhYWLV4pokPM9F+JnBIAcMW3sm5smYZDE=; fh=vMPEqEVjIgp4/XXYxYw93jeMumKtoEh5VSlQciEEMtw=; b=KsiJQevSDwwj8x2dY8YkT1qsWpSs1vf6NFzxKaVFuNN2CAZF7N/SOx9xdocdOJSYYK Hk+Te3Pie9QLlrzR7n3lshQoYKyJXCwdkE9YYEBnUgLxDbf+heqtc0c1taLmyhLGrbNM w6Ml7AbSequODcsU0h6T0znQhI8LQHGvZg6HLRHCOiWgmhYUQ+ZyjvYD9oNqyoM3iHYm 9xdJdNkBiCKG47KU56dxc0FGBJBG54q5jnulL34qtRXqMaLAZnDii6hgKiajYkRU3LFD QKBXlrLG9RwTKLipTr6XgSkNSEvSrHJim35T6gEklLNo9TmEF47SawuGDHvKGITWLIpd C1VA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fbDsiiGD; 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:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l6-20020a170903120600b001cfb1dae607si62039plh.146.2023.11.24.09.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 09:28:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=fbDsiiGD; 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:2 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 agentk.vger.email (Postfix) with ESMTP id 2702781B5AB0; Fri, 24 Nov 2023 09:28:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbjKXR15 (ORCPT + 99 others); Fri, 24 Nov 2023 12:27:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbjKXR14 (ORCPT ); Fri, 24 Nov 2023 12:27:56 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2070.outbound.protection.outlook.com [40.107.22.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53385199A; Fri, 24 Nov 2023 09:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X5+dA69jbopPPKQPiu19v+tnlrTmL/6C0mC7VOTaULzZVbNjEdf8NgKN9jtOV3ihsfpaZ88mxcfgmu5Q94C2sU44xGJ+o0Oyh4DCtaZYAm7dWrXRYvWWl+y8p+vWPYFpjyoZPNLaiwgwkAXltu5FDa8OSCXc+a/FhD51/wbsl3w3Tsq4x5UNIOrbrCPAr+VLx8CxfA+ggKlp1JEbpaJvGXuJ6tBluNCfzuvIA0C08+Zx0FTAWMLKqu2Y7v0j6jWENYcz4057JN8lsgoim0yO8ADCsNLUaC4GYAVyn06mcqdFfXnfeqJaBGDiY/TqRPmlkuiJaz+1PHwFCYK48szaFQ== 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=qpWbXAwNAFXhYWLV4pokPM9F+JnBIAcMW3sm5smYZDE=; b=bR7LzQvNLq9HVxx+7/R16d1vpyxPchZt3v2bHJwoSBmtKUJ8j8HtyQDOW7Y4Gwtzl6d9OozZ1P9CkDB2x6Nd3zLliaKzVpFL9WvPbKcKEUheHnHv2OJerEtrtFNiELPvDrezSRjnLYLFTHx8an9LLxB7VJwQvXb0JewD+iicv3kj1uAXl/i8uBz07oi/372VYwj9BV3kYPkIMRa7Wxr790un2ey4ROHqzu150A3P39FiHLWgbwoIdFMOiIQhpGADssx1R13w9sLouBT9T8QOKUPQQB/yW7cFPIFodIHD+aD2VASFykL8K6vA9f5hfRB54mQDZVDLhNkDcjCuGeKPtA== 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=qpWbXAwNAFXhYWLV4pokPM9F+JnBIAcMW3sm5smYZDE=; b=fbDsiiGDAakKQBM8exePGqNDBZC5ZRB9k3eadNlawln4oVkuBTPZ+x1/fB7FmZ5jfSFPSzsScP9O+9ij3S/T11JbupuWbg6N93Nu05Njm2pflS27N+13QM3ZIJBH7L0eRjrqZopw+P57bLALTdAawM2ziEd9dzNFSFYyz7pL0LA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by PAXPR04MB8845.eurprd04.prod.outlook.com (2603:10a6:102:20c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.14; Fri, 24 Nov 2023 17:27:59 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7046.015; Fri, 24 Nov 2023 17:27:59 +0000 Date: Fri, 24 Nov 2023 19:27:54 +0200 From: Vladimir Oltean To: Willem de Bruijn Cc: Jakub Kicinski , =?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 , Mahesh Bandewar Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable Message-ID: <20231124172754.tneftor7uobrul5f@skbuf> References: <20231120220549.cvsz2ni3wj7mcukh@skbuf> <20231121183114.727fb6d7@kmaincent-XPS-13-7390> <20231121094354.635ee8cd@kernel.org> <20231122144453.5eb0382f@kmaincent-XPS-13-7390> <20231122140850.li2mvf6tpo3f2fhh@skbuf> <20231122143618.cqyb45po7bon2xzg@skbuf> <20231122085459.1601141e@kernel.org> <20231122165955.tujcadked5bgqjet@skbuf> <20231122095525.1438eaa3@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: AM0PR01CA0110.eurprd01.prod.exchangelabs.com (2603:10a6:208:168::15) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|PAXPR04MB8845:EE_ X-MS-Office365-Filtering-Correlation-Id: 289e765e-fc25-43c6-7bea-08dbed12b420 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W13Vh/6N+iw1aXd2AnCtdVncDF+SNM8N0q8QbHfpvYPyS7XSySNqO2UEPqQKwvqHOZElxzzTflNdGt5GoYDcHB2eGqtyfS6qHwvtaffOrHUB195LsSz6xyE51jqEpFDkAdrlmGW7lt+JYJUAgeSZnqSXQndb7WoCXaNH0mbFe5LOFMiq8rzX252gR57/Ho8cHj+zrRvu80jzizInTE9PzTDufy1AMLexPB87EqoWhG8gjbOB4rJGzUuNWCCUJt4NSV+xL8BiNQBwQ+NRMndd98RmZXnTuP3a+CCMHZGbLAZP9pemAzECEtha+/ia2zlBfKMVS3DeAcMt0LhrVcOGQjYKRX11iioiU8tozd/A9kKGQXt2ca5q7CixswY/0a6MNlpvrMW+LNbXJYkO9K7BcXVsExZYW4jZsOVjmvyNxDEQZry4fTAEE/Gug1HVhiGgQRhkzdf/iCEiMLb1jfYaMfK22VWrusaYiHyL81mH93tsaXU3hiuuS469dfu9vwhXaqUh6QygVMqzHEBnbgmQcv4pO/ggdjVp5kwBDf3KG/cI+1BzWcOkq1UEumRkjjUEeq2dNRjmgLzuiAIm4lIsQg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(346002)(396003)(39860400002)(366004)(376002)(136003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(2906002)(7416002)(5660300002)(44832011)(66899024)(86362001)(41300700001)(38100700002)(33716001)(66946007)(26005)(1076003)(6916009)(66476007)(66556008)(9686003)(6512007)(54906003)(316002)(6666004)(478600001)(6486002)(966005)(6506007)(4326008)(83380400001)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SNNyT4NY/zs1/8ZnMrQ2AcePNbE4FqkUie0rJq18UDLw7ZI9Y18Ct9ZDME/c?= =?us-ascii?Q?fjxTKFnbd5+xhHLw2idHAwzkKAhSgkIe8RqLa8CIVROJt1EV9/NP2BY4DO55?= =?us-ascii?Q?CSTJkf+ldfCssnR2s56GoPpy0cF51rN2NJ9pfxW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vtI4jkt3aifLF/kMdseh090YRQv5D3zucqMFkcHmsGRKwgB9rC5ux1VfOi?= =?us-ascii?Q?uSHPXEpkdEV4/EUa2STGbTNQsoC/HqUaR2WUfS3uUsys5vXJIxwi1bO7bjam?= =?us-ascii?Q?YIxkNGv+da5Prs33jzuSpztYcJADoFpaD9QJ9o/2Uhkwr1wkkamc5REwRPDk?= =?us-ascii?Q?KZU66BEZrlS5+/+Is0cofQfuufB9KXmzuntaQquHYGyFI7DWQmMv+RXfezLQ?= =?us-ascii?Q?gyTtcEhrm2bVeq6Mv2BKWSErlMWM8pOU+FtNVKXlH0l/JuTOmeYBmTEsQl7D?= =?us-ascii?Q?WYYsE4Ul0Wl0P4IEWJHbB66sbeYouNhlduoSbq+mjJixrQKTDXZTUueOtlyp?= =?us-ascii?Q?PxGya4FURacVVOBtoK+WobaB6KCBbXYL+KA3jFe4mtghQdeHdw6jFKhm4507?= =?us-ascii?Q?C0WIPrOQOK2IIxGf9+jVKwz1yI+2l4kfRTv91IRcoxX9zmcij1621UW6TKQF?= =?us-ascii?Q?5ba9M24mvi0EtukGKIvTr/rtdpbENjiyf6N93Nd52GvZF9iOM1Wgr78S4RPR?= =?us-ascii?Q?j1yy9N0nXXTk5s24jFxLqgkJ4kSg/6qwIbDCMRDiAhqszFyuNDwTNtSsWJ4g?= =?us-ascii?Q?HQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 289e765e-fc25-43c6-7bea-08dbed12b420 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2023 17:27:59.3607 (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: FxmJaiUxGbFPUTpDuATMXICG/tRkWGZbGgsyIdxdYz1ZMv8sUM4n1rbiSVBbXYmlzeiVqHbMvLYtA7dxUQ+U3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8845 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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 24 Nov 2023 09:28:13 -0800 (PST) Hi Willem, On Wed, Nov 22, 2023 at 01:11:02PM -0500, Willem de Bruijn wrote: > There already is a disconnect between configuring hardware timestamp > generation. Through the ioctl, which is a global admin-only interface. > And requesting timestamps with SO_TIMESTAMPING. > > Today the user of ptp4l already has to know that the admin has > configured the right RX and TX filters. That is no different if > multiple filters can be installed? (PHY for PTP, DMA for everything > else). Are you saying that ptp4l doesn't configure the RX and TX filters by itself, just the admin had to do that? Because it does. https://github.com/richardcochran/linuxptp/blob/master/sk.c#L59 I'm not seeing the disconnect. SO_TIMESTAMPING is for the socket, SIOCSHWTSTAMP is for the configuration at the device level. It _is_ different if multiple filters can be installed, because either we let things be (and ptp4l issues the same ioctl which affects the default hwtstamp provider, which may or may not coincide with what we intend), or we teach ptp4l to deal with the multitude of providers that a port may have.