Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp43967rdd; Wed, 22 Nov 2023 09:01:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGca5q1iTU1gHUrFVkJo8pWToRGZvuWI9KmRkHGMYXcWnPEN8X7Ifukd/1WuxJ30rNpbD25 X-Received: by 2002:a05:6871:4083:b0:1f5:ef10:1c2e with SMTP id kz3-20020a056871408300b001f5ef101c2emr4040970oab.29.1700672471378; Wed, 22 Nov 2023 09:01:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700672471; cv=pass; d=google.com; s=arc-20160816; b=PO+k4y3kFa53kQZrfaJl1fZaTLJxfeK9f9o2n4o3FvOkeVKxOABiPXrhSMPTL6BqIF sAr7QhbY2O5lEImNxuS3w/JiFp3Q8xsI1/mSsCUyuXJYlSeXyMIsH6tait7i8h0kbVAB QhOa09Uq4QquasaxlP67pO7C9HIwarV81/MkeSwQOCJ25qr0xkw6QDiHG+A5mVlYP5/P DnD8lLKx/CHLmvq33FQ6a3Hm1ofQ4DzwFmRyBAv/2wqPNL7d1AusunqX1+saUM2IKIpt h7f8LeYxShmSj1UxAHoZIdN4PRBmh2ToW1F9jL133qn33KDokYVV//UNNAzCmuKMfM4O X6rg== 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=NUw6tKfDlPb18z0VHI1Txzt14Y0sPQdkNz0a5hSVmeg=; fh=mlDiEEW4tk1mqE4L4iaJ2wpLfNu2mdnqqYAmu67Ksm4=; b=lddKZxYB1+9aXL/TAbE+2i86Sj5Sk6eV5AlUTVz6X/f+rCgyJH+QzYXpOKJcpnZkLZ HdkOUEeW8lJNtHj6bALmBifFS6QeJHnKWhO+q1lW8qvVU06EcvZrWcF1KYukXNCMLlHW GYfcbBavbIDcBJQPOr5Hhi3m5Sk8oMOM+f+yja1NW+IAJy/ow0PL6mSpgPgIEJoo7bwa MmXPG4OpPWcOlnWylSImpOzjCfhvd9z3l3FningK0H/S2j81CUQBp+SOHwV+sc4nnd1d MwRfdQNp9j6zpCtPAzMInQ19n8ctOYPFpBycZ3t5+yPTbmgdKTAGM0h7OOQtKCY5zkm3 sFSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mJ58GoWH; 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 23.128.96.33 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. [23.128.96.33]) by mx.google.com with ESMTPS id gk5-20020a0568703c0500b001d668fd280fsi11061oab.127.2023.11.22.09.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 09:01:11 -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=@nxp.com header.s=selector2 header.b=mJ58GoWH; 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 23.128.96.33 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 A6135807EAC4; Wed, 22 Nov 2023 09:00:25 -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 S1343814AbjKVRAI (ORCPT + 99 others); Wed, 22 Nov 2023 12:00:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231708AbjKVRAF (ORCPT ); Wed, 22 Nov 2023 12:00:05 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2051.outbound.protection.outlook.com [40.107.6.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255621A4; Wed, 22 Nov 2023 09:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c3q+ZwUTut7ohF5l/yAFunUpOxgCO1CVVoO/51BnPzeeETaVx6oEnkgrFahqUlgo6r7i6tKRFqWrffCBgJXM/eZgXqKqeBr9kle8Vz0MYrYvPHdsDuFwjngv8kyxCV/gRRbYm7Os8eis3gq+j4z3FjKDFVMKe6sXiIGWaGvIYfCgN0XorrtA9ZzcB+V3K16ULr3D9Z6VjtAp/K8YeUSUfROdJJ/eiFLhu9iRG/2yVMj1eZhYXJ2qLJy2ykiMa2wOC5LcynFcn5ToJyvPmirW2moomYa8EFaA4pheuVWcmYTH20JNNt9Y5Nk3tomJqfX4w3RlxyWuTez0YPl7ppP29w== 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=NUw6tKfDlPb18z0VHI1Txzt14Y0sPQdkNz0a5hSVmeg=; b=LsGyYv1ZhpPjUISLvdTT/yDzyeRtyMOxskrn4mxpu3auZWcyntQzpUN73MyOEiGnCXcoGKW3E49A7SNTxyesXvMRSq6SOQiS9gQyojUB+EdQLuHQTkfrBfg5yFAePQM+M2DdJOEGWCP9qEplYSDP7BMT9+2SgNHfsvJQhGgsHVRjexVgtPC2X6P3OMNiuIk+juG0j96l0hzcFiiNntKl3zxfTPVfFasOPjKVZXpKzTC5zJHFevTVlaA2qDwgqtbLnn69on5XJQwA5H8cWwwl4eBHsG/baDS5IHtSxkXnLcsL435fdCD0OaFt1cnbZtkN1CBOp2DQlQfhk/Mb2rzezQ== 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=NUw6tKfDlPb18z0VHI1Txzt14Y0sPQdkNz0a5hSVmeg=; b=mJ58GoWHmAs6Dkpp74ULo0zg7To6IFcqd3xuPCIBsjERoemMN9rQ4CKrMDboCHZg0V+gXCI6bnseImzvHTJXB5ANPro1fdCj/AAwVUgmD29J/T++g0Wt20OfK3e6gXhDSfTQAbg7r/rnvxMkdjRx2I+X8/GTaUzFgcf7QU7R2IE= 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 AM0PR04MB6866.eurprd04.prod.outlook.com (2603:10a6:208:183::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.16; Wed, 22 Nov 2023 16:59:59 +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:59:59 +0000 Date: Wed, 22 Nov 2023 18:59:55 +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: <20231122165955.tujcadked5bgqjet@skbuf> References: <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> <20231122143618.cqyb45po7bon2xzg@skbuf> <20231122085459.1601141e@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122085459.1601141e@kernel.org> X-ClientProxiedBy: AM0PR10CA0111.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::28) To DB8PR04MB6459.eurprd04.prod.outlook.com (2603:10a6:10:103::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB8PR04MB6459:EE_|AM0PR04MB6866:EE_ X-MS-Office365-Filtering-Correlation-Id: 50f2134d-f698-451c-54b9-08dbeb7c7640 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AfvVjSdPxydT9Co3LL85Iyar/qeRkrBn/La0vNGJHx5/1bUFy+pfIOhfuCkWrYyI3fl0CS/lfaImOH+GnGABaLDiAcqGAE3QfWRzgH/o/nQhiUYunM0bOhlN6IgiEhUhvq+4l0TBA0ONbFeTXvy02rjp893RJA8dlheIchjy6uRZfJZP5IU02p5/UYU1OgvLlmIB/Ym1p19Kzx+f3xLRQXE0WJDcBnAHB2+44iy6fttUDFZVZw0UMA/zBVvn6IamRbd/Ieel1YS8KoYE0uoYIRza+OPjz14UzCg38WmvgErSOcf71dvcnuI9lmfTtn9d1DcUDmy8NdYcmJm9GF3QkJ1yQNHj43PvvWw8Zw5gqfWvwjyUfCQbLnCoIaMMdDqmXQ78XIEFUfOQrm72ozPk2PJb+X1lJLcNtNgNgRGqzaC8Zb3H0MHqZArNHTJqxIP8aKHMoCB31G+dmXTTROQ0CSHrGDz2dqy9OHzjPp4ngjtGkRc3daA6mXkzlhnnpUVYM6S/BgiOmaTKVtbhYXDciPQtZ2lDJYCVvNJtJlovxcvtZDbh+L187Ba26AS3RWv7 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)(396003)(366004)(376002)(136003)(39860400002)(346002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(4326008)(41300700001)(5660300002)(7416002)(44832011)(86362001)(2906002)(33716001)(6512007)(38100700002)(9686003)(6506007)(1076003)(83380400001)(6486002)(6666004)(478600001)(26005)(8676002)(8936002)(316002)(54906003)(66476007)(66556008)(6916009)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7vgdeN2UK86kWuyf7vuAEbhou/D3IDHAx6hU2ZQ1ZcVi/ZF681ih5nomO4FJ?= =?us-ascii?Q?V/k5fFzC+p9WVUQYnUSCWriW9HvGqskCKznAh4r9Uet1QPBnXo0QDV5he8Y8?= =?us-ascii?Q?5mTb5py9xVRobK/+UgmB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ascii?Q?93xOUMAe4Dibva4ekJhmKFoUGKWBGZOvRGHdgnx8fXODzMvNnfw2U8pI1OLZ?= =?us-ascii?Q?0j2wILyu+iqpOJ5mgknI+ozGoKa9/U87V/5aRBnBLf9nTPs9nH9ixcmzByuT?= =?us-ascii?Q?vtZ8C7J9d2UT0/hiXSDD3U6Z/frCKhNQJDvslfYy353jCY4tdcoO9zCwq7eX?= =?us-ascii?Q?ByI1JCtr+5G1ubOwymHaKqikIKJnZKah07yzAamgaGTTPQEVlktP7/b3s0eM?= =?us-ascii?Q?K9iXtsMVmLKyK/5ieUr61Mi4UaYgvzdl2M4FpWdIcaVadd4SBu9UsM0Ghn2t?= =?us-ascii?Q?XDdy+7fiOCgCf4U2wcRlOKwGXYi1rPogSPZsfjbVDC2OlUcb3kg9mgkLbJr0?= =?us-ascii?Q?lqyNwSc9F7iSNRudpvl9JjOZfUgNNjTKJvyKI+OBNesH9jt5g9rlUrDhNuDq?= =?us-ascii?Q?rC4IbJ8knT7J074iI0F6Gs2MeHkWkuuf3HA4Ewalt6mqBo0vJfMwjmad4Rhk?= =?us-ascii?Q?L1nuKiFCutYCNMSz/JBow0bUxCD4kcmvUXhDf7BsO2ZDfUiBK3MoZCUudeeF?= =?us-ascii?Q?068UQjDGS0Hoehe7uGyHwechn2PClVr6lNYgiGIxena0HtczvfD0NlVZlFZ6?= =?us-ascii?Q?CQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50f2134d-f698-451c-54b9-08dbeb7c7640 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:59:59.6588 (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: ahUjPPpln3PPI3/5/Oi1lJZNHwT1x4XG3VVDxHv/Vo/y6vPol0HqOTVkMoksojHeteAp+GIj/MrRcuq0DXZWJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6866 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 09:00:25 -0800 (PST) On Wed, Nov 22, 2023 at 08:54:59AM -0800, Jakub Kicinski wrote: > On Wed, 22 Nov 2023 16:36:18 +0200 Vladimir Oltean wrote: > > @Jakub, for your long-term "MAC timestamps for PTP, DMA for everything else". > > How do you see this? I guess we need some sort of priority function in > > the UAPI between hwtstamp providers. > > > > And even with that, I think the enums that we currently have for filters > > are not specific enough. The most we could expose is: > > > > MAC provider DMA provider > > > > hwtstamp_rx_filters HWTSTAMP_FILTER_PTP_V2_EVENT HWTSTAMP_FILTER_ALL > > tx_type HWTSTAMP_TX_ON HWTSTAMP_TX_ON > > > > but it isn't clear: for PTP, does the DMA provider give you an RX > > timestamp too? > > If we phrase it as "precise / approximate" rather than "MAC / DMA" - it > seems fairly intuitive to give the best timestamp available for a given > packet, no? I wouldn't be so sure. The alternative interpretation "for PTP, give me timestamps from both sources" also sounds reasonable for the distant future where that will be possible (with proper cmsg identification). But I don't see how to distinguish the two - the filters, expressed in these terms, would be the same. > > What about a TX timestamp? > > I was thinking - socket flag to make packets for a given socket request > precise timestamps. So the ptp4l source code would have to be modified to still work with the same precision as before? I'm not seeing this through.