From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3587413BACC for ; Tue, 11 Feb 2025 00:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739234640; cv=none; b=Z8f/NWMg+HUpDHnKJzSFS5b1w9ZRw0OjJ/XpPMMgHI6dt7SfuU2t/Rouer4zkHDbGq0rnuJeilxRzqqMGqAjK4l7uJTjTqRRn1F5cCZ+VTssPsSbvTKzLwIUOBfCTuZo7EMrKArEqGHevVzJ2QdYDiHMK7NmfTxL+nY/FJCgj1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739234640; c=relaxed/simple; bh=YMmaKEak/03dwbRH8YweIpN1T4YJ+s4Tz7bZtxPZan8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YGTvSIgnxhmvSWdhUTBDkrPsiaDNGycdL9KmGSgx453NakZiRL/dR+8w4BR+pr3zffh7AEF4jrLm7CbNlNOFD/jB0rjB5wMveW5r3/SzhM4bUq34FCuBq3EynchuOaS02X9SrgZpUoXGgU5qBW3VAxVRPSMht0WnARA581UzoKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VH88J0Nb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VH88J0Nb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA265C4CED1; Tue, 11 Feb 2025 00:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739234639; bh=YMmaKEak/03dwbRH8YweIpN1T4YJ+s4Tz7bZtxPZan8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VH88J0Nb8hFvwrmN4T9tM9X8/Cxtu509TKSkI7uugbTYbsd9mGvd9VM280ZzBYyAh syrHScdbheKi45nfLEelhvEOY8NUOGxMnQoZ3CkeZnY0F53P1/XLrxSJDb6dHLS0y9 iLH63WOyUFeOR4ZqMP/sI68vOOPbrCOPxA7z4A2QYcpDI2smgCGXu+H80FIT4oJNS7 gQtSDU1w3adsUYe7jgxh5e9A5IxRxln5nk5LTiaY923ve3HJQZj0bUN8KkzxWF+76i aHP2aoBiwqma1Uc0NeKa1Kc9RYvHM98W1vxp0LnPAxlPyyWoqN41hkBeT+Id6ILIQy 98sJ+WF0Tlmhw== Date: Mon, 10 Feb 2025 16:43:58 -0800 From: Jakub Kicinski To: "Arinzon, David" Cc: David Miller , "netdev@vger.kernel.org" , Eric Dumazet , Paolo Abeni , Simon Horman , Richard Cochran , "Woodhouse, David" , "Machulsky, Zorik" , "Matushevsky, Alexander" , "Bshara, Saeed" , "Wilson, Matt" , "Liguori, Anthony" , "Bshara, Nafea" , "Schmeilin, Evgeny" , "Belgazal, Netanel" , "Saidi, Ali" , "Herrenschmidt, Benjamin" , "Kiyanovski, Arthur" , "Dagan, Noam" , "Bernstein, Amit" , "Agroskin, Shay" , "Abboud, Osama" , "Ostrovsky, Evgeny" , "Tabachnik, Ofir" , "Machnikowski, Maciek" , Rahul Rameshbabu , Gal Pressman Subject: Re: [PATCH v6 net-next 3/4] net: ena: Add PHC documentation Message-ID: <20250210164358.11091722@kernel.org> In-Reply-To: <01fd0c4d50c7493986d80e22b0506fdf@amazon.com> References: <20250206141538.549-1-darinzon@amazon.com> <20250206141538.549-4-darinzon@amazon.com> <20250207165516.2f237586@kernel.org> <01fd0c4d50c7493986d80e22b0506fdf@amazon.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 10 Feb 2025 15:28:19 +0000 Arinzon, David wrote: > You are right in the regard that it is not a network specific functionality. > Having said that, PHC is a network card capability, making it a network-related component rather than purely a timekeeping feature. > Moreover we failed to find an existing tool which would allow users to get valuable feedback of the system's overall health. > > Researching its existing support in the kernel we noted that: > - PHC is embedded in network NIC and is supported by multiple NIC vendors in the kernel > - PHC information is visible through ethtool -T > - The Linux networking stack uses PHC for timekeeping as well as for packet timestamping (via SO_TIMESTAMPING). > Packet timestamping statistics are available through ethtool get_ts_stats hook > > We have found `ethtool -S` as a suitable location for exposing these statistics, which are unique to the ENA NIC. > > We'd appreciate your thoughts on the matter, is there an alternative tool you can recommend? We try to steer folks towards read-only debugfs files for stuff that's not strictly networking related. You also add a custom sysfs file in patch 4, I reckon adding stats there may also be a natural place for the user? Patch 4 FWIW is lacking slightly in the justification, would be good to clarify why it's disabled by default. Single sentence of "why" would be great.