From patchwork Mon Apr 19 20:02:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 424322 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 C2AC3C433ED for ; Mon, 19 Apr 2021 20:03:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96C0461369 for ; Mon, 19 Apr 2021 20:03:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242061AbhDSUD3 (ORCPT ); Mon, 19 Apr 2021 16:03:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:38644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhDSUDO (ORCPT ); Mon, 19 Apr 2021 16:03:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D22AB613AC; Mon, 19 Apr 2021 20:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618862564; bh=l7tbs71vNbfqZ/AP/qGjqBVLU20kb4G96/EQ/B0Bs5g=; h=From:To:Cc:Subject:Date:From; b=LlQMdTGZ2FJ58I0UAbrwNjooQmZt/DtfaSg+GAOcxUeCI1OTLJ8PpEikUKKNaLXEY H7lCTJiqUt1BECZGNrOwxNM0H7vjTHQflbu/uwV/SKBo9wotYqsAnGp7klbCiOPAce XWzVA50MPtoj+cLvcfzTg6S1ecAtNxtWYJb6pUI+Fq/ouJU04l+0ieqy5mtkLvwBVs iZ1mapfoSBvv1wkeGsLZ0NyTg4lX8waydhdYgy96xqx6rPD5l5EuuMkQ9sYitItHvQ i9UhWD09DZtHWemh/p9IIptuLrQt6bq5II5SEgSaPOm0/wljHXAHqVDHicD7Mj8PWH F/Glhl+9Zvk0g== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, michael.chan@broadcom.com, Jakub Kicinski Subject: [PATCH net-next] bnxt: add more ethtool standard stats Date: Mon, 19 Apr 2021 13:02:42 -0700 Message-Id: <20210419200242.2984499-1-kuba@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Michael suggest a few more stats we can expose. $ ethtool -S eth0 --groups eth-mac Standard stats for eth0: eth-mac-FramesTransmittedOK: 902623288966 eth-mac-FramesReceivedOK: 28727667047 eth-mac-FrameCheckSequenceErrors: 1 eth-mac-AlignmentErrors: 0 eth-mac-OutOfRangeLengthField: 0 $ ethtool -S eth0 | grep '\(fcs\|align\|oor\)' rx_fcs_err_frames: 1 rx_align_err_frames: 0 tx_fcs_err_frames: 0 Suggested-by: Michael Chan Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 832252313b18..3b66e300c962 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -4020,6 +4020,12 @@ static void bnxt_get_eth_mac_stats(struct net_device *dev, BNXT_GET_RX_PORT_STATS64(rx, rx_good_frames); mac_stats->FramesTransmittedOK = BNXT_GET_TX_PORT_STATS64(tx, tx_good_frames); + mac_stats->FrameCheckSequenceErrors = + BNXT_GET_RX_PORT_STATS64(rx, rx_fcs_err_frames); + mac_stats->AlignmentErrors = + BNXT_GET_RX_PORT_STATS64(rx, rx_align_err_frames); + mac_stats->OutOfRangeLengthField = + BNXT_GET_RX_PORT_STATS64(rx, rx_oor_len_frames); } static void bnxt_get_eth_ctrl_stats(struct net_device *dev,