DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chengchang Tang <tangchengchang@huawei.com>
To: Matan Azrad <matan@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maryam.tahhan@intel.com" <maryam.tahhan@intel.com>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	 "wenzhuo.lu@intel.com" <wenzhuo.lu@intel.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>
Subject: Re: [dpdk-dev] [PATCH v3 1/4] ethdev: add a field for rxq info structure
Date: Mon, 7 Sep 2020 20:06:32 +0800	[thread overview]
Message-ID: <5defff09-c8f8-a8f4-b137-0c62ebff2710@huawei.com> (raw)
In-Reply-To: <MW2PR12MB2492AC8522EA7D201F1103B4DF280@MW2PR12MB2492.namprd12.prod.outlook.com>

Hi Matan

On 2020/9/7 16:28, Matan Azrad wrote:
> 
> Hi Chengchang
> 
> From: Chengchang Tang:
>> Hi Matan
>>
>> On 2020/9/6 21:45, Matan Azrad wrote:
>>>
>>> Hi  Chengchang
>>>
>>> From: Chengchang Tang:
>>>> Hi, Matan
>>>>
>>>> On 2020/9/2 18:30, Matan Azrad wrote:
>>>>> Hi Chengchang
>>>>>
>>>>> From: Chengchang Tang
>>>>>> Hi, Matan
>>>>>>
>>>>>> On 2020/9/2 15:19, Matan Azrad wrote:
>>>>>>>
>>>>>>> Hi Chengchang
>>>>>>>
>>>>>>> From: Chengchang Tang
>>>>>>>> Hi, Matan
>>>>>>>>
>>>>>>>> On 2020/9/1 23:33, Matan Azrad wrote:
>>>>>>>>>
>>>>>>>>> Hi Chengchang
>>>>>>>>>
>>>>>>>>> Please see some question below.
>>>>>>>>>
>>>>>>>>> From: Chengchang Tang
>>>>>>>>>> Add a field named rx_buf_size in rte_eth_rxq_info to indicate
>>>>>>>>>> the buffer size used in receiving packets for HW.
>>>>>>>>>>
>>>>>>>>>> In this way, upper-layer users can get this information by
>>>>>>>>>> calling rte_eth_rx_queue_info_get.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Chengchang Tang
>> <tangchengchang@huawei.com>
>>>>>>>>>> Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>>>>>>>>> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>>>>>>>>> ---
>>>>>>>>>>  lib/librte_ethdev/rte_ethdev.h | 2 ++
>>>>>>>>>>  1 file changed, 2 insertions(+)
>>>>>>>>>>
> <snip>
>>>>> So the user can configure X and the driver will use Y!=X?
>>>>
>>>> Yes, it depends on the HW. In the queue setup API, it just checks
>>>> whether the input is greater than the required minimum value. But HW
>>>> usually has requirements for alignment and so on.
>>>> So when X does not meet these requirements, PMDs will calculate a new
>>>> value Y that meets these requirements to configure the hardware (Y <=
>>>> X, to ensure no memory overflow occurs).
>>>>> Should the application validate its own configurations after setting
>>>>> them
>>>> successfully?
>>>>
>>>> It depends on their own needs. The application should not be forced
>>>> to verify it to avoid affecting the ease of use of PMDs. For some
>>>> applications, they don't care about this value.
>>>
>>> I understand,
>>> It looks me like a bad ping-pong between app and PMD (for all the
>>> fields in the struct), And we should avoid adding fields to this structure if
>> we can.
>>>
>>> What's about adding field in rte_eth_dev_info to expose the rx buffer
>> alignment supported by the PMD?
>>> Then, application has all the knowledge you want to expose before the
>> configuration.
>>
>> This may not work because there may be other restrictions besides
>> alignment, which are related to the hardware design. Therefore, it is difficult
>> to describe all constraints in a single field.
>> Moreover, this approach seems to
>> constrain the PMDs and HW to some extent.
> 
> Ok, so maybe other ethdev capability API to get the Rx buffer size adjustment by the PMD?
> Don't you think it is important information to the application in order to decide the mempool buffer size \ enabling scatter?

I guess what you mean is that it's more like a capability, so the application should query it through a capability API.
If i understand correctly, I agree with that. But I think it's okay to use this structure to export queue related information
at runtime. It focuses on querying the current queue configuration.

And there seems to be no suitable API for querying this capability. Maybe we need to introduce a new API to do this. But
I'm not sure if it's really necessary.

> 
> In any case, I think you should add documentation in the RX setup API that the HW buf size may be changed by the PMD.

There is not a defined rule of how to configure Rx buffer size. That is, there is no specific method to configure the Rx
buffer size for applications. However, most PMDs configure the Rx buffer size base on the data size of the mempool. So,
if the description is added to the setup API, the method for configuring the Rx buffer size is determined. I think this
issue should involve more people in the discussion, maybe we should send a separate patch.
> 
> <snip>
> 
> .
> 


  reply	other threads:[~2020-09-07 12:06 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 12:35 [dpdk-dev] [RFC] ethdev: add a field for rte_eth_rxq_info Chengchang Tang
2020-08-26  1:57 ` [dpdk-dev] [PATCH 0/3] add RX buffer size " Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 1/3] ethdev: add a field " Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 2/3] app/testpmd: Add RX buffer size display in queue info querry Chengchang Tang
2020-08-26  1:57   ` [dpdk-dev] [PATCH 3/3] net/hns3: add RX buffer size to rx qinfo querry Chengchang Tang
2020-08-26  7:12 ` [dpdk-dev] [PATCH v2 0/3] add Rx buffer size for rxq info structure Chengchang Tang
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 1/3] ethdev: add a field " Chengchang Tang
2020-08-26  7:29     ` Wei Hu (Xavier)
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-08-26  7:28     ` Wei Hu (Xavier)
2020-08-26 14:42     ` Stephen Hemminger
2020-08-29  6:48       ` Chengchang Tang
2020-08-26  7:12   ` [dpdk-dev] [PATCH v2 3/3] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-08-26  7:20     ` Wei Hu (Xavier)
2020-08-29  7:13 ` [dpdk-dev] [PATCH v3 0/4] add Rx buffer size for rxq info structure Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 1/4] ethdev: add a field " Chengchang Tang
2020-09-01 15:33     ` Matan Azrad
2020-09-02  3:52       ` Chengchang Tang
2020-09-02  7:19         ` Matan Azrad
2020-09-02 10:01           ` Chengchang Tang
2020-09-02 10:30             ` Matan Azrad
2020-09-03  1:48               ` Chengchang Tang
2020-09-06 13:45                 ` Matan Azrad
2020-09-07  7:47                   ` Chengchang Tang
2020-09-07  8:28                     ` Matan Azrad
2020-09-07 12:06                       ` Chengchang Tang [this message]
2020-09-07 13:02                         ` Matan Azrad
2020-09-03 15:00           ` Ferruh Yigit
2020-09-03 14:55         ` Ferruh Yigit
2020-09-03 15:01     ` Ferruh Yigit
2020-09-04  1:43       ` Chengchang Tang
2020-09-03 15:35     ` Bruce Richardson
2020-09-04 14:25       ` Ferruh Yigit
2020-09-04 15:14         ` Bruce Richardson
2020-09-04 15:30         ` Bruce Richardson
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 2/4] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 3/4] app/procinfo: add Rx buffer size to --show-port Chengchang Tang
2020-08-29  7:13   ` [dpdk-dev] [PATCH v3 4/4] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-05  9:07 ` [dpdk-dev] [PATCH v4 0/5] add Rx buffer size for rxq info structure Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 1/5] ethdev: add a field " Chengchang Tang
2020-09-05 16:50     ` Stephen Hemminger
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 2/5] app/testpmd: add Rx buffer size display in queue info query Chengchang Tang
2020-09-18  8:54     ` Ferruh Yigit
2020-09-20  8:47       ` Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 3/5] app/procinfo: add Rx buffer size to --show-port Chengchang Tang
2020-09-05 16:59     ` Stephen Hemminger
2020-09-07  9:14       ` Chengchang Tang
2020-09-18 22:11         ` Stephen Hemminger
2020-09-21  2:06           ` Chengchang Tang
2020-09-21 11:26             ` Ferruh Yigit
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 4/5] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-05  9:07   ` [dpdk-dev] [PATCH v4 5/5] doc: remove rxq info structure deprecation notice Chengchang Tang
2020-09-05 16:33     ` Thomas Monjalon
2020-09-07  9:12       ` Chengchang Tang
2020-09-21 13:22 ` [dpdk-dev] [PATCH v5 0/2] add Rx buffer size for rxq info structure Chengchang Tang
2020-09-21 13:22   ` [dpdk-dev] [PATCH v5 1/2] ethdev: add a field " Chengchang Tang
2020-09-21 14:18     ` Ferruh Yigit
2020-09-21 13:22   ` [dpdk-dev] [PATCH v5 2/2] net/hns3: add Rx buffer size to Rx qinfo query Chengchang Tang
2020-09-21 14:19   ` [dpdk-dev] [PATCH v5 0/2] add Rx buffer size for rxq info structure 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=5defff09-c8f8-a8f4-b137-0c62ebff2710@huawei.com \
    --to=tangchengchang@huawei.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=linuxarm@huawei.com \
    --cc=maryam.tahhan@intel.com \
    --cc=matan@nvidia.com \
    --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).