Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1197400rbb; Mon, 26 Feb 2024 01:38:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPTyQifOpDivjFZ+m2UZWK/X3DkwVfKh7R8n8sA0K6ugoyh7dtsRO6HHfEfeZC/fR1NEZFkJl0cB0E0mP0Qs63sXnvZvLtGMO9DIi5jA== X-Google-Smtp-Source: AGHT+IGToPutYQ0lZF+0BnouahghN6Nn+8dL1b3vRAIA0U5BMNfH8dpYWmcYruQETYHeq/JzeyfE X-Received: by 2002:a17:90a:d250:b0:299:7842:baf6 with SMTP id o16-20020a17090ad25000b002997842baf6mr4069354pjw.47.1708940317865; Mon, 26 Feb 2024 01:38:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708940317; cv=pass; d=google.com; s=arc-20160816; b=V1Zp4FyOTM6Zvmj8SXiBtnERsJUkXb9M77bu99U9RBYejmBPFE1NkRx075/1mXu9bo PF2eGW2R378kGaA4VbTQK6hrLRtZf2h7Fiq5yredWSm8L4d6yuYb1wckr4L0DwQjduz9 ebAzyUPiJmAbvKA3IrHXQ8VtNwtSnQlrkNec5lVUcCxHgadgwPEWPiYgQQl0/pYMNyRa uF1eojOJDFmQAOQiqKLTNRLQpfODCLb0ZDQJ4ZzuexlqDVMtQqADn8BExXj097sSYV1F 0gzj+0BYgoTlG8aK+3tZiOgTkukhsANvfCijDyMlKozqdz+7NkvKX7PUMt7vx6S8PAe/ sQFg== 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=VPb6uM0vuQeGyvRuwmurAcfRX+uCUbmF9exG7CadPqI=; fh=vLQ2QekPF58X9gXufavtU8TE+6hH60IMSGetL2aceqw=; b=EgTljGf3nsHp4YLLDYlBNoxnGRrwex7xDkcLwsNLKdWzCmSfLDxKv4Kwa6oATmLlkP nlgVkJ+etOl9Lu/q6bt7c7KahRq63kxQIAvvKnRuhGp8zen8+HtMAj2fMluGYByPY1Lh 6x4XZVUNCeE4qDmOXOzZzdQPN6NMPmKAUovwg0wlfmsWBm2XleeGbD7i5A3gnM/zQf7p jBEeUUVyeT7LRfkUKBHiDHaNel38vJ9fcyQ3Cagu/1fORs3m7IYZudMh3/WVh8QhDqVF Gj7QxWx2CHc5T1ynkry5cUTrgcAZDtvl0Gk++YZdrt9SSDnBJziz/tZWIxRI1X4UCXA1 pmrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="JuIsGb/T"; 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-80994-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ot13-20020a17090b3b4d00b0029abdf3f21esi1601456pjb.34.2024.02.26.01.38.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80994-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="JuIsGb/T"; 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-80994-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80994-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0C331285149 for ; Mon, 26 Feb 2024 09:38:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 019FD6DD08; Mon, 26 Feb 2024 08:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="JuIsGb/T" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 9E26C2033F; Mon, 26 Feb 2024 08:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937974; cv=none; b=Fkf37ZtUfxczDa5jSPIxRs7W9HkzQAJkulk4OEnh/HnfzXwN8xMBkuUv9EjQdJ+F2DdYDGXSXYAlkgvdL79b8SO1zmAK1GsmSvm11lFEYp7jyJlQuU7mVsggEePAqlTrZeFmZNnZ04HEGn8C+C98C0fz222anYD2fVFcmifKwXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937974; c=relaxed/simple; bh=TKMBEQsICcf1Jqz8go5zK6Xhh9LdECeamokbuWo4YyM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IN7dBQShA1dIFU9/t/jM7B9FagaG76xvopR2YyHs880wv8jCq95ckAKq+/RSEWs5QnF/FHtivf/PdTP2k7DE4i+7t6mXQvOL3S2Qahj0uRENpCfqs1t3br3GSS4Aueo1YolgiXWQWrgzNqCI2QB+JsUqESJeNKlWAJSZ5UuqrQA= 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=JuIsGb/T; arc=none smtp.client-ip=217.70.183.195 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 826DF60008; Mon, 26 Feb 2024 08:59:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708937964; 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=VPb6uM0vuQeGyvRuwmurAcfRX+uCUbmF9exG7CadPqI=; b=JuIsGb/Tqmh9AHLD4dviBjlXLScBrmdGVV5R1jGgg5j267sxOuG19XceWlMRagF/nv5OSF dklMzNwHtdhRhQ+dMe2Ivi8C2cYlWMVkmnOJRIVxgMQIG42j+0mChiQO3ozCzOSuUFzFg5 +4iPdt/3FSqa8oY8yhYF3/OIoBCGrZJGHCna11I0Xz1iNHwOwq3wjT/FQEcFQWqqKX6KUo BTcRM8W4Ygwed5tbFeahfprYw1YaNgXc1aQ4g5INwaX6neF8hpAaYnmf5YZ4U+f4nGxS4T vA38EF+eaTATYvVDh9Fuv1ohVZpWvYOBQjFBJXvaMz51Ld6UTpoF9G4jA48mYw== Date: Mon, 26 Feb 2024 09:59:19 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Rahul Rameshbabu Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Richard Cochran , Tariq Toukan , Gal Pressman , Vadim Fedorenko , Andrew Lunn , Heiner Kallweit , Przemek Kitszel , Ahmed Zaki , Alexander Lobakin , Hangbin Liu , Paul Greenwalt , Justin Stitt , Randy Dunlap , Maxime Chevallier , Wojciech Drewek , Vladimir Oltean , Jiri Pirko , Jacob Keller , Alexandre Torgue , Jose Abreu , Dragos Tatulea , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH RFC net-next v1 1/6] ethtool: add interface to read Tx hardware timestamping statistics Message-ID: <20240226095919.1c242444@kmaincent-XPS-13-7390> In-Reply-To: <20240223192658.45893-2-rrameshbabu@nvidia.com> References: <20240223192658.45893-1-rrameshbabu@nvidia.com> <20240223192658.45893-2-rrameshbabu@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, 23 Feb 2024 11:24:45 -0800 Rahul Rameshbabu wrote: > Multiple network devices that support hardware timestamping appear to have > common behavior with regards to timestamp handling. Implement common Tx > hardware timestamping statistics in a tx_stats struct_group. Common Rx > hardware timestamping statistics can subsequently be implemented in a > rx_stats struct_group for ethtool_ts_stats. >=20 > Signed-off-by: Rahul Rameshbabu > Reviewed-by: Dragos Tatulea =20 > +/** > + * enum ethtool_ts_stats_layer - layer to query hardware timestamping > statistics > + * @ETHTOOL_TS_STATS_LAYER_ACTIVE: > + * retrieve the statistics from the layer that is currently feeding > + * hardware timestamps for packets. > + * @ETHTOOL_TS_STATS_LAYER_DMA: > + * retrieve the statistics from the DMA hardware timestamping layer > of the > + * device. > + * @ETHTOOL_TS_STATS_PHY: > + * retrieve the statistics from the PHY hardware timestamping layer > of the > + * device. > + */ > +enum ethtool_ts_stats_layer { > + ETHTOOL_TS_STATS_LAYER_ACTIVE, > + ETHTOOL_TS_STATS_LAYER_DMA, > + ETHTOOL_TS_STATS_LAYER_PHY, > +}; The all point of my v8 series new implementation (asked by the maintainers)= was to move on from the timestamp layer to the phc provider which is described = by a phc index + phc qualifier (precise IEEE 1588/approx DMA). The struct being introduce in patch 9 of my series. You should do the same, use the phc provider instead of the layer. With using only the layer and in case of several PHYs we could not reach the right ts stats. Same goes for the MAC having both type of timestamp IEEE 1588 and DMA. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com