DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: <stephen@networkplumber.org>, <bruce.richardson@intel.com>,
	"Jerin Jacob Kollanukkaran" <jerinj@marvell.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"Wenzhuo Lu" <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	"Bernard Iremonger" <bernard.iremonger@intel.com>,
	lihuisong <lihuisong@huawei.com>
Subject: Re: [dpdk-dev] [PATCH V2 1/4] ethdev: fix compiling errors for per-queue statistics
Date: Fri, 25 Sep 2020 16:58:52 +0800	[thread overview]
Message-ID: <2442b2bc-4b94-089f-270f-087b56a9bb42@huawei.com> (raw)
In-Reply-To: <c3946422-1959-146a-0f4d-49523f3dca49@intel.com>

Hi, Ferruh Yigit,

Your method is very practical. Thanks!
But we found that testpmd fails to start with "--rx-queue-stats-mapping" 
and "--tx-queue-stats-mapping". We've found the cause and modified it. 
These modifications are being tested.

Currently, the following modifications are related to framework APIs.
1)struct 'rte_eth_dcb_tc_queue_mapping'
2)fix 'rte_eth_dev_set_rx/tx_queue_stats_mapping' function to resolve
the problem that DPDK project fails to build when 
'RTE_ETHDEV_QUEUE_STAT_CNTRS' > 256.

According to my current analysis, these modifications for queue stats 
mapping in testpmd do not involve the modification of framework APIs. 
Therefore, I think we should give priority to focusing on the current 
changes to the DPDK framework APIs.

After all, DPDK-20.11 is approaching. What do you think?


在 2020/9/23 17:18, Ferruh Yigit 写道:
> On 9/23/2020 3:31 AM, Min Hu (Connor) wrote:
>>
>>
>> 在 2020/9/5 2:31, Ferruh Yigit 写道:
>>> On 9/4/2020 12:32 PM, Min Hu (Connor) wrote:
>>>> From: Huisong Li <lihuisong@huawei.com>
>>>>
>>>> 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.
>>>>
>>>> Fixes: ed30d9b691b2 ("app/testpmd: add stats per queue")
>>>> Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
>>>> Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/")
>>>> Fixes: e6defdfddc3b ("net/igc: enable statistics")
>>>> Fixes: 2265e4b4e84b ("net/octeontx2: add basic stats operation")
>>>> Fixes: 6c3169a3dc04 ("virtio: move to drivers/net/")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>>>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>>>> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>>> Reviewed-by: Dongdong Liu <liudongdong3@huawei.com>
>>>
>>> The patch mostly looks good and it enables build with
>>> 'RTE_ETHDEV_QUEUE_STAT_CNTRS' > 256.
>>> Only I put a comment for a testpmd change to enable the "set 
>>> stat_qmap" command
>>> for map value > 256.
>>>
>>>
>>> BUT there are many things to fix in the queue stats mapping, since 
>>> you are
>>> already on it can you help on a few things on testpmd related to it, 
>>> if you have
>>> time for it?
>>>
>>> 1) Getting queue stats shouldn't require stats mapping, it should be 
>>> controlled
>>> separately. Many PMDs doesn't require/do the stats mapping but they 
>>> still can
>>> collect the per queue stats, which can be displayed independent from 
>>> mapping.
>>>
>>> 2) Even you map only one queue, while displaying stats it will display
>>> 'RTE_ETHDEV_QUEUE_STAT_CNTRS' queues, and when that number is high it 
>>> makes hard
>>> to see the actual interested values.
>>> If there is no mapping, it should display min(number_of_queues,
>>> RTE_ETHDEV_QUEUE_STAT_CNTRS).
>>> If there is mapping it should display queues that mapping done, this 
>>> may require
>>> adding a new 'active' field to 'struct queue_stats_mappings'.
>>>
>>> 3) Why 'struct queue_stats_mappings' is cache aligned, is it really 
>>> needed?
>>>
>>> 4) The mapping arrays, 'tx_queue_stats_mappings_array' &
>>> 'rx_queue_stats_mappings_array' are global and their size is based on 
>>> fixed max
>>> port and queue size assumptions, can those mapping array be done per 
>>> port and
>>> 'RTE_ETHDEV_QUEUE_STAT_CNTRS' size per port?
>>>
>> It does seem to be unreasonable. We also try do it, and found that
>> it is hard to control per queue stats and queue stats mapping, 
>> separately.
>> For details, see next V3 patch.
> 
> I will check v3, but as far as know stats mapping exist because of 
> limitations of some NICs, that there are N queues but M stats registers 
> where N > M. So need to map some queues to stat registers, and there is 
> N:1 relation there, so multiple queue stats can be represented in single 
> stat register.
> 
> But for rest of the NICs it should be possible to display the queue 
> stats independent from the mapping.
> 
> 
>> We're working on debugging this stats_mapping setting. During this 
>> process,
>> we have a problem that starting testpmd with --rx/tx-queue-stats-mapping
>> parameter fails. log as follows:
>> [root]$ ./testpmd -l 1,3,4,8,12 -n 4 -w 0000:04:00.0 --file-prefix=lee 
>> --log-level=7
>>   -- -i --rxq=6 --txq=6 --burst=64 --rxd=2048 --txd=2048 --nb-cores=4
>>   --rx-queue-stats-mapping=(0,2,2) --tx-queue-stats-mapping=(0,3,3)
>>
>> -bash: syntax error near unexpected token `('
>> [root]$
> 
> Above seems bash error, using '' can help for it, like 
> --rx-queue-stats-mapping='(0,2,2)'
> .

  reply	other threads:[~2020-09-25  8:59 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31  3:41 [dpdk-dev] [RFC 1/2] Description: lib/ethdev: change data type in tc_rxq and tc_txq Min Hu(Connor)
2020-08-31  3:41 ` [dpdk-dev] [RFC 2/2] Description: dpdk: fix compiling errors for more than 256 per-queue statistics Min Hu(Connor)
2020-09-01  1:33 ` [dpdk-dev] [RFC 1/2] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-01  1:33   ` [dpdk-dev] [RFC 2/2] ethdev: fix compiling errors for per-queue statistics Min Hu (Connor)
2020-09-01  2:23     ` Stephen Hemminger
2020-09-01 11:52   ` [dpdk-dev] [PATCH 0/4] ethdev: change the queue ID type Min Hu (Connor)
2020-09-01 11:52     ` [dpdk-dev] [PATCH 1/4] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-04 11:32       ` [dpdk-dev] [PATCH V2 0/4] ethdev: change the queue ID type Min Hu (Connor)
2020-09-04 11:32         ` [dpdk-dev] [PATCH V2 1/4] ethdev: fix compiling errors for per-queue statistics Min Hu (Connor)
2020-09-04 18:04           ` Ferruh Yigit
2020-09-04 18:31           ` Ferruh Yigit
2020-09-05 16:51             ` Thomas Monjalon
2020-09-23  2:31             ` Min Hu (Connor)
2020-09-23  9:18               ` Ferruh Yigit
2020-09-25  8:58                 ` Min Hu (Connor) [this message]
2020-09-25  9:36                   ` Ferruh Yigit
2020-09-23 12:59           ` [dpdk-dev] [PATCH V3 0/4] change data type in TC queue Min Hu (Connor)
2020-09-23 12:59             ` [dpdk-dev] [PATCH V3 1/4] dpdk: fix compiling errors for per-queue statistics Min Hu (Connor)
2020-09-23 13:00             ` [dpdk-dev] [PATCH V3 2/4] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-23 13:00             ` [dpdk-dev] [PATCH V3 3/4] doc: announce modified field in DCB TC queue mapping Min Hu (Connor)
2020-09-23 13:00             ` [dpdk-dev] [PATCH V3 4/4] doc: announce modified in queue stats mapping API Min Hu (Connor)
2020-09-25  9:41             ` [dpdk-dev] [PATCH V3 0/4] change data type in TC queue Ferruh Yigit
2020-09-04 11:32         ` [dpdk-dev] [PATCH V2 2/4] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-04 11:32         ` [dpdk-dev] [PATCH V2 3/4] doc: announce modified field in DCB TC queue mapping Min Hu (Connor)
2020-09-04 11:32         ` [dpdk-dev] [PATCH V2 4/4] doc: announce modified field in ethdev API Min Hu (Connor)
2020-09-04 14:33         ` [dpdk-dev] [PATCH V2 0/4] ethdev: change the queue ID type Ferruh Yigit
2020-09-09 12:36       ` [dpdk-dev] [PATCH V3 0/3] add FEC support Min Hu (Connor)
2020-09-09 12:36         ` [dpdk-dev] [PATCH V3 1/3] ethdev: introduce FEC API Min Hu (Connor)
2020-09-09 12:36         ` [dpdk-dev] [PATCH V3 2/3] net/hns3: support FEC Min Hu (Connor)
2020-09-09 12:36         ` [dpdk-dev] [PATCH V3 3/3] app/testpmd: add FEC command Min Hu (Connor)
2020-09-01 11:52     ` [dpdk-dev] [PATCH 2/4] ethdev: fix compiling errors for per-queue statistics Min Hu (Connor)
2020-09-01 16:17       ` Ferruh Yigit
2020-09-01 11:52     ` [dpdk-dev] [PATCH 3/4] doc: announce modified field in DCB TC queue mapping Min Hu (Connor)
2020-09-01 11:52     ` [dpdk-dev] [PATCH 4/4] doc: announce modified field in ethdev API Min Hu (Connor)
2020-09-01 16:14     ` [dpdk-dev] [PATCH 0/4] ethdev: change the queue ID type Ferruh Yigit
2020-09-25 12:51 ` [dpdk-dev] [PATCH V4 0/2] change data type in TC queue Min Hu (Connor)
2020-09-25 12:51   ` [dpdk-dev] [PATCH V4 1/2] dpdk: resolve compiling errors for per-queue stats Min Hu (Connor)
2020-09-25 12:51   ` [dpdk-dev] [PATCH V4 2/2] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-25 13:14   ` [dpdk-dev] [PATCH V4 0/2] change data type in TC queue Ferruh Yigit
2020-09-27  3:16 ` [dpdk-dev] [PATCH V5 " Min Hu (Connor)
2020-09-27  3:16   ` [dpdk-dev] [PATCH V5 1/2] dpdk: resolve compiling errors for per-queue stats Min Hu (Connor)
2020-09-28  8:59     ` Ferruh Yigit
2020-09-28  9:16       ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2020-09-28 12:00         ` Ananyev, Konstantin
2020-09-28 13:47         ` Min Hu (Connor)
2020-09-28 15:35           ` Thomas Monjalon
2020-09-28 13:53         ` Ferruh Yigit
2020-09-28 15:24           ` Thomas Monjalon
2020-09-28 15:43             ` Stephen Hemminger
2020-10-05 12:23               ` Ferruh Yigit
2020-10-06  8:33                 ` Olivier Matz
2020-10-09 20:32                   ` Ferruh Yigit
2020-10-10  8:09                     ` Thomas Monjalon
2020-10-12 17:02                       ` Ferruh Yigit
2020-09-29  4:49           ` Min Hu (Connor)
2020-09-29  9:33             ` Thomas Monjalon
2020-09-29 13:46               ` Min Hu (Connor)
2020-09-28 11:52       ` Ananyev, Konstantin
2020-09-30  8:34       ` [dpdk-dev] " Kinsella, Ray
2020-09-27  3:16   ` [dpdk-dev] [PATCH V5 2/2] ethdev: change data type in TC rxq and TC txq Min Hu (Connor)
2020-09-28  9:04     ` Ferruh Yigit
2020-09-28  9:21       ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2020-10-05 12:26         ` Ferruh Yigit
2020-10-06 12:04           ` 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=2442b2bc-4b94-089f-270f-087b56a9bb42@huawei.com \
    --to=humin29@huawei.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=lihuisong@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.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).