Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1183293rdb; Fri, 22 Dec 2023 18:59:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaFf0HqpcVLo6mMEUwitbgAdE6frQCD8yE9rjGEC9ItrLOvZ7rDYSXBIW40jbGgs8lTenn X-Received: by 2002:a17:906:fac5:b0:a23:5fac:1496 with SMTP id lu5-20020a170906fac500b00a235fac1496mr1172571ejb.50.1703300383870; Fri, 22 Dec 2023 18:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703300383; cv=none; d=google.com; s=arc-20160816; b=B7aLsUT0zPsz6xoH0OFRqOJUg5pV/eV2ats/kPUj4ndNuhM5E5WnN8Hi5+MWSF/A7m 2FWh1QgR6PNIiYZHlqVIdAgQ8CUMTdmO7MYk8+NGRGgzris3DctnLEcWXjq2whMgZicZ PlUAOkhtfQ4lWc/1RjpYaEjB7Kic5KocnJfDxEAj6/kDhX0uZsF4CyHOMvKFEgAu/IjJ MfnuJWhQe4e51WLrCDfe/VqLCkjjetoc/ib/WvGNrHBmW9aGM1rVRGkHgg087wvl7fAO pYBmMH7UHv2MbcD23qtfyvc1LqZrg8XeYihAe0+mbb4c1HP0GMmZbsPMi2ivdkXqMMzy 7trQ== ARC-Message-Signature: i=1; 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=FlRQmpbf1Wgz/2/INfA1I5Nv0GdHyrQQjsTkWUm+8lo=; fh=J3H3jkZRTdH/CD0R7uXO8r43FYFiJ1FqB2ouoqeBxmQ=; b=eWy1r1Qly39MkrLFTTKzlfb0mY9CveD/X6sibAYSMlU7EBXbiSe8egWEEph1VGCzwV mMWW31sUJI+llYK44id6kJSo0z6yQv0EN0appa8T7ywSKI0SeLycdFVJDI1x/js54kpm WcoAsiZiqeq5jZjtyo3ePt+EM4ayZ71+BQVQMBTWwTgen6QNHhs0oYGWIk0kGL6F1poG pTDO69F5HDza5QYw5hhZGlXkV/6kfJXjbYB1qKO042xaKxCDS+T9cGqTZPeaKYESBGXm gxiH0QzvTiPnN5WPVqhykxZfam/81K/GkD26lcZ3D5Nve2HhUYIg93uOYWa6aQlwbPFL SL8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hv9LU3pd; spf=pass (google.com: domain of linux-kernel+bounces-10219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ay23-20020a170907901700b00a26add7ee02si1627369ejc.20.2023.12.22.18.59.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 18:59:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hv9LU3pd; spf=pass (google.com: domain of linux-kernel+bounces-10219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10219-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 78CFF1F23A46 for ; Sat, 23 Dec 2023 02:59:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E15ABC8CC; Sat, 23 Dec 2023 02:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hv9LU3pd" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (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 9BB72AD5D; Sat, 23 Dec 2023 02:58:15 +0000 (UTC) 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=1703300295; x=1734836295; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uSYENsBIhPh3bIPzm6fju9Ktn483588qG7FmN6H9bU0=; b=hv9LU3pdJrUF9GJ7Vpoc0eDTaJkYLZpKCMzfqKP8Tb7OQ2iVi2z6B74e WhShbxHpQYBSsrHDB5+eCrlzLExO1GgJlqwJwfjmMs91Pg0jA2edcBzhg 0QWPo4eVz6OMm2oqMtKjLJI3kfEedkN+q/q6p+FNngbxH5/K9WfdD1Bed nfvCdAW2FiidzA+VQPYeC1k5/9iWJczDQ3PK0DA0OCWGFYMhdlUdK5Rce kaClht9tJc/NJ40FiNTxS1BPB8HubS8v0ICOn+Gr25aMf9L9Esq7fU72F VXb/7jSvvW/MYHyLRFuwynpPtYzAYbtnmelXNl7K3CUd9vL68euj6lT0j A==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="386610788" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="386610788" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 18:58:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="25537405" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa001.jf.intel.com with ESMTP; 22 Dec 2023 18:58:12 -0800 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , Maciej Fijalkowski , Michal Kubiak , Larysa Zaremba , Alexei Starovoitov , Daniel Borkmann , Willem de Bruijn , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC net-next 03/34] idpf: remove legacy Page Pool Ethtool stats Date: Sat, 23 Dec 2023 03:55:23 +0100 Message-ID: <20231223025554.2316836-4-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231223025554.2316836-1-aleksander.lobakin@intel.com> References: <20231223025554.2316836-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. Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/intel/Kconfig | 1 - .../net/ethernet/intel/idpf/idpf_ethtool.c | 29 +------------------ 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 0db1aa36866e..d2e9bef2e0cb 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig @@ -380,7 +380,6 @@ config IDPF select DIMLIB select LIBIE 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 986d429d1175..da7963f27bd8 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c @@ -571,8 +571,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); } /** @@ -606,7 +604,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; @@ -625,11 +622,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; } /** @@ -877,7 +871,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; @@ -947,32 +940,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); - - /* 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_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.43.0