DPDK patches and discussions
 help / color / mirror / Atom feed
From: "humin (Q)" <humin29@huawei.com>
To: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <linuxarm@huawei.com>,
	<bruce.richardson@intel.com>, <jerin.jacob@caviumnetworks.com>,
	"Zhouchang (Forest)" <forest.zhouchang@huawei.com>,
	"liudongdong (C)" <liudongdong3@huawei.com>,
	lihuisong <lihuisong@huawei.com>
Subject: [dpdk-dev] [RFC]lib/ethdev: fix rx/tx queue stats mapping API
Date: Sat, 8 Aug 2020 09:10:55 +0800
Message-ID: <6e438154-112a-0c21-48a5-9abb3e6d9ed3@huawei.com> (raw)

Currently, only statistics of rx/tx queues with queue_id less than
RTE_ETHDEV_QUEUE_STAT_CNTRS can be displayed. If there is a certain
application scenario that it needs to use 256 or more than 256 queues
and display all statistics of rx/tx queue. At this moment, we have to
change the macro to be equaled to the queue number.

However, modifying the macro to be greater than 256 will trigger
many errors and warnings from test-pmd, PMD driver and librte_ethdev
during compiling dpdk project. But it is possible and permited that
rx/tx queue number is greater than 256 and all statistics of rx/tx
queue need to be displayed. In addition, the data type of rx/tx queue
number in rte_eth_dev_configure API is 'uint16_t'. So It is unreasonable
to use the 'uint8_t' type for variables that control which per-queue
statistics can be displayed.

In these modifications, related API in /lib/librte_ethdev/rte_ethdev.c
is as follows:
static int
-set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t 
+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint16_t 
                 uint8_t is_rx)
  rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t 
-               uint8_t stat_idx)
+               uint16_t stat_idx)

  rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t 
-               uint8_t stat_idx)
+               uint16_t stat_idx)

                 reply	other threads:[~2020-08-08  1:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e438154-112a-0c21-48a5-9abb3e6d9ed3@huawei.com \
    --to=humin29@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=forest.zhouchang@huawei.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=lihuisong@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=liudongdong3@huawei.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git