From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA879A0A0C; Thu, 3 Jun 2021 19:31:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10D63410EF; Thu, 3 Jun 2021 19:31:30 +0200 (CEST) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by mails.dpdk.org (Postfix) with ESMTP id 4068A410EE for ; Thu, 3 Jun 2021 19:31:29 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 153HVQCQ013170 for ; Thu, 3 Jun 2021 10:31:27 -0700 From: Rahul Lakkireddy To: dev@dpdk.org Date: Thu, 3 Jun 2021 21:00:26 +0530 Message-Id: <486c59f029b52b0931d3517a5034bac8622fb906.1622738751.git.rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/2] net/cxgbe: remove queue stats from basic stats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove queue stats from basic stats because they're now available via xstats API. Also remove RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS flag. Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe_ethdev.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 8dee3fc3b6..141a2de808 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -747,22 +747,12 @@ static int cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev, eth_stats->oerrors = ps.tx_error_frames; for (i = 0; i < pi->n_rx_qsets; i++) { - struct sge_eth_rxq *rxq = - &s->ethrxq[pi->first_rxqset + i]; + struct sge_eth_rxq *rxq = &s->ethrxq[pi->first_rxqset + i]; - eth_stats->q_ipackets[i] = rxq->stats.pkts; - eth_stats->q_ibytes[i] = rxq->stats.rx_bytes; - eth_stats->ipackets += eth_stats->q_ipackets[i]; - eth_stats->ibytes += eth_stats->q_ibytes[i]; + eth_stats->ipackets += rxq->stats.pkts; + eth_stats->ibytes += rxq->stats.rx_bytes; } - for (i = 0; i < pi->n_tx_qsets; i++) { - struct sge_eth_txq *txq = - &s->ethtxq[pi->first_txqset + i]; - - eth_stats->q_opackets[i] = txq->stats.pkts; - eth_stats->q_obytes[i] = txq->stats.tx_bytes; - } return 0; } @@ -1697,8 +1687,6 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev) return 0; } - eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; - snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id); adapter = rte_zmalloc(name, sizeof(*adapter), 0); if (!adapter) -- 2.27.0