Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp497870ybt; Fri, 10 Jul 2020 05:27:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnOE814t5jIgp2jbAqudc9tz1NklHmLldZGOm59fTJbrM3n3TEScdGWl4VzM35K5xHS9o0 X-Received: by 2002:a17:906:3009:: with SMTP id 9mr43966125ejz.220.1594384022659; Fri, 10 Jul 2020 05:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594384022; cv=none; d=google.com; s=arc-20160816; b=SmDNsIMCzAuVxL2XfZ1VM6pdy6FYv/nzWgomvrVNYAC0ix8ZQ14JwjIb3SFNR6X/1w cCCSQSPlMLdTjQ6s45kBcgj+DgmraU4C0/0CNio/je9aOspF4WjISTG6J4Axbhn9LbcH ly5lTPlEteLzA7+OF5LajtX/CXMK9zneahXK+ttKypclLxCOcRoZMwimX3/AEkCgYbPH V7og7XeJxTV4n/jCCX9AV0X14R/Q2x8yH7+c9i8H+G8ZHpYFBBasJbeGB4//wu6hIggY onAU6bdwNj6y/KvE0Fu/vxDudDHXGVj2W2WOYr0F7QjNtLH7VwDOtbdfkgeu4FV65V/h itug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=k+6xHXGn5veu43pUnIAb8qXnEdb7F5fJp0kVnxHjc58=; b=FbLa2uZ+aFwdQBKrZJ2xjJ96QK7mEJrLLW2OVih4OI4jCwvm2luRe0izGcG05ehSiA AanuBIzR6uRMANTVMgP6afv4jcaz6eZ+aihkAx97eOAeGKVFp6cB8OblBi1+tmxaRuK6 DPnKyS20utBC1rEw3nDyGllmBkxdOZlmZiAaFiJayk0Or7IgTqvqrzhsSegl3JfnkX17 hCAXIUya1D/Aq0oyZkhVHJwsHy/9aZY1o6N+j1cw3K5U0FDRaCx0PrA25zGvsW1n8E9i QNQtM9sjyQfWqrUrp6cCJ7ipwkYY8oO5A1fUAzmqe/UBxA2gUPs5KB1tEpcWb9zt/aqU jsEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si3651299ejp.69.2020.07.10.05.26.38; Fri, 10 Jul 2020 05:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbgGJM0B (ORCPT + 99 others); Fri, 10 Jul 2020 08:26:01 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:51804 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727901AbgGJMZz (ORCPT ); Fri, 10 Jul 2020 08:25:55 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with SMTP; 10 Jul 2020 15:25:49 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (dev-l-vrt-136.mtl.labs.mlnx [10.234.136.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06ACPnML012407; Fri, 10 Jul 2020 15:25:49 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id 06ACPnXW003382; Fri, 10 Jul 2020 15:25:49 +0300 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 06ACPnh5003381; Fri, 10 Jul 2020 15:25:49 +0300 From: Moshe Shemesh To: "David S. Miller" , Jakub Kicinski Cc: Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vladyslav Tarasiuk Subject: [PATCH net-next v3 7/7] net/mlx5e: Move devlink-health rx and tx reporters to devlink port Date: Fri, 10 Jul 2020 15:25:13 +0300 Message-Id: <1594383913-3295-8-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1594383913-3295-1-git-send-email-moshe@mellanox.com> References: <1594383913-3295-1-git-send-email-moshe@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladyslav Tarasiuk Utilize new devlink-health port reporters API to move rx and tx reporters from device to port. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 9 +++------ drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 13 ++++--------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c index 32ed106..9913647 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c @@ -611,13 +611,10 @@ void mlx5e_reporter_icosq_cqe_err(struct mlx5e_icosq *icosq) void mlx5e_reporter_rx_create(struct mlx5e_priv *priv) { - struct devlink *devlink = priv_to_devlink(priv->mdev); struct devlink_health_reporter *reporter; - reporter = devlink_health_reporter_create(devlink, - &mlx5_rx_reporter_ops, - MLX5E_REPORTER_RX_GRACEFUL_PERIOD, - priv); + reporter = devlink_port_health_reporter_create(&priv->dl_port, &mlx5_rx_reporter_ops, + MLX5E_REPORTER_RX_GRACEFUL_PERIOD, priv); if (IS_ERR(reporter)) { netdev_warn(priv->netdev, "Failed to create rx reporter, err = %ld\n", PTR_ERR(reporter)); @@ -631,5 +628,5 @@ void mlx5e_reporter_rx_destroy(struct mlx5e_priv *priv) if (!priv->rx_reporter) return; - devlink_health_reporter_destroy(priv->rx_reporter); + devlink_port_health_reporter_destroy(priv->rx_reporter); } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c index 8265843..8be6eaa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -440,14 +440,9 @@ int mlx5e_reporter_tx_timeout(struct mlx5e_txqsq *sq) void mlx5e_reporter_tx_create(struct mlx5e_priv *priv) { struct devlink_health_reporter *reporter; - struct mlx5_core_dev *mdev = priv->mdev; - struct devlink *devlink; - - devlink = priv_to_devlink(mdev); - reporter = - devlink_health_reporter_create(devlink, &mlx5_tx_reporter_ops, - MLX5_REPORTER_TX_GRACEFUL_PERIOD, - priv); + + reporter = devlink_port_health_reporter_create(&priv->dl_port, &mlx5_tx_reporter_ops, + MLX5_REPORTER_TX_GRACEFUL_PERIOD, priv); if (IS_ERR(reporter)) { netdev_warn(priv->netdev, "Failed to create tx reporter, err = %ld\n", @@ -462,5 +457,5 @@ void mlx5e_reporter_tx_destroy(struct mlx5e_priv *priv) if (!priv->tx_reporter) return; - devlink_health_reporter_destroy(priv->tx_reporter); + devlink_port_health_reporter_destroy(priv->tx_reporter); } -- 1.8.3.1