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 D149CCA0FED for ; Wed, 10 Sep 2025 22:19:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 86A85843FB; Wed, 10 Sep 2025 22:19:09 +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 Sl9kE1KZ9RJs; Wed, 10 Sep 2025 22:19:08 +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 BA26C843EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1757542748; bh=FWk0rlD0xHlg5YUuwH/yakXP/iHlPeX9qfiAh+PILCY=; h=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=mDZk4CKfpSoX3tdsLp9WlZgVkoXGSU7i2wLB+wRPhBZsiJN1N5+qJZdAcQH4jneiK 92hmuV2wA424iKIp/qmcixOJJtgSQv75fuyNRtYsDwh7MAhASvpstNGn12R/e+0ZkJ IYnzxp4DLgsUNZu4YoJFYagZcNwO+tHNnNQ5ODXRyUW33OuOQU6Kaz4akKfWDBYs+F vdNKdt9rMvIGneuzyKSBLgAJ9MLiJBlmddzG29J7xCnuk8C8l4477s5bPZZe0kSbXW AH64zzgaksmAey4oaVVBaBqlOB68uviYPM3er72pz1H/EWrBbdiEfYOVTk28ilWz+k 6kUc38wrf4USw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id BA26C843EC; Wed, 10 Sep 2025 22:19:08 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 94A692BB3 for ; Wed, 10 Sep 2025 22:19:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 799DD843FB for ; Wed, 10 Sep 2025 22:19:07 +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 sVdhe00boMaG for ; Wed, 10 Sep 2025 22:19:06 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=91.218.175.188; helo=out-188.mta0.migadu.com; envelope-from=vadim.fedorenko@linux.dev; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org EE8EC8420B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EE8EC8420B Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) by smtp1.osuosl.org (Postfix) with ESMTPS id EE8EC8420B for ; Wed, 10 Sep 2025 22:19:05 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko To: Jakub Kicinski , Andrew Lunn , Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Carolina Jubran , Vadim Fedorenko Cc: Paolo Abeni , Simon Horman , netdev@vger.kernel.org Date: Wed, 10 Sep 2025 22:11:07 +0000 Message-ID: <20250910221111.1527502-1-vadim.fedorenko@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1757542741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FWk0rlD0xHlg5YUuwH/yakXP/iHlPeX9qfiAh+PILCY=; b=DqMA/bi/S6bNfEm4WWg8gjgB1GIu/q/IkIH0EY1p+8k5fswPNUl27eJpUfROCQrpqfM9VS nX7uZ+TT51hdkljGu+SSqbA7Shz6WR4TAyBpwp0ZZbr6ckPDU15ySUS5wuAmh+KAiXNp28 lF4hg7RYXNFCkIY77/SZzVKY8hSBlEY= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=DqMA/bi/ Subject: [Intel-wired-lan] [PATCH net-next v2 0/4] add FEC bins histogramm report via ethtool 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" IEEE 802.3ck-2022 defines counters for FEC bins and 802.3df-2024 clarifies it a bit further. Implement reporting interface through as addition to FEC stats available in ethtool. NetDevSim driver has simple implementation as an example while mlx5 has much more complex solution. The example query is the same as usual FEC statistics while the answer is a bit more verbose: [vmuser@archvm9 linux]$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml --do fec-get --json '{"header":{"dev-index": 10, "flags": 4}}' {'auto': 0, 'header': {'dev-index': 10, 'dev-name': 'eni10np1'}, 'modes': {'bits': {}, 'nomask': True, 'size': 121}, 'stats': {'corr-bits': [], 'corrected': [123], 'hist': [{'bin-high': 0, 'bin-low': 0, 'bin-val': 445, 'bin-val-per-lane': [125, 120, 100, 100]}, {'bin-high': 3, 'bin-low': 1, 'bin-val': 12}, {'bin-high': 7, 'bin-low': 4, 'bin-val': 2}], 'uncorr': [4]}} v1 -> v2: * fix memset size of FEC histogramm bins in mlx5 * adjust fbnic driver FEC stats callback Links to RFC discussions: v1 - https://lore.kernel.org/netdev/20250729102354.771859-1-vadfed@meta.com/ v2 - https://lore.kernel.org/netdev/20250731231019.1809172-1-vadfed@meta.com/ v3 - https://lore.kernel.org/netdev/20250802063024.2423022-1-vadfed@meta.com/ v4 - https://lore.kernel.org/netdev/20250807155924.2272507-1-vadfed@meta.com/ v5 - https://lore.kernel.org/netdev/20250815132729.2251597-1-vadfed@meta.com/ Carolina Jubran (3): net/mlx5e: Don't query FEC statistics when FEC is disabled net/mlx5e: Add logic to read RS-FEC histogram bin ranges from PPHCR net/mlx5e: Report RS-FEC histogram statistics via ethtool Vadim Fedorenko (1): ethtool: add FEC bins histogramm report Documentation/netlink/specs/ethtool.yaml | 22 ++++ Documentation/networking/ethtool-netlink.rst | 5 + .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +- .../ethernet/fungible/funeth/funeth_ethtool.c | 3 +- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 3 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 +- .../marvell/octeontx2/nic/otx2_ethtool.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +- .../net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++ .../ethernet/mellanox/mlx5/core/en_stats.c | 102 ++++++++++++++++-- .../ethernet/mellanox/mlx5/core/en_stats.h | 4 +- .../net/ethernet/meta/fbnic/fbnic_ethtool.c | 3 +- drivers/net/ethernet/sfc/ethtool.c | 3 +- drivers/net/ethernet/sfc/siena/ethtool.c | 3 +- drivers/net/netdevsim/ethtool.c | 22 +++- include/linux/ethtool.h | 25 ++++- .../uapi/linux/ethtool_netlink_generated.h | 11 ++ net/ethtool/fec.c | 69 +++++++++++- 19 files changed, 278 insertions(+), 23 deletions(-) -- 2.47.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 C8D513112B0 for ; Wed, 10 Sep 2025 22:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757542746; cv=none; b=Bb8DlR6+5id7QGUQCyys1srWsjDtnES4hlEcxjHTcrlT3BFJX6AjbrIekKbSmrGV9m58TlegqDnqpv2Lnx/CWG81rmbORER/26aMaPJcoE7P3Me4ee+KN67yJlmhus+7BASNU8GFhhhazP4vXPdvYOsDzKGw0iD0xDhC//VaTf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757542746; c=relaxed/simple; bh=gls4A/Q037+yPyLfGqJIfdskpkbHyIIPc7EGD8oFj4U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BD9S3IUdqJ82jZU9n5WJG/VB+rn4rKTOaH5RlXQzvg3f1VD+vPEFu4LAglnQKY/FQksGwLqThjPMG9KekMB5NMZtjgc6qJkesklFrfbKdO/bOJM+q5bTISBHMJOLNKcm/IIGFepnpf7K3lk+19IL4TpkwwTiYcyjbM3XA4oSRSY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=DqMA/bi/; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DqMA/bi/" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1757542741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FWk0rlD0xHlg5YUuwH/yakXP/iHlPeX9qfiAh+PILCY=; b=DqMA/bi/S6bNfEm4WWg8gjgB1GIu/q/IkIH0EY1p+8k5fswPNUl27eJpUfROCQrpqfM9VS nX7uZ+TT51hdkljGu+SSqbA7Shz6WR4TAyBpwp0ZZbr6ckPDU15ySUS5wuAmh+KAiXNp28 lF4hg7RYXNFCkIY77/SZzVKY8hSBlEY= From: Vadim Fedorenko To: Jakub Kicinski , Andrew Lunn , Michael Chan , Pavan Chebbi , Tariq Toukan , Gal Pressman , intel-wired-lan@lists.osuosl.org, Donald Hunter , Carolina Jubran , Vadim Fedorenko Cc: Paolo Abeni , Simon Horman , netdev@vger.kernel.org Subject: [PATCH net-next v2 0/4] add FEC bins histogramm report via ethtool Date: Wed, 10 Sep 2025 22:11:07 +0000 Message-ID: <20250910221111.1527502-1-vadim.fedorenko@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT IEEE 802.3ck-2022 defines counters for FEC bins and 802.3df-2024 clarifies it a bit further. Implement reporting interface through as addition to FEC stats available in ethtool. NetDevSim driver has simple implementation as an example while mlx5 has much more complex solution. The example query is the same as usual FEC statistics while the answer is a bit more verbose: [vmuser@archvm9 linux]$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml --do fec-get --json '{"header":{"dev-index": 10, "flags": 4}}' {'auto': 0, 'header': {'dev-index': 10, 'dev-name': 'eni10np1'}, 'modes': {'bits': {}, 'nomask': True, 'size': 121}, 'stats': {'corr-bits': [], 'corrected': [123], 'hist': [{'bin-high': 0, 'bin-low': 0, 'bin-val': 445, 'bin-val-per-lane': [125, 120, 100, 100]}, {'bin-high': 3, 'bin-low': 1, 'bin-val': 12}, {'bin-high': 7, 'bin-low': 4, 'bin-val': 2}], 'uncorr': [4]}} v1 -> v2: * fix memset size of FEC histogramm bins in mlx5 * adjust fbnic driver FEC stats callback Links to RFC discussions: v1 - https://lore.kernel.org/netdev/20250729102354.771859-1-vadfed@meta.com/ v2 - https://lore.kernel.org/netdev/20250731231019.1809172-1-vadfed@meta.com/ v3 - https://lore.kernel.org/netdev/20250802063024.2423022-1-vadfed@meta.com/ v4 - https://lore.kernel.org/netdev/20250807155924.2272507-1-vadfed@meta.com/ v5 - https://lore.kernel.org/netdev/20250815132729.2251597-1-vadfed@meta.com/ Carolina Jubran (3): net/mlx5e: Don't query FEC statistics when FEC is disabled net/mlx5e: Add logic to read RS-FEC histogram bin ranges from PPHCR net/mlx5e: Report RS-FEC histogram statistics via ethtool Vadim Fedorenko (1): ethtool: add FEC bins histogramm report Documentation/netlink/specs/ethtool.yaml | 22 ++++ Documentation/networking/ethtool-netlink.rst | 5 + .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +- .../ethernet/fungible/funeth/funeth_ethtool.c | 3 +- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 3 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 +- .../marvell/octeontx2/nic/otx2_ethtool.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +- .../net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++ .../ethernet/mellanox/mlx5/core/en_stats.c | 102 ++++++++++++++++-- .../ethernet/mellanox/mlx5/core/en_stats.h | 4 +- .../net/ethernet/meta/fbnic/fbnic_ethtool.c | 3 +- drivers/net/ethernet/sfc/ethtool.c | 3 +- drivers/net/ethernet/sfc/siena/ethtool.c | 3 +- drivers/net/netdevsim/ethtool.c | 22 +++- include/linux/ethtool.h | 25 ++++- .../uapi/linux/ethtool_netlink_generated.h | 11 ++ net/ethtool/fec.c | 69 +++++++++++- 19 files changed, 278 insertions(+), 23 deletions(-) -- 2.47.3