DPDK patches and discussions
 help / color / mirror / Atom feed
From: edwin.brossette@6wind.com
To: dev@dpdk.org
Cc: maxime.coquelin@redhat.com, ferruh.yigit@amd.com,
	olivier.matz@6wind.com, stable@dpdk.org,
	Edwin Brossette <edwin.brossette@6wind.com>
Subject: [PATCH] net/virtio: fix duplicated rxq xstats
Date: Fri, 24 Nov 2023 14:52:36 +0100	[thread overview]
Message-ID: <20231124135235.1831304-1-edwin.brossette@6wind.com> (raw)
In-Reply-To: <CANDF9xARG2SvzRRK_3+8RK2SCP_Zj7DggOtPmnNDR9sWmr-j5Q@mail.gmail.com>

From: Edwin Brossette <edwin.brossette@6wind.com>

The flag RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS was temporarily set while
moving queue stats from 'struct rte_eth_stats' to the individual pmds,
as explained in commit f30e69b41f94 ("ethdev: add device flag to bypass
auto-filled queue xstats").

This flag was added so every pmd would keep its original behavior until
the change was implemented. However, this flag was not removed
afterwards in the virtio pmd and as a result, some queue stats are
displayed twice when trying to get them: once in lib_rte_ethdev, and a
second time in the virtio pmd.

Remove this flag so stats are printed only once.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")
Cc: stable@dpdk.org

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index c2c0a1a11137..517585740eeb 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1793,8 +1793,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	else
 		eth_dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
 
-	eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
 	/* Setting up rx_header size for the device */
 	if (virtio_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF) ||
 	    virtio_with_feature(hw, VIRTIO_F_VERSION_1) ||
-- 
2.35.0.4.g44a5d4affccf


  parent reply	other threads:[~2023-11-24 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24  9:18 net/virtio: duplicated xstats Edwin Brossette
2023-11-24  9:26 ` Olivier Matz
2023-11-24 10:39   ` Maxime Coquelin
2023-11-24 13:13     ` Edwin Brossette
2023-11-24 13:16       ` Maxime Coquelin
2023-11-24 13:52 ` edwin.brossette [this message]
2023-11-27 10:20   ` [PATCH] net/virtio: fix duplicated rxq xstats Ferruh Yigit
2024-02-06 14:56   ` Maxime Coquelin
2023-11-27 10:19 ` net/virtio: duplicated xstats Ferruh Yigit
2023-11-27 10:22   ` Ferruh Yigit

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=20231124135235.1831304-1-edwin.brossette@6wind.com \
    --to=edwin.brossette@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /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).