Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2658518lqb; Tue, 28 May 2024 06:52:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3mp/757Wk2xK23DevhyaOC0taTFo3TmA8r7HGbndqKu6u/GR5aQhDKFogB4V6kDOPL3T+qFs0gY2VlQIu7Fh/1hCNmLLHGq9OAwcKRQ== X-Google-Smtp-Source: AGHT+IHxNX5Mvlt/sIrasJmrNbgzGKY3d6jZe/vBZkGq46MefWWzA5GW8vUQ3PddL9n4bGpopPi/ X-Received: by 2002:a17:90a:d30f:b0:2bd:f6a7:1d05 with SMTP id 98e67ed59e1d1-2bf5ee1cb28mr10810937a91.18.1716904338532; Tue, 28 May 2024 06:52:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716904338; cv=pass; d=google.com; s=arc-20160816; b=OlTGJCiXd7ln0Zzij8drchUYfLg71BhAhon14w6wpAtUk9FmtbErnniA21M4wP9Eyc V/q51K/N9QJf8tifID2iXpK16ZofKym2ncRDLLkIPsIxKVSGdOYHlu+C9oNJ6JRQNJSB 7ZcukELQ6pVy4TnqbVOzGhY7BMRRV4EVOBAan+hdPdFdu7iok8vy3OkD+d1OADfycnAW 6b3lp2RYj/DiUVxD3kNhx6McHkJB1qg7mtIy6NUCjE7m5yQgs5+BMbF7+Az9YfDgCPiV 0ZZT6k1DQ90P9PZ5rVFfRklEfLXHhVfEPqIJ4nAzZUpt+GociLRvH/uluRhWwfR7UtZ2 mvxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7WCyb6ColYKlZ5FmyRgB69EdmlLvyn15QqxIHA1bap0=; fh=QNefxTyOcigKU2iYA2pdNn/EzFnxI1Ncw1QDULi8Nbw=; b=cZcBSZyu3SFYW3heUp1FlDsZaGByrd4xAm4K5VeSZ33z0M9trSy+s06WuG5dza3OBv AkRka02NT3FX1h2B7eZWUU8dLUnl864DOJhJ/xMpL4nqgsveVQLU9B27aojkE4HDHbWA wnEEFQtym84devKxo85GrwdmQ+zfRUVudsLgeQREWoZ98tFZpJcttYOD0fjD1Z6smdiN gYIgHONu7TEpW7jajxnxYQJjSgLbD8/H12vmoPX8PVrolZUp+siaMc2oNKuV1Ae8RTAp mkoZ4ABxkUqBShkR727uudzmmk6w5l7qXgCpMFgE+jE2E/S+ujz8Z5XOrn/j1k0tQwVl sbGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a43CY02t; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-192459-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bff97753edsi2138508a91.9.2024.05.28.06.52.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 06:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192459-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a43CY02t; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-192459-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 60F10286199 for ; Tue, 28 May 2024 13:51:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CA05171671; Tue, 28 May 2024 13:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a43CY02t" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24792171653; Tue, 28 May 2024 13:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716904190; cv=none; b=fcia+m2HXh91ZezBmyrYNEruNkm0fVsj+EV15eC40QLCXTVuqYO9D19x/FGtwuK6k8GlLEEcg8zmn/7qMiUpXTSp/p0O1uMXD5h9BNYf/WSDIIeko9d+Xifz76HnXk2uVaEbxlfe23/dOTA9LbYIY5uDVnIvkgsOHbHMJkT5xiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716904190; c=relaxed/simple; bh=xUu4d084D1+ey2WxhYeVFQu2HZnxL+3lmr6vPuv2lKU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QUeXvTp5+bDTYbk7FaEfB35jRv3/JQaNGCIe3VcvPKqcKyKbwxsYSI7paCh0Nh59zS2RaZHFBS1Qu2MZH6TWu533avQU3QK2Xxr1xumvuKfOl0WxwYAvD4tx99vJuZDTVuupn9NkjRmeGNuPD+UBbSO70L7I+SlGdv543JXBTpQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=a43CY02t; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716904189; x=1748440189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xUu4d084D1+ey2WxhYeVFQu2HZnxL+3lmr6vPuv2lKU=; b=a43CY02tPkHeJqo8YYdzTwzKkAuDMlk1Xf5avehR6xiHVXBiu4EAB6aC HdfKoJfa1sb34Efxgc0VAvGUKGu6e/fBy9wknJNrBcKfflL4+Ab/Rwe/n jYdENgH6I0yT15jjrHrkxOkdqvjbqufMweo/gPBIbh8SwNdG0JooOsZNE N1lOcCbTJwIOauWoGXmtw0gGos8OlENZ6rsbwYY4v85yd8zF+omg9OBEX RY/BMDbVRsURRQ2y5AH3WFkz7Syyzaam+IWzFp6MrDqZOT5gH8rIKsNOI cKFhCND9SoqQaiQeHvOW2DQGPg+G9GaMMjt8EaIhePpIITbAVhGyRVrP3 g==; X-CSE-ConnectionGUID: ks3C1NqYTsmso/6yzW05Wg== X-CSE-MsgGUID: g6BJD8vqSR+63d4y8OxeeQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13437054" X-IronPort-AV: E=Sophos;i="6.08,195,1712646000"; d="scan'208";a="13437054" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 06:49:49 -0700 X-CSE-ConnectionGUID: /9pK1N1pQQiMsWs/1QBsfg== X-CSE-MsgGUID: 04CY1BevRUus85VilomAqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,195,1712646000"; d="scan'208";a="35577450" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa008.jf.intel.com with ESMTP; 28 May 2024 06:49:46 -0700 From: Alexander Lobakin To: intel-wired-lan@lists.osuosl.org Cc: Alexander Lobakin , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mina Almasry , nex.sw.ncis.osdt.itp.upstreaming@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Przemek Kitszel Subject: [PATCH iwl-next 09/12] idpf: remove legacy Page Pool Ethtool stats Date: Tue, 28 May 2024 15:48:43 +0200 Message-ID: <20240528134846.148890-10-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240528134846.148890-1-aleksander.lobakin@intel.com> References: <20240528134846.148890-1-aleksander.lobakin@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Page Pool Ethtool stats are deprecated since the Netlink Page Pool interface introduction. idpf receives big changes in Rx buffer management, including &page_pool layout, so keeping these deprecated stats does only harm, not speaking of that CONFIG_IDPF selects CONFIG_PAGE_POOL_STATS unconditionally, while the latter is often turned off for better performance. Remove all the references to PP stats from the Ethtool code. The stats are still available in their full via the generic Netlink interface. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/idpf/Kconfig | 1 - .../net/ethernet/intel/idpf/idpf_ethtool.c | 29 +------------------ 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/net/ethernet/intel/idpf/Kconfig b/drivers/net/ethernet/intel/idpf/Kconfig index 638484c5723c..1f071143d992 100644 --- a/drivers/net/ethernet/intel/idpf/Kconfig +++ b/drivers/net/ethernet/intel/idpf/Kconfig @@ -7,7 +7,6 @@ config IDPF select DIMLIB select LIBETH select PAGE_POOL - select PAGE_POOL_STATS help This driver supports Intel(R) Infrastructure Data Path Function devices. diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c index e933fed16c7e..3806ddd3ce4a 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c @@ -565,8 +565,6 @@ static void idpf_get_stat_strings(struct net_device *netdev, u8 *data) for (i = 0; i < vport_config->max_q.max_rxq; i++) idpf_add_qstat_strings(&data, idpf_gstrings_rx_queue_stats, "rx", i); - - page_pool_ethtool_stats_get_strings(data); } /** @@ -600,7 +598,6 @@ static int idpf_get_sset_count(struct net_device *netdev, int sset) struct idpf_netdev_priv *np = netdev_priv(netdev); struct idpf_vport_config *vport_config; u16 max_txq, max_rxq; - unsigned int size; if (sset != ETH_SS_STATS) return -EINVAL; @@ -619,11 +616,8 @@ static int idpf_get_sset_count(struct net_device *netdev, int sset) max_txq = vport_config->max_q.max_txq; max_rxq = vport_config->max_q.max_rxq; - size = IDPF_PORT_STATS_LEN + (IDPF_TX_QUEUE_STATS_LEN * max_txq) + + return IDPF_PORT_STATS_LEN + (IDPF_TX_QUEUE_STATS_LEN * max_txq) + (IDPF_RX_QUEUE_STATS_LEN * max_rxq); - size += page_pool_ethtool_stats_get_count(); - - return size; } /** @@ -876,7 +870,6 @@ static void idpf_get_ethtool_stats(struct net_device *netdev, { struct idpf_netdev_priv *np = netdev_priv(netdev); struct idpf_vport_config *vport_config; - struct page_pool_stats pp_stats = { }; struct idpf_vport *vport; unsigned int total = 0; unsigned int i, j; @@ -946,32 +939,12 @@ static void idpf_get_ethtool_stats(struct net_device *netdev, idpf_add_empty_queue_stats(&data, qtype); else idpf_add_queue_stats(&data, rxq, qtype); - - /* In splitq mode, don't get page pool stats here since - * the pools are attached to the buffer queues - */ - if (is_splitq) - continue; - - if (rxq) - page_pool_get_stats(rxq->pp, &pp_stats); - } - } - - for (i = 0; i < vport->num_rxq_grp; i++) { - for (j = 0; j < vport->num_bufqs_per_qgrp; j++) { - struct idpf_buf_queue *rxbufq = - &vport->rxq_grps[i].splitq.bufq_sets[j].bufq; - - page_pool_get_stats(rxbufq->pp, &pp_stats); } } for (; total < vport_config->max_q.max_rxq; total++) idpf_add_empty_queue_stats(&data, VIRTCHNL2_QUEUE_TYPE_RX); - page_pool_ethtool_stats_get(data, &pp_stats); - rcu_read_unlock(); idpf_vport_ctrl_unlock(netdev); -- 2.45.1