Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1989740ybt; Thu, 2 Jul 2020 20:29:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9CQI0xTLbacP/G7R6cujmyetoaaoPnmZLtG93yQxTFa30sfGRUKK7naXbz5eyeQTtJ05o X-Received: by 2002:a17:906:6d56:: with SMTP id a22mr31444234ejt.440.1593746947854; Thu, 02 Jul 2020 20:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593746947; cv=none; d=google.com; s=arc-20160816; b=fcUEn1dIjaJf1rB6YXUmFNjnEqTbITS4f0tqihMO1/kAVlLNa6u9saLu6Ued3sau8B pY8e9eq7qGtfEnjS1yel+v17UFKHieWuW+f3Njg734g+wmjrY0j0zw0q7guRRYD1t+9b hHz3zRWSJQ5fiNu+NF3eMxyui9ccjSFOQx/ZYkzwzSSELuNIdWK2mZf4DkkGYvAPOACS 9cHYA8u/19q5Ptr3aFU7jwrvKRyXMtftSP529n91zEq944QFP1P/lDiQ4f8qV1S8sxUf Egznw/isNANWH0YaJTUV5pM0QnpxjsiFOuxtfaoUBJbq5TxrB5jx9NQrTEe358fxudNw 2/pA== 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=sYugRGDZweQF54WmRWWjAnmVDrJxZd1Dw1CTLLBCn6E=; b=Ibn9Gy7RlV6hp/e6Zuh7lehhjeP2zQ7FQa6qFJ4SjNetANFYc6TKNdHOkDB0kz4mcp 3tT4l//yga9LMDg5N/BW+qFT2HH4eidg6fs57dVGFbG6y2le/QpR3kyi/7eJ/Y1KAY3n i0jHeLRvkA7SmZcRRznqNfCpLkSXdkvmYqbQ0Av3LraIWuPe8mSF0TIiGCUToGLPOany 6mx8TEMmQ6JvYBQr36/bi3w4sUHn697fcrPa4rZ/1bcYqSBSZlZJ5tMApnZ8PeCX4EsD JYiMwzCVCi567Axso1tVDw4pzIHnTV1LiVt585wc5/fzaOeZtRYqmXApd6C8mfbzCsYA hepw== 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 zh8si6897397ejb.305.2020.07.02.20.28.44; Thu, 02 Jul 2020 20:29:07 -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 S1726300AbgGCD2a (ORCPT + 99 others); Thu, 2 Jul 2020 23:28:30 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:33631 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726151AbgGCD2V (ORCPT ); Thu, 2 Jul 2020 23:28:21 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with SMTP; 3 Jul 2020 06:28:16 +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 0633SGM9006803; Fri, 3 Jul 2020 06:28:16 +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 0633SG5b006669; Fri, 3 Jul 2020 06:28:16 +0300 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 0633SGC2006668; Fri, 3 Jul 2020 06:28:16 +0300 From: Moshe Shemesh To: "David S. Miller" Cc: Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vladyslav Tarasiuk Subject: [PATCH net-next v2 7/7] net/mlx5e: Move devlink-health rx and tx reporters to devlink port Date: Fri, 3 Jul 2020 06:27:38 +0300 Message-Id: <1593746858-6548-8-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1593746858-6548-1-git-send-email-moshe@mellanox.com> References: <1593746858-6548-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 c209579..35df79d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c @@ -565,13 +565,10 @@ void mlx5e_reporter_icosq_cqe_err(struct mlx5e_icosq *icosq) int 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)); @@ -586,5 +583,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 9805fc0..917aef9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -409,14 +409,9 @@ int mlx5e_reporter_tx_timeout(struct mlx5e_txqsq *sq) int 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", @@ -432,5 +427,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