Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1061709rdb; Mon, 19 Feb 2024 03:06:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWu3ZB6txoZOjH8IggQDvEQqOfUSE/IevOBhUwF78BNHrDDwXhVnarxuyjqsOGDssZ44TL5eildjtWVfpA7WIH4sSAwo4U8eBPkdgzomw== X-Google-Smtp-Source: AGHT+IG+RiFfiqfMwHwSB6avCJ+Q0Jma402u4BCfTdm9JK5N7ul7g5aXbOqhiurTeGVrJTiPdbNV X-Received: by 2002:a17:906:c10f:b0:a38:107a:94e9 with SMTP id do15-20020a170906c10f00b00a38107a94e9mr16245580ejc.2.1708340795391; Mon, 19 Feb 2024 03:06:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708340795; cv=pass; d=google.com; s=arc-20160816; b=DpmQG8rro9tv6H0wKHfuJAvXoVgNYD8HjQhWCfLtwThD7Pe20MtZxo10CUXDd9nJMh 56dyj3mdti0bDMPvQsHggaWnx17Vcjx5z0bxfvzc9lugrUA+lpP5t6CwcMhjlYywwR/t yhNhIATES24N5gaHoQBpDKBIzxge0AqWFC9ezCgr9beRWj9loyoDz+ALFBcUY/EhvJNE qBDqHBaM1mgFHLaeHiJs8kOhVFqn0NYUaxdcZ9VLXSXO88knFtcfNga2d17n5BF5jqBi 5/oc/y5TJ8mohOItMYMKFNCgQjYpsTjAaCsp9GRWloAfVQcTJr0ZYep+V4dzaK0Njc5F jjqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=kjw46L82Im/+NbPXXzGcB4oRwbdkB7kHEPgjm1bWJJA=; fh=gAoIroghWiRJdbfP9MRHDKMa62fQ0LGj55Hq6vdTQYs=; b=paHV2ndIC1CgZ0cQkTmRX2bBqUNP86F8U3jqI5qJjrByNeP9vLMvYSwZJGRJLUtx+o cmlHsyV8rS0q3qfwRMGwvYIkVzgiI3JONAy+dMs4qWIEnKsOsbUthDAAe2ATVLeFP30L 0iBSj5YfKF15Wu501plaUEWnbnhbiSXSKqMc3ZGSEzn0D0/NEntF3LQpzrQ4xVwBSUA5 JOQwNm5O6duhUgBJppn8Z8LefmN1Hwdy6MnISys4V5nL++rttX8bpVupnu2qSmSSMtmP tsGffEX3T8lgGiS7lhWLY+PoJOqZzWfhBhPclXiaMC5tJm11AA9Yj7PD7GgMZoXBm+O6 nWuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nI38QFIL; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-71159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71159-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j13-20020a170906278d00b00a3eab698219si515577ejc.415.2024.02.19.03.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 03:06:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nI38QFIL; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-71159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71159-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8E2151F23BB2 for ; Mon, 19 Feb 2024 10:57:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB9D029408; Mon, 19 Feb 2024 10:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="nI38QFIL" Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92D8628DD0; Mon, 19 Feb 2024 10:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708340263; cv=none; b=Yu7pkKsJreqQCxamdgrOdWNBNICwgAYNmkUBg564lsOpXzu6BzUETkYwokrp52SbLH9P29LArdfPTjahT6t4O3I4y19Ms9vuwPIN7oVtZMCmnT6b3/whLltIGhNXn0YJz2yUCc9VscUP6d9yDfwFgEzCVCaYQKADEb7qYs8ilHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708340263; c=relaxed/simple; bh=FsRYHVbp9tuQHI4J9Xv48IZ5RPikPqpgiZ6BV57fJt8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pzF44WFTaOUOQLSiSocguXZa/KjYOicLwyt1J+aaHJjKMs64F/G3dfTIsDQKquRIpk6rWqtRWCoQN9ycyCzagnvfdFFc3yxkaFYjxbufn231b/OdagJWip3ImHPohxO4S6rrlPVIdHYkpNHei692nHaV0ioNr6cCYVPac9EgQqs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=nI38QFIL; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id AE1D9FF803; Mon, 19 Feb 2024 10:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708340259; 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=kjw46L82Im/+NbPXXzGcB4oRwbdkB7kHEPgjm1bWJJA=; b=nI38QFIL7mTDl70sEBBsujtotl7H/QkDNtlUXzaiuYxYc8mYwsGMRfKTcXKAPFVmpp70ay ghxreXuYIX1KNsMxnp9TGj4BEV4NEZG8+wmUXP4nsR6LdregpG4Z/Rom5O0GXiNEg84VfX QSgqFLQr5Y69wsQpkkaEFs7M96/aF434Db09qVIyN2k/GQD+tnwxGpCLIssgfyW46F35aR OPaNcsx8/uR/ggHXSCfl1Z1TbfRPP/yCJ9Ls8XGwNuVxykIUtzVj0UJMntv0uzpmxDT53Z bjlDqmTyrfPfsBECzoRD3C+mHRsrNTczljzni65pQnaIjHPlFmuZNCUk4iVHpg== Date: Mon, 19 Feb 2024 11:57:36 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Rahul Rameshbabu Cc: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , 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 , Vladimir Oltean , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH RFC net-next v8 06/13] net: Add struct kernel_ethtool_ts_info Message-ID: <20240219115736.7138a2a0@kmaincent-XPS-13-7390> In-Reply-To: <87frxsgt4i.fsf@nvidia.com> References: <20240216-feature_ptp_netnext-v8-0-510f42f444fb@bootlin.com> <20240216-feature_ptp_netnext-v8-6-510f42f444fb@bootlin.com> <87frxsgt4i.fsf@nvidia.com> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com On Fri, 16 Feb 2024 10:27:32 -0800 Rahul Rameshbabu wrote: > > +/** > > + * struct kernel_ethtool_ts_info - kernel copy of struct ethtool_ts_in= fo > > + * @cmd: command number =3D %ETHTOOL_GET_TS_INFO > > + * @so_timestamping: bit mask of the sum of the supported SO_TIMESTAMP= ING > > flags > > + * @phc_index: device index of the associated PHC, or -1 if there is n= one > > + * @tx_types: bit mask of the supported hwtstamp_tx_types enumeration > > values > > + * @rx_filters: bit mask of the supported hwtstamp_rx_filters enumerat= ion > > values > > + */ > > +struct kernel_ethtool_ts_info { > > + u32 cmd; > > + u32 so_timestamping; > > + int phc_index; > > + enum hwtstamp_tx_types tx_types; =20 >=20 > I might just be terrible at reading code, but isn't this what > tx_reserved in ethtool_ts_info is for? I feel like using one of the > reserved memspaces for this enum removes the need to make > kernel_ethtool_ts_info? I might be missing something obvious however. I did it to prepare the introduction phc_qualifier in patch 12. I am not su= re it would be wise to put it under tx/rx_reserved field. IMHO create a new kernel structure is cleaner for that than the hack of using one of the tx/rx_reser= ved field. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com