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 621DEA0A0C; Thu, 1 Jul 2021 16:50:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F366940141; Thu, 1 Jul 2021 16:50:20 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id AB8C940141 for ; Thu, 1 Jul 2021 16:50:19 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 5B1A77F4DA; Thu, 1 Jul 2021 17:50:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 5B1A77F4DA DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1625151019; bh=O5UB3Z33HrdPbt15xOstwKGcp1agXYnX+GIMIm3DPl8=; h=Subject:To:References:From:Date:In-Reply-To; b=FcaRi91CySJ0Lu0Buvhcsb9lIU7RBt0z8XQpPDF4vpSZz7o676OFWoYTtB+Q7ejLE 9ECxJleyKl0iekyWpeMcjxO6gpsHtbpvtPotcT8pAeazFYI3yPtAB+zXlgU6uRIGip DI+vQfVd/P1o3zFm5r9XFuMnKy/CpLszAi0pj+q8= To: Rahul Lakkireddy , dev@dpdk.org References: <486c59f029b52b0931d3517a5034bac8622fb906.1622738751.git.rahul.lakkireddy@chelsio.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Thu, 1 Jul 2021 17:50:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <486c59f029b52b0931d3517a5034bac8622fb906.1622738751.git.rahul.lakkireddy@chelsio.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [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" On 6/3/21 6:30 PM, Rahul Lakkireddy wrote: > 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) > As I understand it is correct to remove RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS to avoid duplication of per-queue stats in xstats. But I don't understand why per-queue stats are removed from basic stats. It still makes sense and useful. Am I missing something?