Skip to content

Commit 4309363

Browse files
alobakinanguy11
authored andcommitted
idpf: remove legacy Page Pool Ethtool stats
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 <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Alexander Lobakin <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 1b1b262 commit 4309363

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

drivers/net/ethernet/intel/idpf/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ config IDPF
77
select DIMLIB
88
select LIBETH
99
select PAGE_POOL
10-
select PAGE_POOL_STATS
1110
help
1211
This driver supports Intel(R) Infrastructure Data Path Function
1312
devices.

drivers/net/ethernet/intel/idpf/idpf_ethtool.c

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,6 @@ static void idpf_get_stat_strings(struct net_device *netdev, u8 *data)
565565
for (i = 0; i < vport_config->max_q.max_rxq; i++)
566566
idpf_add_qstat_strings(&data, idpf_gstrings_rx_queue_stats,
567567
"rx", i);
568-
569-
page_pool_ethtool_stats_get_strings(data);
570568
}
571569

572570
/**
@@ -600,7 +598,6 @@ static int idpf_get_sset_count(struct net_device *netdev, int sset)
600598
struct idpf_netdev_priv *np = netdev_priv(netdev);
601599
struct idpf_vport_config *vport_config;
602600
u16 max_txq, max_rxq;
603-
unsigned int size;
604601

605602
if (sset != ETH_SS_STATS)
606603
return -EINVAL;
@@ -619,11 +616,8 @@ static int idpf_get_sset_count(struct net_device *netdev, int sset)
619616
max_txq = vport_config->max_q.max_txq;
620617
max_rxq = vport_config->max_q.max_rxq;
621618

622-
size = IDPF_PORT_STATS_LEN + (IDPF_TX_QUEUE_STATS_LEN * max_txq) +
619+
return IDPF_PORT_STATS_LEN + (IDPF_TX_QUEUE_STATS_LEN * max_txq) +
623620
(IDPF_RX_QUEUE_STATS_LEN * max_rxq);
624-
size += page_pool_ethtool_stats_get_count();
625-
626-
return size;
627621
}
628622

629623
/**
@@ -876,7 +870,6 @@ static void idpf_get_ethtool_stats(struct net_device *netdev,
876870
{
877871
struct idpf_netdev_priv *np = netdev_priv(netdev);
878872
struct idpf_vport_config *vport_config;
879-
struct page_pool_stats pp_stats = { };
880873
struct idpf_vport *vport;
881874
unsigned int total = 0;
882875
unsigned int i, j;
@@ -946,32 +939,12 @@ static void idpf_get_ethtool_stats(struct net_device *netdev,
946939
idpf_add_empty_queue_stats(&data, qtype);
947940
else
948941
idpf_add_queue_stats(&data, rxq, qtype);
949-
950-
/* In splitq mode, don't get page pool stats here since
951-
* the pools are attached to the buffer queues
952-
*/
953-
if (is_splitq)
954-
continue;
955-
956-
if (rxq)
957-
page_pool_get_stats(rxq->pp, &pp_stats);
958-
}
959-
}
960-
961-
for (i = 0; i < vport->num_rxq_grp; i++) {
962-
for (j = 0; j < vport->num_bufqs_per_qgrp; j++) {
963-
struct idpf_buf_queue *rxbufq =
964-
&vport->rxq_grps[i].splitq.bufq_sets[j].bufq;
965-
966-
page_pool_get_stats(rxbufq->pp, &pp_stats);
967942
}
968943
}
969944

970945
for (; total < vport_config->max_q.max_rxq; total++)
971946
idpf_add_empty_queue_stats(&data, VIRTCHNL2_QUEUE_TYPE_RX);
972947

973-
page_pool_ethtool_stats_get(data, &pp_stats);
974-
975948
rcu_read_unlock();
976949

977950
idpf_vport_ctrl_unlock(netdev);

0 commit comments

Comments
 (0)