On 3/10/2021 6:16 AM, Min Hu (Connor) wrote:
From: Chengwen Feng <fengcheng...@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 <fengcheng...@huawei.com>
Signed-off-by: Min Hu (Connor) <humi...@huawei.com>

<...>

+
+       rte_kvargs_process(kvlist, "rx_func_hint", &hns3_parse_io_hint_func,
+                          &rx_func_hint);
+       rte_kvargs_process(kvlist, "tx_func_hint", &hns3_parse_io_hint_func,
+                          &tx_func_hint);
+       rte_kvargs_free(kvlist);

If you will continue with the device argument method, those should be documented in the device documentation, you can have a section as "Runtime Config Options" and can detail new devargs there.

Also 'RTE_PMD_REGISTER_PARAM_STRING' should be added for new devargs.

Reply via email to