DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Min Hu (Connor)" <humin29@huawei.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 1/8] net/hns3: support runtime config to select IO burst func
Date: Wed, 17 Mar 2021 15:28:38 +0000	[thread overview]
Message-ID: <36c10c8a-034d-1883-4d2a-5f9c13d92c32@intel.com> (raw)
In-Reply-To: <0ecb9115-11b1-2d3f-b333-3e6b7b8b7a6e@huawei.com>

On 3/17/2021 1:14 AM, Min Hu (Connor) wrote:
> 
> 
> 在 2021/3/16 20:40, Ferruh Yigit 写道:
>> On 3/12/2021 11:51 AM, Min Hu (Connor) wrote:
>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>>
>>> Currently, the driver support multiple IO burst function and auto
>>> selection of the most appropriate function based on offload
>>> configuration.
>>>
>>> Most applications such as l2fwd/l3fwd don't provide the means to
>>> change offload configuration, so it will use the auto selection's io
>>> burst function.
>>>
>>> This patch support runtime config to select io burst function, which
>>> add two config: rx_func_hint and tx_func_hint, both could assign
>>> vec/sve/simple/common.
>>>
>>> The driver will use the following rules to select io burst func:
>>> a. if hint equal vec and meet the vec Rx/Tx usage condition then use
>>> the neon function.
>>> b. if hint equal sve and meet the sve Rx/Tx usage condition then use
>>> the sve function.
>>> c. if hint equal simple and meet the simple Rx/Tx usage condition then
>>> use the simple function.
>>> d. if hint equal common then use the common function.
>>> e. if hint not set then:
>>> e.1. if meet the vec Rx/Tx usage condition then use the neon function.
>>> e.2. if meet the simple Rx/Tx usage condition then use the simple
>>> function.
>>> e.3. else use the common function.
>>>
>>> Note: the sve Rx/Tx usage condition based on the vec Rx/Tx usage
>>> condition and runtime environment (which must support SVE).
>>>
>>> In the previous versions, driver will preferred use the sve function
>>> when meet the sve Rx/Tx usage condition, but in this case driver could
>>> get better performance if use the neon function.
>>>
>>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>>> ---
>>>   doc/guides/nics/hns3.rst               | 20 +++++++++
>>>   doc/guides/rel_notes/release_21_05.rst |  1 +
>>>   drivers/net/hns3/hns3_ethdev.c         | 77 ++++++++++++++++++++++++++++++++++
>>>   drivers/net/hns3/hns3_ethdev.h         | 15 +++++++
>>>   drivers/net/hns3/hns3_ethdev_vf.c      |  4 ++
>>>   drivers/net/hns3/hns3_rxtx.c           | 54 +++++++++++++++++-------
>>>   6 files changed, 157 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
>>> index 84bd7a3..40d2e3b 100644
>>> --- a/doc/guides/nics/hns3.rst
>>> +++ b/doc/guides/nics/hns3.rst
>>> @@ -46,6 +46,26 @@ Prerequisites
>>>   - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to 
>>> setup the basic DPDK environment.
>>> +Runtime Config Options
>>> +----------------------
>>> +
>>> +- ``rx_func_hint`` (default ``none``)
>>> +
>>> +  Used to select Rx burst function, supported value are "vec", "sve", 
>>> "simple", "common".
>>> +  When equal "vec" and meet the vector Rx usage condition then use the neon 
>>> Rx function.
>>> +  When equal "sve" and meet the sve Rx usage condition then use the sve Rx 
>>> function.
>>> +  When equal "simple" and meet the simple Rx usage condition then use the 
>>> simple Rx function.
>>> +  When equal "common" then use the common Rx function.
>>> +
>>> +- ``tx_func_hint`` (default ``none``)
>>> +
>>> +  Used to select Tx burst function, supported value are "vec", "sve", 
>>> "simple", "common".
>>> +  When equal "vec" and meet the vector Tx usage condition then use the neon 
>>> Tx function.
>>> +  When equal "sve" and meet the sve Tx usage condition then use the sve Tx 
>>> function.
>>> +  When equal "simple" and meet the simple Tx usage condition then use the 
>>> simple Tx function.
>>> +  When equal "common" then use the common Tx function.
>>> +
>>
>> I think 'vec' & 'sve' are more self explenatory, but can you please describe 
>> what is 'common' and 'simple', and the difference of these two?
> In the Rx direction, simple indicates that the Scalar algorithm obtained from 
> rte_eth_rx_burst_mode_get, and common indicates that the Scalar Scattered 
> algorithm obtained from rte_eth_rx_burst_mode_get.
> 
> In the TX direction, simple indicates that the Scalar Simple algorithm in the 
> rte_eth_tx_burst_mode_get, and common indicates that the Scalar algorithm 
> obtained in the rte_eth_tx_burst_mode_get.
> 

Got it, can you please document what you described above in this document?

> Later, we will send a patch to modify the names obtained in 
> rte_eth_rx_burst_mode_get, that is, the original Scalar is renamed Scalar Simple 
> and Scalar Scattered is renamed Scalar. The Rx and Tx are not in correspondence, 
> which may leads to misunderstanding.
> 
>>
>> btw, since both 'neon' and 'sve' are vector implementations, what do you think 
>> to have arguments as 'neon' & 'sve', instead of 'vec' & 'sve'?
> 'vec' here means the default vector type in the current platform(In future, we 
> will support NIC in different kinds of platform). when the DPDK run on different 
> platform, the default vector will be different. For instance, now in ARM soc, 
> 'vec' means 'neon', in X86 platform, 'vec'
> means 'SSE/AVX' or others.
> 

I see, again can you document this above, in document for 'vec' it says "use the 
neon", instead it can say something like "use default vector implementation, 
'neon' for Arm" ...

Btw, I can see v4 sent, but there is no changelog, and documentation seems same, 
what has changed there?


  reply	other threads:[~2021-03-17 15:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  6:16 [dpdk-dev] [PATCH v2 0/9] features and bugfixes for hns3 Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 1/9] net/hns3: support runtime config to select IO burst func Min Hu (Connor)
2021-03-11 17:31   ` Ferruh Yigit
2021-03-12  0:59     ` Min Hu (Connor)
2021-03-11 17:39   ` Ferruh Yigit
2021-03-12  1:01     ` Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 2/9] net/hns3: support Tx push quick doorbell to improve perf Min Hu (Connor)
2021-03-11 18:05   ` Ferruh Yigit
2021-03-12 11:02     ` Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 3/9] net/hns3: support for outer UDP cksum Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 4/9] net/hns3: adjust the format of RAS related structures Min Hu (Connor)
2021-03-11 18:25   ` Ferruh Yigit
2021-03-12  1:51     ` Min Hu (Connor)
2021-03-12 10:02       ` Ferruh Yigit
2021-03-12 10:51         ` Min Hu (Connor)
2021-03-16 11:32           ` Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 5/9] net/hns3: delete redundant xstats RAS statistics Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 6/9] net/hns3: support imissed stats for PF/VF Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 7/9] net/hns3: support oerrors stats in PF Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 8/9] net/hns3: support query Tx descriptor status Min Hu (Connor)
2021-03-10  6:16 ` [dpdk-dev] [PATCH v2 9/9] net/hns3: support query Rx " Min Hu (Connor)
2021-03-12 11:51 ` [dpdk-dev] [PATCH v3 0/8] features and bugfixes for hns3 Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 1/8] net/hns3: support runtime config to select IO burst func Min Hu (Connor)
2021-03-16 12:40     ` Ferruh Yigit
2021-03-17  1:14       ` Min Hu (Connor)
2021-03-17 15:28         ` Ferruh Yigit [this message]
2021-03-19  1:08           ` Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 2/8] net/hns3: support for outer UDP cksum Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 3/8] net/hns3: adjust the format of RAS related structures Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 4/8] net/hns3: delete redundant xstats RAS statistics Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 5/8] net/hns3: support imissed stats for PF/VF Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 6/8] net/hns3: support oerrors stats in PF Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 7/8] net/hns3: support query Tx descriptor status Min Hu (Connor)
2021-03-12 11:51   ` [dpdk-dev] [PATCH v3 8/8] net/hns3: support query Rx " Min Hu (Connor)

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=36c10c8a-034d-1883-4d2a-5f9c13d92c32@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.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).