From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="nI38QFIL" 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