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=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 E7812C43461 for ; Tue, 15 Sep 2020 00:13:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6ECD820EDD for ; Tue, 15 Sep 2020 00:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600128799; bh=AQjY7pR1OMnNGkv9iPnqrURayrHzxjRrLwFthlp6TL4=; h=From:To:Cc:Subject:Date:List-ID:From; b=BpqXi2S2l84IbvS645tXSwDJQWd6f069HNJlu6Zp2s6WttGLyobvIwBazWPvqIFUd YEOFCrdAw/g+4ebNIoQd1eMcdZp+l2Hg/0ovSpOGfitSQ+RQns+n/oFLfChprICBJI msFflyjL1uIEA1ZEeve5HI7j+FFMNW4okZQF9ZZw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726013AbgIOANR (ORCPT ); Mon, 14 Sep 2020 20:13:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:58256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbgIOANJ (ORCPT ); Mon, 14 Sep 2020 20:13:09 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 172BE208DB; Tue, 15 Sep 2020 00:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600128788; bh=AQjY7pR1OMnNGkv9iPnqrURayrHzxjRrLwFthlp6TL4=; h=From:To:Cc:Subject:Date:From; b=PVtYfJNvjZK2smDffo7JYvS5F4PdA8fOA1zZL0EkXLrxRYhYx0NW+iM/cGOaU1Rim R31VwgcTJSo7F59NVkCi+9bOG9vRD7bTR7lpgDprBsCZh1PQWos7643FNMtewNSc5U HDHT1pqHkKhHLCJl3o/SQ9DG7cudTTwqxGyYVBs0= From: Jakub Kicinski To: davem@davemloft.net Cc: mkubecek@suse.cz, michael.chan@broadcom.com, saeedm@nvidia.com, tariqt@nvidia.com, andrew@lunn.ch, alexander.duyck@gmail.com, netdev@vger.kernel.org, Jakub Kicinski Subject: [PATCH net-next v3 0/8] ethtool: add pause frame stats Date: Mon, 14 Sep 2020 17:11:51 -0700 Message-Id: <20200915001159.346469-1-kuba@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! This is the first (small) series which exposes some stats via the corresponding ethtool interface. Here (thanks to the excitability of netlink) we expose pause frame stats via the same interfaces as ethtool -a / -A. In particular the following stats from the standard: - 30.3.4.2 aPAUSEMACCtrlFramesTransmitted - 30.3.4.3 aPAUSEMACCtrlFramesReceived 4 real drivers are converted, I believe we got confirmation from maintainers that all exposed stats match the standard. v3: - fix mlx5 build - adjust the init logic in patch 1 v2: - netdevsim: add missing static - bnxt: fix sparse warning - mlx5: address Saeed's comments Jakub Kicinski (8): ethtool: add standard pause stats docs: net: include the new ethtool pause stats in the stats doc netdevsim: add pause frame stats selftests: add a test for ethtool pause stats bnxt: add pause frame stats ixgbe: add pause frame stats mlx5: add pause frame stats mlx4: add pause frame stats Documentation/networking/ethtool-netlink.rst | 11 ++ Documentation/networking/statistics.rst | 57 ++++++++- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 17 +++ .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 11 ++ .../net/ethernet/mellanox/mlx4/en_ethtool.c | 19 +++ .../net/ethernet/mellanox/mlx4/mlx4_stats.h | 12 ++ .../ethernet/mellanox/mlx5/core/en_ethtool.c | 9 ++ .../net/ethernet/mellanox/mlx5/core/en_rep.c | 9 ++ .../ethernet/mellanox/mlx5/core/en_stats.c | 29 +++++ .../ethernet/mellanox/mlx5/core/en_stats.h | 3 + drivers/net/netdevsim/Makefile | 2 +- drivers/net/netdevsim/ethtool.c | 64 +++++++++++ drivers/net/netdevsim/netdev.c | 1 + drivers/net/netdevsim/netdevsim.h | 11 ++ include/linux/ethtool.h | 26 +++++ include/uapi/linux/ethtool_netlink.h | 18 ++- net/ethtool/pause.c | 63 +++++++++- .../drivers/net/netdevsim/ethtool-pause.sh | 108 ++++++++++++++++++ 18 files changed, 462 insertions(+), 8 deletions(-) create mode 100644 drivers/net/netdevsim/ethtool.c create mode 100755 tools/testing/selftests/drivers/net/netdevsim/ethtool-pause.sh -- 2.26.2