Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4624716pxb; Tue, 25 Jan 2022 14:50:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoKu4jFatQlmtVMFZOCQj+gdw2TlhHUzWXx5mVoHt5VfRQedKCWWWHi7mxMkGy0vr3pb9H X-Received: by 2002:a63:eb42:: with SMTP id b2mr16668005pgk.393.1643151036553; Tue, 25 Jan 2022 14:50:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643151036; cv=pass; d=google.com; s=arc-20160816; b=G9xZsGdewJHQXK1xBFKAJvyhJl6diqT1FYFUXTQqagEki/eHPACVmIDLBQCcNnMHz1 cMsUceG/vcVFaEAV5HAHlB9c0nZPqxizz3tuQzcCaQp6OKXqFe4+fFfwWiRyjnecpX0R zqYJvMzsn4uqvG3XrbtH0thxHxrA+rk50ZYemz/dPxY0Tr6ONTO5xaAjUDoMd674dJWC ZoP83wZFUTEIu8tJpDBNbU8cTCXxt/dk9hl1wLagTAnLrmDocOVeJsMOSAewcE7GNjBK oLwdiDsuFlJGQndTSU1g4v6Wiemn2+PhtY7XV/d4OP/JRgWtuuaB/UrWg/9UscaiwXE6 obKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=3QcQs/cWeWLQhESfBX/sjyRVYXbwe2ACFDzcLkF75wo=; b=SCFezqfFN/JxUBBLwWCY0ZyTpGW+ZiyShiFZATAskYV6v9qU9kRjPgFoo4xG5SkoU7 1OpaYSIe6rimslpwHvo/98k9q6psYPeCleCQSNiw+oEbhueAJ6wT78rmQW7ywf6g1sTj XH4hgyHVZf9qv+u+w85uUxKDAmVnHGT8lYHMATVhWRhCeieo0O9sQHTexcJ3ZLIJeVq9 CN/CX3zMk9wF15GBAloIaClZjmaUq30gxwR0LU8OELrI+bByKdBaxQzpD5+BE1X7NvUi 89R6JAxacvA3iBmER70W7enPd46LZxyYxeJQI9mHhAmlfgIJiljD60nFdJRNUKiZ1vTX c4MQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=NO4tYSCv; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si15951484plp.15.2022.01.25.14.50.24; Tue, 25 Jan 2022 14:50:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=NO4tYSCv; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380660AbiAYPjj (ORCPT + 99 others); Tue, 25 Jan 2022 10:39:39 -0500 Received: from mail-db8eur05on2051.outbound.protection.outlook.com ([40.107.20.51]:15073 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1385355AbiAYPhX (ORCPT ); Tue, 25 Jan 2022 10:37:23 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V+Lb0uQbtewCw1VWKZpTJdJ8ARCCyf4e1arXWKJxNb4jYgg91HTSh9+sDwfpQtTZwLju0W1W1axlptt3QvFrN+56dUCYSWKIvgecthDt7Lx9iwXgqHGteQ7NAsjiQJaZc1rA/SST7p3JawVvHOKZ/GAkx7rT6mF4644KT84rXBv0WqpKIvLjDfIzm//d8Y02IawkSoHKRO8nz9vcv/chx1luVCZLteEwuEP3pwqK7+nrCk/fIb5aMVm/DT5P29yczjPhBvMsyI1eGzyblfhMmKCSc/a8qPqQza5IWKgRiDE7JCOlkOo7bZ0XeaGSIpn/sYh14HsMdjTNkvW+hLUg3Q== 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=3QcQs/cWeWLQhESfBX/sjyRVYXbwe2ACFDzcLkF75wo=; b=DdOjg1zSAv0J1OORi+Bfb0lS5huXN00sK2qeS9Ge0uFGbbpvzDmA6aMdMa2ZJlYGzXVIVsv95TsT6DOXZ4djBKkfT4ZB84RnO4z6xIpthXhkRqyrl0HG2Zsocb8nPcrqZjERapHhzRBwhUsdNoAYabGki//YJm0+vBrTHylbBsK3dZFclFaNT5++RCrbblomofwwKHhc2IpHD1wnS6L1qDgzm2mPRcec8APs2fb8TwqneVSSpFmN2Bwy06fWkzhrFWICnytW7r4cq+vVtturK6dvYWYMVZ47Sj3Sr4fZzvGWy5JE1JhxDTVH84xc0kSuLECWvMxYGD7kRXU+BL643Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=3QcQs/cWeWLQhESfBX/sjyRVYXbwe2ACFDzcLkF75wo=; b=NO4tYSCvvSYa+Tj4+qd2CNzyfI3kYHMNpKrxY03rken0gApR9OJTTIWF83PbK88gCUleElcsZHhAa3oiXDMXzjJmvtP+je+js8YpB0sTGHuoQR056i5jfVHhjNjkmYT8pA3dFuo+Fpo0Zx+S0+8mnxNjyx8+k0ivvxRIPrRiong= Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM0PR04MB6115.eurprd04.prod.outlook.com (2603:10a6:208:146::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Tue, 25 Jan 2022 15:37:13 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::f4d7:e110:4789:67b1]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::f4d7:e110:4789:67b1%5]) with mapi id 15.20.4909.017; Tue, 25 Jan 2022 15:37:12 +0000 From: Vladimir Oltean To: Richard Cochran CC: Miroslav Lichvar , Andrew Lunn , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Miller , Grygorii Strashko , Jakub Kicinski , Joakim Zhang , Kurt Kanzenbach , Russell King Subject: Re: [PATCH RFC V1 net-next 3/4] net: Let the active time stamping layer be selectable. Thread-Topic: [PATCH RFC V1 net-next 3/4] net: Let the active time stamping layer be selectable. Thread-Index: AQHYAPlHUZ7+aaeSVU6jmUK14JiGzaxsOSsAgAC1gICAAAeKAIAAtFaAgAAKjACABFJtgIAAZxAAgAGSUQA= Date: Tue, 25 Jan 2022 15:37:12 +0000 Message-ID: <20220125153712.dnujk6k3nfxczmi3@skbuf> References: <20220103232555.19791-4-richardcochran@gmail.com> <20220120164832.xdebp5vykib6h6dp@skbuf> <20220121040508.GA7588@hoboy.vegasvil.org> <20220121145035.z4yv2qsub5mr7ljs@skbuf> <20220121152820.GA15600@hoboy.vegasvil.org> <20220124153716.GB28194@hoboy.vegasvil.org> In-Reply-To: <20220124153716.GB28194@hoboy.vegasvil.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 88876fee-c9a7-40c0-030b-08d9e0188ed5 x-ms-traffictypediagnostic: AM0PR04MB6115:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: D6xyiy3xcZzfia8+5+s77vlioJf1KaRgs5FXr3KcZsqALdkAy92MGvx5ike//7Lx1iJAOKyTXSgpwkKCWlDp3pERx73qHbstSTbjKNworB8S5tJJ+Bi9MS1Z4jN9ndiDPDao/j2es5c9ZuUhbWBpqHQnUz8ZkFJjokcU6Vdl+OTdyrCtTgsn+rNVRwggBc67o8iYXCXymc6jmeJi8+POGwlfGvBUY8jw6A13DkYO/tul1nwl+/V8+TiK9TlJgNst6tES502ATSXamMb/GQ59Ztwqaqn89/yH6l3AN8wU9yHSnUFuDaGq2eQ/5tizc6yFJqW6J20E25Ll1U4kOl3JX8otmqylWYJ99ojhNUh6EYdmrfx1YRzMK7Gb9FV3dG66BmZbRdhDO3Q00CSE+mjlM7R05954+mxK4+9wm+/mxEIfB+bSCGY0fRH7NJ7oaUnwvg9GB8iPVR8dng+sMoB2o+Wshqe2y8lna1W/dQ/7/7tmbsa/o1H4I7Rc1CMHFCNv073yDGHV278jpobztIZUhb2qFPlt/fC5qNG44YMJa/KbcqS2WADNnlCLJFwAEFwchtm7l5nXrT9Lky206os916OZIaNEIqtMexiEysqxvPGqiTpq3p8NbCcodViTlIT9TnjcMfcFEWXVAs+3URpwy6mZvhzrx93HzshZx1E8TSPe3LCVFqoqG0FHaX5J5AY2gccQxg4y+QznaHaspAXryqob+xnb+BWQQEN1fiyHN1k= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(4636009)(366004)(508600001)(6506007)(6512007)(9686003)(44832011)(2906002)(7416002)(86362001)(5660300002)(38070700005)(38100700002)(91956017)(66946007)(66476007)(66446008)(64756008)(8936002)(8676002)(4326008)(6916009)(54906003)(66556008)(76116006)(71200400001)(83380400001)(1076003)(316002)(33716001)(122000001)(26005)(186003)(6486002)(268134005)(20210929001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1mG/WmVy5Ao2tpGM0Iuy46/sUfTtngPEstvLlUNPCkpjNc66n+WwEH569lng?= =?us-ascii?Q?NSpnoN12rU/5SR8MjCFesuuOlVQym+h63Di9UYDBm87UcqGNVoKywRXmKTUa?= =?us-ascii?Q?eyYnwznvMIyindma1HlPgXHs43qK/O11P2DK780i94xMSNgtaW798diH68ex?= =?us-ascii?Q?3YtVY4DMolAw5Mj4ctzcIuNLIaNAS8dbTib7zdjHFBV5wja6y3cLhBltnx2h?= =?us-ascii?Q?g2KbwShH30eEwz9aUl7wk0M4qiuo1xzDFQ80tAjuy8sJKUumv9t3hb2Rk3Oc?= =?us-ascii?Q?6X1LAaNKahEUMyorEfAkGAPztIH6c1ZM+CeRxqG3/w3jvIAxECH0f5NCNKgP?= =?us-ascii?Q?0j09OAHgRqRNh96Kv/o7GdoheHSqc9D8mee4V1HgBVoH4phsJiVWMUEuELC8?= =?us-ascii?Q?jl8CBXat23QeM7693I4+G9fuxYJwlWIh/K/03jPFACtSusC0uhoAPmRaxsml?= =?us-ascii?Q?EQb3KitKLRXF8gXHUOfBfy17UM4AYjy2/uopwVWBuZ16GlgbZgTdByBVPff7?= =?us-ascii?Q?YZwAkSx2JILiIiKFVeCK6wgCpTgb32YN8IBlL83ExgXdBUnmq6qQKenKp3/X?= =?us-ascii?Q?hFMbX4a0BmqdVD/Rq81Q4r8Nu0tjT5BccLkepaR+YzhY498U+X2UqmYf6Oix?= =?us-ascii?Q?C3+Kjn5KFFibYABhlT+1JiCDb+xIrE/o0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?qsYI6XLEgZFydZY+mBuDm1V08/My/OSodMckYOY032aQq6dzJIipYAkSh4Xp?= =?us-ascii?Q?2fJZy+DELwPRF3slrgqFMs8=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <049BA5E7EC3C3448B0C6BB0EA42C6EFF@eurprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88876fee-c9a7-40c0-030b-08d9e0188ed5 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 15:37:12.9016 (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: sUQ/WE/itsNiXhx3vK1UnD9u3GLPpSdvoOpq/51BdTRbFTpn5kuv1usXEbhVIvUjwsXVtdE/WdLherMSelRZJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6115 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 07:37:16AM -0800, Richard Cochran wrote: > On Mon, Jan 24, 2022 at 10:28:23AM +0100, Miroslav Lichvar wrote: >=20 > > FWIW, scm_timestamping has three fields and the middle one no longer > > seems to be used. If a new socket/timestamping option enabled all > > three (SW, MAC, PHY) timestamps in the cmsg, I think that would be a > > nice feature. >=20 > This won't work because: >=20 > - There would need to be seven^W eight, not three slots. >=20 > - Even with just three, the CMSG would have to have a bit that clearly > identifies the new format. > =20 > > From an admin point of view, it makes sense to me to have an option to > > disable PHY timestamps for the whole device if there are issues with > > it. For debugging and applications, it would be nice to have an option > > to get all of them at the same time. >=20 > Right. Those are two different use cases. The present series > addresses the first one. The second one entails making a new flavor > of time stamping API. I agree that they are different use cases, but with the runtime PHC change being now possible, there isn't really a clear-cut moment when an application can now say "from this moment on, I'm only getting timestamps from the new PHC". Especially when you switch over from the PHY to the MAC, a few tens of ms may pass until you get an RX timestamp from the PHY, and the MAC PHC may well be up and operational in the meantime, and ptp4l synchronizing based on its timestamps. I don't have a clear idea how to put it in practice, either. I'll think about it, but the problem I see is that the phc_index reported by "ethtool -T" becomes a fuzzy concept in the presence of multiple PHCs. Adding the ability to retrieve timestamps from all of them doesn't make it any easier to select which one gets reported to ethtool. Maybe there's room for both the sysfs and the socket option after all.=