From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FE42C87FCB for ; Wed, 30 Jul 2025 13:44:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DCCA1802C3; Wed, 30 Jul 2025 13:44:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cdxgufSuvyuA; Wed, 30 Jul 2025 13:44:24 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B221F80DA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1753883064; bh=jfnnXzsaHzN1asEOlm8OMFrmb6HGDOFmxm/7EHwsXLs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SvYZuMnfojOzi3+quc21wakyYtZnonC/+4OjMjSdTP/OyeotIP/8/JX9cx74Vzsus eisHiMYfQQGqtAnRIP/5RiNIv0dZQYZyyLwK8s7vt/Nyb9jWxSNdOAZNnkAxU3qBKV gdtdoJLjthV8Yl42W6327kNOhMlyu1CD/GvCU3GeUDGE8BrQ1VAQ6i7B70uK56oYk5 p4nuHDXBCXZhbalxkD0BrrO8m3egxjwhEib1AtZUDbuPr1SHZ+F9E4d+tn5m7txwfR ovVWuAqNfdJONFofwzvPZdMeJ84MZjnhZFNwZ5n5/YqvSPHDwywkSrCCh4Rvf7+BBG c/giWvojSehTA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id B221F80DA2; Wed, 30 Jul 2025 13:44:24 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 85842186 for ; Wed, 30 Jul 2025 13:44:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6C1FF407B8 for ; Wed, 30 Jul 2025 13:44:23 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id aoR0VV__w4gB for ; Wed, 30 Jul 2025 13:44:21 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 5A16340F50 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5A16340F50 Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5A16340F50 for ; Wed, 30 Jul 2025 13:44:21 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id C56C6418D4; Wed, 30 Jul 2025 13:44:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4746EC4CEE7; Wed, 30 Jul 2025 13:44:20 +0000 (UTC) Date: Wed, 30 Jul 2025 06:44:19 -0700 From: Jakub Kicinski To: Vadim Fedorenko Cc: Andrew Lunn , Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Paolo Abeni , Simon Horman , netdev@vger.kernel.org Message-ID: <20250730064419.2588a5e3@kernel.org> In-Reply-To: References: <20250729102354.771859-1-vadfed@meta.com> <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> <1a7f0aa0-47ae-4936-9e55-576cdf71f4cc@linux.dev> <9c1c8db9-b283-4097-bb3f-db4a295de2a5@lunn.ch> <4270ff14-06cd-4a78-afe7-1aa5f254ebb6@linux.dev> <424e38be-127d-49d8-98bf-1b4a2075d710@linux.dev> <20250729185146.513504e0@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753883060; bh=cgP7ufEbc1fp1+482maor3B6Hqo7lhcA8bqWL0MDuCo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mTf3PAVgkEAh6b8AMNui+UNmqLyAXKG9tkrXugLGu25sGFNv4xZLxdFpg58hd6eOf KcmsurfVVJTJ5B3cSXGI1A1S8warGgiHekZOmKPd51G65bdk9LlQg65QpbF0cr1ViU WdPfCNw1GfGYZzvzXcoSdmLwQ0foi4xBfJ7XND23ys59XRHRt0PYsKSHO9M0ewp+g9 8SNVe3CULazbokXl2GACVm4FoWFL/oXKwz3ZcJ8fV8+VxpvxEvaVkDv4dHm99dfe9E DV0P9qYD+5713vJ0iJoS0ITSqHgjHpmc1tFOFNOFmXb9vByiVP9JrWI5Y5ggpFde0Y +2yuhdP6x7FLg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=mTf3PAVg Subject: Re: [Intel-wired-lan] [RFC PATCH] ethtool: add FEC bins histogramm report X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, 30 Jul 2025 10:18:46 +0100 Vadim Fedorenko wrote: > > IDK, 0,0 means all symbols were completely correct. > > It may be useful for calculating bit error rate? > > The standard doesn't have this bin, its value can be potentially > deducted from all packets counter. We have a number of counters outside of the standard. Here the extension is pretty trivial, so I don't see why we'd deprive the user of the information HW collects. The translation between bytes and symbols is not exact. Not sure we care about exactness but, again, trivial to keep the 0,0 bin. > > A workaround for having the {-1, -1} sentinel could also be to skip > > the first entry: > > > > if (i && !ranges[i].low && !ranges[i].high) > > break; > > I was thinking of this way, the problem is that in the core we rely on > the driver to provide at least 2 bins and we cannot add any compile-time > checks because it's all dynamic. 1 bin is no binning, its not a legit use of the histogram API. We have a counter for corrected symbols already, that's the "1 bin". 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 252E28F66 for ; Wed, 30 Jul 2025 13:44:20 +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=1753883061; cv=none; b=g/8YHosjpxJM5rNcpLxx6QCcs33YrcVsK9OKrjsw0MgRveUte3rxqcOYVOXOBAOZVMats51OYxOxzcxiq8iZq5k+bMwBrgIl0CoZXJDWIIDMY8/MY/52Vg52xd1K5zsHHR82SgqA/VpXy6lfhQtB6VKCu9Asax05GgxDwTLDCKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753883061; c=relaxed/simple; bh=cgP7ufEbc1fp1+482maor3B6Hqo7lhcA8bqWL0MDuCo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=r0IgE8nHYwRbnvMv7l3M7qQTCbv9HaRXS/46IgqYAAtx9DDgZKN5LPWSRw02CSWNb0d93lsQOLft8BIvOpDvVSinNAqNV98HhUJ6SJgQTXkhE1DyuHtSEjmnGu1no4I0bGV5zM+et/cXhzsYKa2VCZOBSBo8OqFQwuLNWdGLzNE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mTf3PAVg; 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="mTf3PAVg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4746EC4CEE7; Wed, 30 Jul 2025 13:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753883060; bh=cgP7ufEbc1fp1+482maor3B6Hqo7lhcA8bqWL0MDuCo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mTf3PAVgkEAh6b8AMNui+UNmqLyAXKG9tkrXugLGu25sGFNv4xZLxdFpg58hd6eOf KcmsurfVVJTJ5B3cSXGI1A1S8warGgiHekZOmKPd51G65bdk9LlQg65QpbF0cr1ViU WdPfCNw1GfGYZzvzXcoSdmLwQ0foi4xBfJ7XND23ys59XRHRt0PYsKSHO9M0ewp+g9 8SNVe3CULazbokXl2GACVm4FoWFL/oXKwz3ZcJ8fV8+VxpvxEvaVkDv4dHm99dfe9E DV0P9qYD+5713vJ0iJoS0ITSqHgjHpmc1tFOFNOFmXb9vByiVP9JrWI5Y5ggpFde0Y +2yuhdP6x7FLg== Date: Wed, 30 Jul 2025 06:44:19 -0700 From: Jakub Kicinski To: Vadim Fedorenko Cc: Andrew Lunn , Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Paolo Abeni , Simon Horman , netdev@vger.kernel.org Subject: Re: [RFC PATCH] ethtool: add FEC bins histogramm report Message-ID: <20250730064419.2588a5e3@kernel.org> In-Reply-To: References: <20250729102354.771859-1-vadfed@meta.com> <982c780a-1ff1-4d79-9104-c61605c7e802@lunn.ch> <1a7f0aa0-47ae-4936-9e55-576cdf71f4cc@linux.dev> <9c1c8db9-b283-4097-bb3f-db4a295de2a5@lunn.ch> <4270ff14-06cd-4a78-afe7-1aa5f254ebb6@linux.dev> <424e38be-127d-49d8-98bf-1b4a2075d710@linux.dev> <20250729185146.513504e0@kernel.org> 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 Wed, 30 Jul 2025 10:18:46 +0100 Vadim Fedorenko wrote: > > IDK, 0,0 means all symbols were completely correct. > > It may be useful for calculating bit error rate? > > The standard doesn't have this bin, its value can be potentially > deducted from all packets counter. We have a number of counters outside of the standard. Here the extension is pretty trivial, so I don't see why we'd deprive the user of the information HW collects. The translation between bytes and symbols is not exact. Not sure we care about exactness but, again, trivial to keep the 0,0 bin. > > A workaround for having the {-1, -1} sentinel could also be to skip > > the first entry: > > > > if (i && !ranges[i].low && !ranges[i].high) > > break; > > I was thinking of this way, the problem is that in the core we rely on > the driver to provide at least 2 bins and we cannot add any compile-time > checks because it's all dynamic. 1 bin is no binning, its not a legit use of the histogram API. We have a counter for corrected symbols already, that's the "1 bin".