From patchwork Tue Sep 7 19:59:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Thompson X-Patchwork-Id: 1525486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=OdlgKgc0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3x1V168Vz9t0T; Wed, 8 Sep 2021 05:59:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mNhFa-0006s6-9G; Tue, 07 Sep 2021 19:59:22 +0000 Received: from mail-dm6nam08on2053.outbound.protection.outlook.com ([40.107.102.53] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mNhFX-0006rj-EH for kernel-team@lists.ubuntu.com; Tue, 07 Sep 2021 19:59:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aB0il7maUZKANFsf+peENYPYxij1wLzTgkliLmfwgifOWrL/5rSQOMIAqxoZ/8lep1mWlyuimNEbj782VNjjFPc9p9Iscx2FekvS+6DDYkzI7EbLt+AJ27TnJ1IiaTUY9CMh2xlpACa0VK61kDIcd/cIEhaJl9SiJuoQpbvr/42i+/RmD812NEXBA4fazLkLgnw7Iy3UVqW99xpJanxZrTC+4yywR5hwqU3QhN+PPQ6Ra9EN9ERk8O6iml6485iqB30QbrGtw1U7Yf69YrrBVXjO0Bj+I79BtTsOLCgl83/p3nHvMQiVBxBf7TOPK0M/sxNJRFS/n5XVct9IrYjw1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=i7JByqioKWRb5DkEIQQOhmDH+kooNsj3KnFA21JvPK8=; b=FK5To0NEncTkBTa8nSW2E74d+oYNrMjjdRMvgbGtefqLPAjKCCnFdK8/ksu+F/3VpYccdgpaogBulZPwFK8+wxlUdRhJ7BTX58vH3MKuBtIxOJoAn8E85qWiaO9xmCrtQCn3M8gFsl1fIJVfqBoXOkstquDznDAKvc45d2quKPPGwxtgNk8fTDNVtfLnwiNJwIRiRFnQIKAGwNjdy2/3GXMSXAp0aE52J3Xs3gJk3Rh61Mwo60rjs0GHLrVsAX8oQ4ojVTctPuqU22v0LqqmK0FLyH4IduqLsrVsZsGMTCLpV+wiyA0VLjKUI5JkxMf6kaQeQA9nQWrYFXhNVs228g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i7JByqioKWRb5DkEIQQOhmDH+kooNsj3KnFA21JvPK8=; b=OdlgKgc0CvRSGmuKrz2e1C4oUkKhsb4hXPDYfwhrWvc1JSBuN5K0gr7hYzMk1uEVMfeTsjJtZBIGdC8zg7rbyQkMpWmVz0i1F0PDFQwJk+3wBwqSm58Ua15bZwo8Are4kjmMmGf9pa3qctH/IYIo8gkmMCmGM0v8znEyq44EV462YO8HDohuEMpBFrGUBQzfkIHDUZRaF5cenDHOuk02J0TjSsiACqYN+5DjVPx0rEeYeo51zvwaJ5b6x8/VTnDdoxE2R4jz5966M9SRveo4kwnnmSGEKlC/SlH6nH7XkP/YgPY+6Ht7eyedGcP4oc0dKCYW2dg4hXSpyspXwNXnTg== Received: from BN0PR04CA0117.namprd04.prod.outlook.com (2603:10b6:408:ec::32) by CY4PR12MB1319.namprd12.prod.outlook.com (2603:10b6:903:41::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Tue, 7 Sep 2021 19:59:17 +0000 Received: from BN8NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ec:cafe::d5) by BN0PR04CA0117.outlook.office365.com (2603:10b6:408:ec::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Tue, 7 Sep 2021 19:59:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) smtp.mailfrom=nvidia.com; lists.ubuntu.com; dkim=none (message not signed) header.d=none;lists.ubuntu.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by BN8NAM11FT052.mail.protection.outlook.com (10.13.177.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4500.14 via Frontend Transport; Tue, 7 Sep 2021 19:59:17 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 7 Sep 2021 12:59:16 -0700 Received: from vdi.nvidia.com (172.20.187.6) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 7 Sep 2021 19:59:15 +0000 From: David Thompson To: Subject: [SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf_gige: add interrupt counts to "ethtool -S" Date: Tue, 7 Sep 2021 15:59:00 -0400 Message-ID: <73fae5e781b26c7076f94d760f374019bc371c2b.1631043315.git.davthompson@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da715e4b-e11d-402f-3104-08d97239f960 X-MS-TrafficTypeDiagnostic: CY4PR12MB1319: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ug/C9P16QbYHkdwy21qOtQeWLP/6UP+ZXX2ipZB19+jsxyrB2WnTlIGXX+YAnSHRB1hPTeotqK0PbNADyr3pENO5PbIiuiYZisHw5s+yeXpW3ipLQDQxSNyAmqyw7Nwnm3E5xgztfr318LrS9b4obnwSLwWA9EdRPd/wEYFnY3of9CRDSEzteDg6/e/dGZMoH6+PwYnC73F6pSy2/vyIhGKVUn0GluiixDEGzDlvm2/GSQkv3+2wN5+eJxxNWFYaaIn5C7Xq1LZfY+aYsjbBSo1F58YMUHOF8OYLNqtMaYByipM14a2ImSGmDC7ndSKmIKHrG++MdJrmdMo/3r+3W0WvCrxZJjzu8i+vQqJdavBD169rSGbsseyNzM7fTwoim7q35fbvMf0FK/NSGvdd3sVeDzslvNYNrj48lOpnv9KBr3p6ciRbZJuxv9P3g34b/R9NjxsST3p3vOuKY/vmPLWLz4aVZZKry0hkwWYlPy43AzNe8N6IQGE4jsjM6hV5egjCV5miGg4osDHYdc/PA0MIm0o11vi1dA4XAzT7UXFc/9Sm+1R3yyft6eDAZYvwNSsbnU3WjtSWoeXWPVXqzsMLFTGf1A+d0Qvd6uKK2wUkIyZFY7zKzaCghjle+tYuEyMR1+7tsyMUempU3lXvEAzbsUcDIcl8Q+WHiU5gzME9mPnada8ucXidMIJzG7XLqFB+ORXIf/FNUAHQZsEZyes0zBS7GwxId4ViKpMSK74ho46NntZiXWafgp3jtBHiI0FmVXejA7mLA+r5lAVethU3AX03a0pp4s/EusMmYf8= X-Forefront-Antispam-Report: CIP:216.228.112.32; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid01.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(86362001)(36860700001)(82310400003)(2906002)(6666004)(8676002)(316002)(83380400001)(47076005)(7696005)(186003)(4326008)(8936002)(426003)(2616005)(36756003)(70206006)(70586007)(107886003)(966005)(508600001)(5660300002)(356005)(26005)(54906003)(7636003)(336012)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 19:59:17.0569 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da715e4b-e11d-402f-3104-08d97239f960 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.32]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1319 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: meriton@nvidia.com, khoav@nvidia.com, David Thompson , Asmaa Mnebhi Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1942931 This patch extends the output of "ethtool -S oob_net0", adding interrupt counts for the three interrupt types. Reviewed-by: Asmaa Mnebhi Signed-off-by: David Thompson Acked-by: Kleber Sacilotto de Souza Acked-by: Tim Gardner --- .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c index 24a32ffee4e4..972c202a9081 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c @@ -24,11 +24,9 @@ static void mlxbf_gige_get_regs(struct net_device *netdev, regs->version = MLXBF_GIGE_REGS_VERSION; /* Read entire MMIO register space and store results - * into the provided buffer. Each 64-bit word is converted - * to big-endian to make the output more readable. - * - * NOTE: by design, a read to an offset without an existing - * register will be acknowledged and return zero. + * into the provided buffer. By design, a read to an + * offset without an existing register will be + * acknowledged and return zero. */ memcpy_fromio(p, priv->base, MLXBF_GIGE_MMIO_REG_SZ); } @@ -96,6 +94,9 @@ static const struct { { "tx_fifo_full" }, { "rx_filter_passed_pkts" }, { "rx_filter_discard_pkts" }, + { "mac_intr_count" }, + { "rx_intr_count" }, + { "llu_plu_intr_count" }, }; static int mlxbf_gige_get_sset_count(struct net_device *netdev, int stringset) @@ -150,6 +151,9 @@ static void mlxbf_gige_get_ethtool_stats(struct net_device *netdev, readq(priv->base + MLXBF_GIGE_RX_PASS_COUNTER_ALL)); *data++ = (priv->stats.rx_filter_discard_pkts + readq(priv->base + MLXBF_GIGE_RX_DISC_COUNTER_ALL)); + *data++ = priv->error_intr_count; + *data++ = priv->rx_intr_count; + *data++ = priv->llu_plu_intr_count; } static void mlxbf_gige_get_pauseparam(struct net_device *netdev,