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 X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67643C4320A for ; Mon, 16 Aug 2021 06:19:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4046E61A3B for ; Mon, 16 Aug 2021 06:19:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233266AbhHPGTb (ORCPT ); Mon, 16 Aug 2021 02:19:31 -0400 Received: from mga18.intel.com ([134.134.136.126]:31371 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhHPGTa (ORCPT ); Mon, 16 Aug 2021 02:19:30 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="202960676" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="202960676" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2021 23:18:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="678986694" Received: from vijay.png.intel.com ([10.88.229.73]) by fmsmga005.fm.intel.com with ESMTP; 15 Aug 2021 23:18:54 -0700 From: Vijayakannan Ayyathurai To: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com Cc: vee.khee.wong@intel.com, weifeng.voon@intel.com, vijayakannan.ayyathurai@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v1 0/3] net: stmmac: Add ethtool per-queue statistic Date: Mon, 16 Aug 2021 14:15:57 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding generic ethtool per-queue statistic framework to display the statistics for each rx/tx queue. In future, users can avail it to add more per-queue specific counters. Number of rx/tx queues displayed is depending on the available rx/tx queues in that particular MAC config and this number is limited up to the MTL_MAX_{RX|TX}_QUEUES defined in the driver. Ethtool per-queue statistic display will look like below, when users start adding more counters. Example - 1: q0_tx_statA: q0_tx_statB: q0_tx_statC: | q0_tx_statX: . . . qMAX_tx_statA: qMAX_tx_statB: qMAX_tx_statC: | qMAX_tx_statX: q0_rx_statA: q0_rx_statB: q0_rx_statC: | q0_rx_statX: . . . qMAX_rx_statA: qMAX_rx_statB: qMAX_rx_statC: | qMAX_rx_statX: Example - 2: Ping test using the tx queue 3. $ tc qdisc add dev enp0s30f4 root mqprio num_tc 2 map 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 3@0 1@3 hw 0 Statistic before ping: --------------------- $ ethtool -S enp0s30f4 [ snip ] q3_tx_pkt_n: 7916 q3_tx_irq_n: 316 [ snip ] $ cat /proc/interrupts [ snip ] 143: 0 0 0 316 0 0 0 0 IR-PCI-MSI 499719-edge enp0s30f4:tx-3 [ snip ] $ ping -I enp0s30f4 192.168.1.10 -i 0.01 -c 100 > /dev/null Statistic after ping: --------------------- $ ethtool -S enp0s30f4 [ snip ] q3_tx_pkt_n: 8016 q3_tx_irq_n: 320 [ snip ] $ cat /proc/interrupts [ snip ] 143: 0 0 0 320 0 0 0 0 IR-PCI-MSI 499719-edge enp0s30f4:tx-3 [ snip ] Vijayakannan Ayyathurai (2): net: stmmac: add ethtool per-queue statistic framework net: stmmac: add ethtool per-queue irq statistic support Voon Weifeng (1): net: stmmac: fix INTR TBU status affecting irq count statistic drivers/net/ethernet/stmicro/stmmac/common.h | 13 ++++ .../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 7 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 67 ++++++++++++++++++- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++ 4 files changed, 89 insertions(+), 3 deletions(-) base-commit: e4637f621203cb482f3ddb590cfe9f65045d92a6 -- 2.17.1 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 X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77BC0C4320A for ; Mon, 16 Aug 2021 06:20:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42844619A6 for ; Mon, 16 Aug 2021 06:20:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 42844619A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=n739XDqKAXXkmKtN7VP/81iXjU7ZWQsw6O1W59Y0hGg=; b=lGkfMP3fAZTjk4 9Cud+6fh6liPLOgizFvn2bspKHGEuGjY0JslkmHNjS06Gz0UpS2kiIUNBhQyVDCHH9wnbVaH5mPrY zwAvzsdCeTDIda3D4oIIzrjQfS+OygNVr/EFWGzgwQsoDFC/cm1uW/Y7fsQ4n7Gz1v3l3+NqG1izf NUyhvwjbzwQDN11cvKBo4bONanvs2zpCe4bWy/wDozcXaGgGelUYWzwbzEdJrX0hMnQVnFRFVVQLA 6O1PhblNb7PDRvt9WW9wdiMMFTS2ah566PbFSQ4K5pCGvoyqmbZZDyHVh/zWBFvksu8DLe1UOZNUH CBNWni5MCDwwpDrtNC+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFVxf-00GCJj-Qq; Mon, 16 Aug 2021 06:19:03 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFVxc-00GCJM-GW for linux-arm-kernel@lists.infradead.org; Mon, 16 Aug 2021 06:19:01 +0000 X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="213952882" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="213952882" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2021 23:18:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="678986694" Received: from vijay.png.intel.com ([10.88.229.73]) by fmsmga005.fm.intel.com with ESMTP; 15 Aug 2021 23:18:54 -0700 From: Vijayakannan Ayyathurai To: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com Cc: vee.khee.wong@intel.com, weifeng.voon@intel.com, vijayakannan.ayyathurai@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v1 0/3] net: stmmac: Add ethtool per-queue statistic Date: Mon, 16 Aug 2021 14:15:57 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210815_231900_602375_948AB98E X-CRM114-Status: UNSURE ( 7.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Adding generic ethtool per-queue statistic framework to display the statistics for each rx/tx queue. In future, users can avail it to add more per-queue specific counters. Number of rx/tx queues displayed is depending on the available rx/tx queues in that particular MAC config and this number is limited up to the MTL_MAX_{RX|TX}_QUEUES defined in the driver. Ethtool per-queue statistic display will look like below, when users start adding more counters. Example - 1: q0_tx_statA: q0_tx_statB: q0_tx_statC: | q0_tx_statX: . . . qMAX_tx_statA: qMAX_tx_statB: qMAX_tx_statC: | qMAX_tx_statX: q0_rx_statA: q0_rx_statB: q0_rx_statC: | q0_rx_statX: . . . qMAX_rx_statA: qMAX_rx_statB: qMAX_rx_statC: | qMAX_rx_statX: Example - 2: Ping test using the tx queue 3. $ tc qdisc add dev enp0s30f4 root mqprio num_tc 2 map 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 3@0 1@3 hw 0 Statistic before ping: --------------------- $ ethtool -S enp0s30f4 [ snip ] q3_tx_pkt_n: 7916 q3_tx_irq_n: 316 [ snip ] $ cat /proc/interrupts [ snip ] 143: 0 0 0 316 0 0 0 0 IR-PCI-MSI 499719-edge enp0s30f4:tx-3 [ snip ] $ ping -I enp0s30f4 192.168.1.10 -i 0.01 -c 100 > /dev/null Statistic after ping: --------------------- $ ethtool -S enp0s30f4 [ snip ] q3_tx_pkt_n: 8016 q3_tx_irq_n: 320 [ snip ] $ cat /proc/interrupts [ snip ] 143: 0 0 0 320 0 0 0 0 IR-PCI-MSI 499719-edge enp0s30f4:tx-3 [ snip ] Vijayakannan Ayyathurai (2): net: stmmac: add ethtool per-queue statistic framework net: stmmac: add ethtool per-queue irq statistic support Voon Weifeng (1): net: stmmac: fix INTR TBU status affecting irq count statistic drivers/net/ethernet/stmicro/stmmac/common.h | 13 ++++ .../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 7 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 67 ++++++++++++++++++- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 5 ++ 4 files changed, 89 insertions(+), 3 deletions(-) base-commit: e4637f621203cb482f3ddb590cfe9f65045d92a6 -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel