From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] net/cxgbe: remove queue stats from basic stats
Date: Thu, 1 Jul 2021 17:50:19 +0300 [thread overview]
Message-ID: <bdc1d7ab-5515-78bb-c7b2-97846c1d2bfb@oktetlabs.ru> (raw)
In-Reply-To: <486c59f029b52b0931d3517a5034bac8622fb906.1622738751.git.rahul.lakkireddy@chelsio.com>
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 <rahul.lakkireddy@chelsio.com>
> ---
> 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?
next prev parent reply other threads:[~2021-07-01 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 15:30 [dpdk-dev] [PATCH 0/2] net/cxgbe: add support for xstats API Rahul Lakkireddy
2021-06-03 15:30 ` [dpdk-dev] [PATCH 1/2] " Rahul Lakkireddy
2021-07-01 14:48 ` Andrew Rybchenko
2021-06-03 15:30 ` [dpdk-dev] [PATCH 2/2] net/cxgbe: remove queue stats from basic stats Rahul Lakkireddy
2021-07-01 14:50 ` Andrew Rybchenko [this message]
2021-07-01 15:26 ` Rahul Lakkireddy
2021-07-01 15:33 ` Andrew Rybchenko
2021-07-01 16:56 ` [dpdk-dev] [PATCH v2 0/2] net/cxgbe: add support for xstats API Rahul Lakkireddy
2021-07-01 16:56 ` [dpdk-dev] [PATCH v2 1/2] " Rahul Lakkireddy
2021-07-01 16:56 ` [dpdk-dev] [PATCH v2 2/2] net/cxgbe: remove queue stats from basic stats Rahul Lakkireddy
2021-07-02 9:27 ` [dpdk-dev] [PATCH v2 0/2] net/cxgbe: add support for xstats API Andrew Rybchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdc1d7ab-5515-78bb-c7b2-97846c1d2bfb@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=rahul.lakkireddy@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).