Re: [dpdk-dev] [PATCH v3 1/2] ethdev: add pre-defined meter policy API

2021-04-14 Thread Li Zhang
Hi Cristian, Thank you for giving suggestion. Will add in V7 patch. Regards, Li Zhang > -Original Message- > From: Dumitrescu, Cristian > Sent: Wednesday, April 14, 2021 10:01 PM > To: Asaf Penso ; NBU-Contact-Thomas Monjalon > ; Li Zhang > Cc: Ori Kam ; Slava Ovsiien

Re: [dpdk-dev] [PATCH v6 1/2] ethdev: add pre-defined meter policy API

2021-04-14 Thread Li Zhang
Thanks Cristian. Will change it in V7 patch. Regards, Li Zhang > -Original Message- > From: Dumitrescu, Cristian > Sent: Thursday, April 15, 2021 12:16 AM > To: Li Zhang ; dek...@nvidia.com; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad ; Shahaf Shuler ; > li

Re: [dpdk-dev] [PATCH v6 1/2] ethdev: add pre-defined meter policy API

2021-04-14 Thread Li Zhang
Thanks Jasvinder. Will change it in V7 patch. Regards, Li Zhang > -Original Message- > From: Singh, Jasvinder > Sent: Thursday, April 15, 2021 6:22 AM > To: Li Zhang ; dek...@nvidia.com; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad ; Shahaf Shuler ; > Dumit

[dpdk-dev] [PATCH v7 0/2] Support meter policy API

2021-04-14 Thread Li Zhang
lation doc files. V3: Fix coding style issues. V4: Fix comments about Depends-on V5: Fix comments about rte_mtr_meter_policy_add. V6: Delete policy example. V7: Fix comments and place two common policy template as macros. Haifei Luo (1): app/testpmd: support policy actions per color Li Zhang (1

[dpdk-dev] [PATCH v7 2/2] app/testpmd: support policy actions per color

2021-04-14 Thread Li Zhang
From: Haifei Luo Add the create/del policy CLIs to support actions per color. The CLIs are: Create: add port meter policy (port_id) (policy_id) g_actions (actions) y_actions (actions) r_actions (actions) Delete: del port meter policy (port_id) (policy_id) Examples: testpmd> add port meter poli

[dpdk-dev] [PATCH v7 1/2] ethdev: add pre-defined meter policy API

2021-04-14 Thread Li Zhang
. Signed-off-by: Li Zhang Signed-off-by: Haifei Luo Signed-off-by: Jiawei Wang Acked-by: Matan Azrad Acked-by: Ray Kinsella --- app/test-flow-perf/main.c | 7 - app/test-pmd/cmdline.c| 1 - app/test-pmd/cmdline_mtr.c| 172

[dpdk-dev] [PATCH v5 0/4] net/mlx5: support meter policy operations

2021-04-14 Thread Li Zhang
eries=16357 V2: Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD V3: Fix comments about Depends-on V4: Fix comments about rte_mtr_meter_policy_add. V5: Fix comments about destory meter on different ports. Li Zhang (3): net/mlx5: support meter policy operations net/mlx5: support meter creation with policy net/mlx5: pr

[dpdk-dev] [PATCH v5 3/4] net/mlx5: prepare sub-policy for a flow with meter

2021-04-14 Thread Li Zhang
be split to sub-policies per TIR in the flow creation time. Create a function to prepare the policy and its sub-policies for a configured flow with meter. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.h| 10 +++ drivers/net/mlx5/mlx5_flow_dv.c | 144

[dpdk-dev] [PATCH v5 2/4] net/mlx5: support meter creation with policy

2021-04-14 Thread Li Zhang
drop table. 4.Allocate meter resource per domain per color. 5.It can work with both ASO and legacy meter HW objects. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 13 +- drivers/net/mlx5/mlx5.h| 62 ++--- drivers/net/mlx5/mlx5_flow.c

[dpdk-dev] [PATCH v5 4/4] net/mlx5: connect meter policy to created flows

2021-04-14 Thread Li Zhang
From: Shun Hao Currently ASO meter must be followed by policy table, so this adds the support that connecting meter and policy table. There are several cases to be considered: 1. For non-termination policy, connect meter to the default policy table. 2. For non-RSS termination policy case, simply

[dpdk-dev] [PATCH v5 1/4] net/mlx5: support meter policy operations

2021-04-14 Thread Li Zhang
ess case, for example, QUEUE\RSS\JUMP must be configured as last action for GREEN color. All the above limitations will be validated. create: Validate the policy configuration. Prepare the related tables and actions. destroy: Release the created policy resources. Signed-off-by: Li Zhang Acked-b

[dpdk-dev] [PATCH v6 0/4] net/mlx5: support meter policy operations

2021-04-14 Thread Li Zhang
eries=16389 V2: Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD V3: Fix comments about Depends-on V4: Fix comments about rte_mtr_meter_policy_add. V5: Fix comments about destory meter on different ports. V6: Fix comments about Depends-on Li Zhang (3): net/mlx5: support meter policy operations net/mlx5: support meter

[dpdk-dev] [PATCH v6 4/4] net/mlx5: connect meter policy to created flows

2021-04-14 Thread Li Zhang
From: Shun Hao Currently ASO meter must be followed by policy table, so this adds the support that connecting meter and policy table. There are several cases to be considered: 1. For non-termination policy, connect meter to the default policy table. 2. For non-RSS termination policy case, simply

[dpdk-dev] [PATCH v6 3/4] net/mlx5: prepare sub-policy for a flow with meter

2021-04-14 Thread Li Zhang
be split to sub-policies per TIR in the flow creation time. Create a function to prepare the policy and its sub-policies for a configured flow with meter. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.h| 10 +++ drivers/net/mlx5/mlx5_flow_dv.c | 144

[dpdk-dev] [PATCH v6 2/4] net/mlx5: support meter creation with policy

2021-04-14 Thread Li Zhang
drop table. 4.Allocate meter resource per domain per color. 5.It can work with both ASO and legacy meter HW objects. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 13 +- drivers/net/mlx5/mlx5.h| 62 ++--- drivers/net/mlx5/mlx5_flow.c

[dpdk-dev] [PATCH v6 1/4] net/mlx5: support meter policy operations

2021-04-14 Thread Li Zhang
ess case, for example, QUEUE\RSS\JUMP must be configured as last action for GREEN color. All the above limitations will be validated. create: Validate the policy configuration. Prepare the related tables and actions. destroy: Release the created policy resources. Signed-off-by: Li Zhang Acked-b

[dpdk-dev] [PATCH v8 0/2] Support meter policy API

2021-04-15 Thread Li Zhang
pport policy actions per color Li Zhang (1): ethdev: add pre-defined meter policy API app/test-flow-perf/main.c | 7 - app/test-pmd/cmdline.c| 14 +- app/test-pmd/cmdline_flow.c | 118 - app/test-pmd/cmdline_mtr.c

[dpdk-dev] [PATCH v8 2/2] app/testpmd: support policy actions per color

2021-04-15 Thread Li Zhang
From: Haifei Luo Add the create/del policy CLIs to support actions per color. The CLIs are: Create: add port meter policy (port_id) (policy_id) g_actions (actions) y_actions (actions) r_actions (actions) Delete: del port meter policy (port_id) (policy_id) Examples: testpmd> add port meter poli

[dpdk-dev] [PATCH v8 1/2] ethdev: add pre-defined meter policy API

2021-04-15 Thread Li Zhang
. Signed-off-by: Li Zhang Signed-off-by: Haifei Luo Signed-off-by: Jiawei Wang Acked-by: Matan Azrad Acked-by: Ray Kinsella --- app/test-flow-perf/main.c | 7 - app/test-pmd/cmdline.c| 1 - app/test-pmd/cmdline_mtr.c| 172

Re: [dpdk-dev] [PATCH v4 10/14] net/mlx5: initialize the flow meter ASO SQ

2021-04-15 Thread Li Zhang
Hi Raslan, Thanks. I will fix in the next patch. Regards, Li Zhang > -Original Message- > From: Raslan Darawsheh > Sent: Thursday, April 15, 2021 9:05 PM > To: Li Zhang ; dek...@nvidia.com; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad ; Shahaf Shuler > Cc: dev@

[dpdk-dev] [PATCH v5 00/14] Add ASO meter support in MLX5 PMD

2021-04-15 Thread Li Zhang
e for ASO flow meter manage to HW. V2: Fix compile error issue (mlx5_glue->destroy_flow_action) V3: Fix comments. V4: Fix comments and add Acked. V5: Fix unused log_obj_size issue. Li Zhang (10): net/mlx5: optimize meter statistics common/mlx5: add definitions for ASO flow meter common/m

[dpdk-dev] [PATCH v5 01/14] net/mlx5: support three level table walk

2021-04-15 Thread Li Zhang
From: Suanming Mou This commit adds table entry walk for the three level table. Signed-off-by: Suanming Mou Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_utils.h | 90 +++ 1 file changed, 90 insertions(+) diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/

[dpdk-dev] [PATCH v5 02/14] common/mlx5: add color register idle bits definition

2021-04-15 Thread Li Zhang
From: Shun Hao 8 bits are used for meter color in meter register. When the meter register can be shared, the rest 24 bits can be used by others. This adds the definination for the 24 bits that can be shared. Signed-off-by: Shun Hao Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 6

[dpdk-dev] [PATCH v5 05/14] net/mlx5: use mask for meter register setting

2021-04-15 Thread Li Zhang
From: Shun Hao ASO meter feature may require to locate the flow context tag action after the ASO action. When color register is shared by meter_id/flow_id, it's like: Bits[0-7] A meter color value set by the HW. Bits[8-31] A flow id and meter id set by SW. Currently the tag action for meter writ

[dpdk-dev] [PATCH v5 06/14] common/mlx5: add definitions for ASO flow meter

2021-04-15 Thread Li Zhang
This patch adds different PRM definitions, related to ASO flow meter feature, in MLX5 PMD code. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 75 -- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v5 03/14] net/mlx5: fix meter statistics

2021-04-15 Thread Li Zhang
From: Shun Hao Currently, packets after meter will be steered to a global policer table, which includes green/red color rules for every meter, so as to have counter statistics of each color in every meter. There's a bug that all the rules in global policer table are matching only color criteria,

[dpdk-dev] [PATCH v5 08/14] common/mlx5: add DevX API to create ASO flow meter object

2021-04-15 Thread Li Zhang
Add DevX API to create ASO flow meter object. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 54 drivers/common/mlx5/mlx5_devx_cmds.h | 18 +- drivers/common/mlx5/version.map | 1 + 3 files changed, 72

[dpdk-dev] [PATCH v5 07/14] common/mlx5: add read ASO flow meter HCA capability

2021-04-15 Thread Li Zhang
Read and store the device capability of FLOW_METER_ASO general object, using the DevX API. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 14 ++ drivers/common/mlx5/mlx5_devx_cmds.h | 8 2 files changed, 22 insertions(+) diff

[dpdk-dev] [PATCH v5 10/14] net/mlx5: initialize the flow meter ASO SQ

2021-04-15 Thread Li Zhang
Initialize the flow meter ASO SQ WQEs with all the constant data that should not be updated per enqueue operation. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 16 drivers/net/mlx5/meson.build | 2 +- drivers/net/mlx5

[dpdk-dev] [PATCH v5 11/14] net/mlx5: aso flow meter send WQE and CQE handle

2021-04-15 Thread Li Zhang
ASO flow meter send WQE and CQE handle functions Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.h| 4 + drivers/net/mlx5/mlx5_flow_aso.c | 183 - drivers/net/mlx5/mlx5_flow_meter.c | 143 +- 3 files

[dpdk-dev] [PATCH v5 13/14] net/mlx5: make ASO meter queue thread-safe

2021-04-15 Thread Li Zhang
Synchronize ASO meter queue accesses from different threads using a spinlock. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow_aso.c | 16 +--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v5 12/14] net/mlx5: add support of ASO meter action

2021-04-15 Thread Li Zhang
When ASO action is available, use it as the meter action Signed-off-by: Shun Hao Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 4 +- drivers/net/mlx5/mlx5.c| 12 drivers/net/mlx5/mlx5.h| 7 ++- drivers/net/mlx5

[dpdk-dev] [PATCH v5 14/14] net/mlx5: allow multiple flow tables on the same level

2021-04-15 Thread Li Zhang
flow table data entry, while allocates the flow table, if the table level is same but the different table id, the new table will be allocated with new table object id. It supports 4M multiple flow tables on the same level. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/m

[dpdk-dev] [PATCH v5 09/14] net/mlx5: flow meter pool to manage meter object

2021-04-15 Thread Li Zhang
Add ASO flow meter pool to manage meter object Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c| 2 +- drivers/net/mlx5/mlx5.h| 207 - drivers/net/mlx5/mlx5_flow.c | 70 - drivers/net/mlx5/mlx5_flow.h | 196

Re: [dpdk-dev] [PATCH 1/2] [RFC]: ethdev: add pre-defined meter policy API

2021-04-20 Thread Li Zhang
color. +* +* See struct rte_flow_action_meter_color. +*/ + RTE_FLOW_ACTION_TYPE_METER_COLOR, Regards, Li Zhang > -Original Message- > From: Stephen Hemminger > Sent: Wednesday, April 21, 2021 1:56 AM > To: Li Zhang > Cc: dek...@nvidia.com;

[dpdk-dev] [PATCH v7 0/4] net/mlx5: support meter policy operations

2021-04-20 Thread Li Zhang
* Rebase. V6: * Fix comments about Depends-on. V5: * Fix comments about destory meter on different ports. V4: * Fix comments about rte_mtr_meter_policy_add. V3: * Fix comments about Depends-on. V2: * Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD. Li Zhang (3): net/mlx5: support meter policy operations

[dpdk-dev] [PATCH v7 3/4] net/mlx5: prepare sub-policy for a flow with meter

2021-04-20 Thread Li Zhang
be split to sub-policies per TIR in the flow creation time. Create a function to prepare the policy and its sub-policies for a configured flow with meter. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.h| 10 +++ drivers/net/mlx5/mlx5_flow_dv.c | 144

[dpdk-dev] [PATCH v7 1/4] net/mlx5: support meter policy operations

2021-04-20 Thread Li Zhang
ess case, for example, QUEUE\RSS\JUMP must be configured as last action for GREEN color. All the above limitations will be validated. create: Validate the policy configuration. Prepare the related tables and actions. destroy: Release the created policy resources. Signed-off-by: Li Zhang Acked-b

[dpdk-dev] [PATCH v7 2/4] net/mlx5: support meter creation with policy

2021-04-20 Thread Li Zhang
drop table. 4.Allocate meter resource per domain per color. 5.It can work with both ASO and legacy meter HW objects. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 13 +- drivers/net/mlx5/mlx5.h| 62 ++--- drivers/net/mlx5/mlx5_flow.c

[dpdk-dev] [PATCH v7 4/4] net/mlx5: connect meter policy to created flows

2021-04-20 Thread Li Zhang
From: Shun Hao Currently ASO meter must be followed by policy table, so this adds the support that connecting meter and policy table. There are several cases to be considered: 1. For non-termination policy, connect meter to the default policy table. 2. For non-RSS termination policy case, simply

[dpdk-dev] [PATCH v4 2/2] net/mlx5: support meter PPS profile

2021-04-20 Thread Li Zhang
Currently meter algorithms only supports bytes per second(BPS). Such as Single Rate Three Color Marker (srTCM rfc2697) Add packet_mode flag to support rate is packet per second. So that it can meter traffic by packet per second (PPS). Signed-off-by: Li Zhang Acked-by: Matan Azrad --- doc

[dpdk-dev] [PATCH v4 1/2] common/mlx5: add meter mode definition in PRM file

2021-04-20 Thread Li Zhang
Add meter mode definitions in PRM file Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index c6d8060bb9..efa5ae67bf 100644 --- a/drivers

[dpdk-dev] [PATCH v4 0/2] Support meter PPS(packet per second) in MLX5 PMD

2021-04-20 Thread Li Zhang
oject/dpdk/list/?series=16312 Depends-on: series=16535 ("support meter policy operations") https://patchwork.dpdk.org/project/dpdk/list/?series=16535 v4: * Rebase. V3: * Rebase. * Fix comments about Depends-on. V2: * Fix comments about commit-log Li Zhang (2): common/mlx5: add mete

Re: [dpdk-dev] [PATCH v10 1/2] ethdev: add pre-defined meter policy API

2021-04-21 Thread Li Zhang
Hi Thomas, Thanks for your comments. Since this patch already accepted, I will fix it in RC2. Regards, Li Zhang > -Original Message- > From: Thomas Monjalon > Sent: Thursday, April 22, 2021 3:44 AM > To: Jiawei(Jonny) Wang > Cc: Matan Azrad ; Ori Kam ; Slava >

[dpdk-dev] [PATCH v5 0/1] Support meter PPS(packet per second) in MLX5 PMD

2021-04-27 Thread Li Zhang
nts about commit-log Li Zhang (1): net/mlx5: support meter PPS profile doc/guides/nics/mlx5.rst | 1 + doc/guides/rel_notes/release_21_05.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 8 +++ drivers/net/mlx5/mlx5_flow_aso.c | 17 +++--- drivers/net/mlx5/mlx5_f

[dpdk-dev] [PATCH v5 1/1] net/mlx5: support meter PPS profile

2021-04-27 Thread Li Zhang
Currently meter algorithms only supports bytes units for meter profiles. Using ASO feature, the driver can support metering in per packet units. Add support for packet units in meter profiles. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- doc/guides/nics/mlx5.rst | 1 + doc

[dpdk-dev] [PATCH v8 0/4] net/mlx5: support meter policy operations

2021-04-27 Thread Li Zhang
* Fix comments about release-note v7: * Rebase. V6: * Fix comments about Depends-on. V5: * Fix comments about destory meter on different ports. V4: * Fix comments about rte_mtr_meter_policy_add. V3: * Fix comments about Depends-on. V2: * Add MLX5_MTR_DEFAULT_POLICY_ID in MLX5 PMD. Li Zhang (3): net

[dpdk-dev] [PATCH v8 1/4] net/mlx5: support meter policy operations

2021-04-27 Thread Li Zhang
ess case, for example, QUEUE\RSS\JUMP must be configured as last action for GREEN color. All the above limitations will be validated. create: Validate the policy configuration. Prepare the related tables and actions. destroy: Release the created policy resources. Signed-off-by: Li Zhang Acked-b

[dpdk-dev] [PATCH v8 2/4] net/mlx5: support meter creation with policy

2021-04-27 Thread Li Zhang
drop table. 4.Allocate meter resource per domain per color. 5.It can work with both ASO and legacy meter HW objects. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 13 +- drivers/net/mlx5/mlx5.h| 62 ++--- drivers/net/mlx5/mlx5_flow.c

[dpdk-dev] [PATCH v8 3/4] net/mlx5: prepare sub-policy for a flow with meter

2021-04-27 Thread Li Zhang
be split to sub-policies per TIR in the flow creation time. Create a function to prepare the policy and its sub-policies for a configured flow with meter. Signed-off-by: Li Zhang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.h| 10 +++ drivers/net/mlx5/mlx5_flow_dv.c | 145

[dpdk-dev] [PATCH v8 4/4] net/mlx5: connect meter policy to created flows

2021-04-27 Thread Li Zhang
From: Shun Hao Currently ASO meter must be followed by policy table, so this adds the support that connecting meter and policy table. There are several cases to be considered: 1. For non-termination policy, connect meter to the default policy table. 2. For non-RSS termination policy case, simply

[dpdk-dev] [PATCH] net/mlx5: fix meter policy with RSS action

2021-06-23 Thread Li Zhang
When creating the meter sub-policy RSS rule, the RSS descriptor was used before its update. It also need update tunnel bit in RSS descriptor after flow translate. Use it only when it is updated. Fixes: ec962bad14e ("net/mlx5: fix metering cleanup on stop") Cc: sta...@dpdk.org Signed-

[PATCH v1 00/17] Add vDPA multi-threads optiomization

2022-06-06 Thread Li Zhang
1868 RFC ("Add vDPA multi-threads optiomization") https://patchwork.dpdk.org/project/dpdk/cover/20220408075606.33056-1-l...@nvidia.com/ Li Zhang (12): vdpa/mlx5: fix usage of capability for max number of virtqs common/mlx5: extend virtq modifiable fields vdpa/mlx5: pre-create virt

[PATCH v1 01/17] vdpa/mlx5: fix usage of capability for max number of virtqs

2022-06-06 Thread Li Zhang
The driver wrongly takes the capability value for the number of virtq pairs instead of just the number of virtqs. Adjust all the usages of it to be the number of virtqs. Fixes: c2eb33a ("vdpa/mlx5: manage virtqs by array") Cc: sta...@dpdk.org Signed-off-by: Li Zhang --- drivers

[PATCH v1 02/17] eal: add device removal in rte cleanup

2022-06-06 Thread Li Zhang
From: Yajun Wu Add device removal in function rte_eal_cleanup. This is the last chance device remove get called for sanity. Loop vdev bus first and then all bus for all device, calling rte_dev_remove. Cc: sta...@dpdk.org Signed-off-by: Yajun Wu --- lib/eal/freebsd/eal.c | 33 +

[PATCH 02/16] examples/vdpa: fix vDPA device remove

2022-06-06 Thread Li Zhang
From: Yajun Wu Add calling rte_dev_remove in vDPA example application exit. Otherwise rte_dev_remove never get called. Fixes: edbed86d1cc ("examples/vdpa: introduce a new sample for vDPA") Cc: sta...@dpdk.org Signed-off-by: Yajun Wu --- examples/vdpa/main.c | 4 1 file changed, 4 inserti

[PATCH v1 03/17] examples/vdpa: fix devices cleanup

2022-06-06 Thread Li Zhang
From: Yajun Wu Move rte_eal_cleanup to function vdpa_sample_quit which handling all example app quit. Otherwise rte_eal_cleanup won't be called on receiving signal like SIGINT(control + c). Fixes: 10aa3757 ("examples: add eal cleanup to examples") Cc: sta...@dpdk.org Signed-off-by: Yajun Wu --

[PATCH 04/16] common/mlx5: add DevX API to move QP to reset state

2022-06-06 Thread Li Zhang
From: Yajun Wu Support set QP to RESET state. Signed-off-by: Yajun Wu --- drivers/common/mlx5/mlx5_devx_cmds.c | 7 +++ drivers/common/mlx5/mlx5_prm.h | 17 + 2 files changed, 24 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/

[PATCH v1 04/17] vdpa/mlx5: support pre create virtq resource

2022-06-06 Thread Li Zhang
From: Yajun Wu The motivation of this change is to reduce vDPA device queue creation time by create some queue resource in vDPA device probe stage. In VM live migration scenario, this can reduce 0.8ms for each queue creation, thus reduce LM network downtime. To create queue resource(umem/counte

[PATCH 03/16] vdpa/mlx5: support pre create virtq resource

2022-06-06 Thread Li Zhang
From: Yajun Wu The motivation of this change is to reduce vDPA device queue creation time by create some queue resource in vDPA device probe stage. In VM live migration scenario, this can reduce 0.8ms for each queue creation, thus reduce LM network downtime. To create queue resource(umem/counte

[PATCH v1 05/17] common/mlx5: add DevX API to move QP to reset state

2022-06-06 Thread Li Zhang
From: Yajun Wu Support set QP to RESET state. Signed-off-by: Yajun Wu --- drivers/common/mlx5/mlx5_devx_cmds.c | 7 +++ drivers/common/mlx5/mlx5_prm.h | 17 + 2 files changed, 24 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/

[PATCH 05/16] vdpa/mlx5: support event qp reuse

2022-06-06 Thread Li Zhang
From: Yajun Wu To speed up queue create time, event qp and cq will create only once. Each virtq creation will reuse same event qp and cq. Because FW will set event qp to error state during virtq destroy, need modify event qp to RESET state, then modify qp to RTS state as usual. This can save abo

[PATCH 06/16] common/mlx5: extend virtq modifiable fields

2022-06-06 Thread Li Zhang
mode: event_mode/event_qpn_or_msix Signed-off-by: Li Zhang --- drivers/common/mlx5/mlx5_devx_cmds.c | 70 +++- drivers/common/mlx5/mlx5_devx_cmds.h | 6 ++- drivers/common/mlx5/mlx5_prm.h | 13 +- 3 files changed, 76 insertions(+), 13 deletions(-) diff --git a

[PATCH v1 06/17] vdpa/mlx5: support event qp reuse

2022-06-06 Thread Li Zhang
From: Yajun Wu To speed up queue create time, event qp and cq will create only once. Each virtq creation will reuse same event qp and cq. Because FW will set event qp to error state during virtq destroy, need modify event qp to RESET state, then modify qp to RTS state as usual. This can save abo

[PATCH 07/16] vdpa/mlx5: pre-create virtq in the prob

2022-06-06 Thread Li Zhang
accelerates the LM process and reduces its time by 70%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 4 + drivers/vdpa/mlx5/mlx5_vdpa_lm.c| 13 +- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 257 +--- 3 files changed, 170 insertions(+), 104 deletions

[PATCH v1 07/17] common/mlx5: extend virtq modifiable fields

2022-06-06 Thread Li Zhang
mode: event_mode/event_qpn_or_msix Signed-off-by: Li Zhang --- drivers/common/mlx5/mlx5_devx_cmds.c | 70 +++- drivers/common/mlx5/mlx5_devx_cmds.h | 6 ++- drivers/common/mlx5/mlx5_prm.h | 13 +- 3 files changed, 76 insertions(+), 13 deletions(-) diff --git a

[PATCH v1 08/17] vdpa/mlx5: pre-create virtq in the prob

2022-06-06 Thread Li Zhang
accelerates the LM process and reduces its time by 70%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 4 + drivers/vdpa/mlx5/mlx5_vdpa_lm.c| 13 +- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 257 +--- 3 files changed, 170 insertions(+), 104 deletions

[PATCH 09/16] vdpa/mlx5: add multi-thread management for configuration

2022-06-06 Thread Li Zhang
. Signed-off-by: Li Zhang --- doc/guides/vdpadevs/mlx5.rst | 11 +++ drivers/vdpa/mlx5/meson.build | 1 + drivers/vdpa/mlx5/mlx5_vdpa.c | 41 drivers/vdpa/mlx5/mlx5_vdpa.h | 36 +++ drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 129

[PATCH 08/16] vdpa/mlx5: optimize datapath-control synchronization

2022-06-06 Thread Li Zhang
polling and parallel configurations on the same virtq. 2.A doorbell lock synchronizes doorbell update, which is shared for all the virtqs in the device. 3.A steering lock for the shared steering objects updates. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 24 --- drivers

[PATCH v1 09/17] vdpa/mlx5: optimize datapath-control synchronization

2022-06-06 Thread Li Zhang
polling and parallel configurations on the same virtq. 2.A doorbell lock synchronizes doorbell update, which is shared for all the virtqs in the device. 3.A steering lock for the shared steering objects updates. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 24 --- drivers

[PATCH 10/16] vdpa/mlx5: add task ring for MT management

2022-06-06 Thread Li Zhang
polls its ring and dequeue tasks. That’s why the ring should be in multi-producer and single consumer mode. Anatomic counter manages the tasks completion notification. The threads report errors to the caller by a dedicated error counter per task. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5

[PATCH v1 10/17] vdpa/mlx5: add multi-thread management for configuration

2022-06-06 Thread Li Zhang
. Signed-off-by: Li Zhang --- doc/guides/vdpadevs/mlx5.rst | 11 +++ drivers/vdpa/mlx5/meson.build | 1 + drivers/vdpa/mlx5/mlx5_vdpa.c | 41 drivers/vdpa/mlx5/mlx5_vdpa.h | 36 +++ drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 129

[PATCH 11/16] vdpa/mlx5: add MT task for VM memory registration

2022-06-06 Thread Li Zhang
direct MRs in parallel using the MT mechanism. After completion, the primary thread creates the indirect MR needed for the following virtqs configurations. This optimization accelerrate the LM process and reduce its time by 5%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c

[PATCH v1 11/17] vdpa/mlx5: add task ring for MT management

2022-06-06 Thread Li Zhang
polls its ring and dequeue tasks. That’s why the ring should be in multi-producer and single consumer mode. Anatomic counter manages the tasks completion notification. The threads report errors to the caller by a dedicated error counter per task. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5

[PATCH 12/16] vdpa/mlx5: add virtq creation task for MT management

2022-06-06 Thread Li Zhang
The virtq object and all its sub-resources use a lot of FW commands and can be accelerated by the MT management. Split the virtqs creation between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h

[PATCH 13/16] vdpa/mlx5: add virtq LM log task

2022-06-06 Thread Li Zhang
Split the virtqs LM log between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 3 + drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 34 +++ drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 85

[PATCH v1 12/17] vdpa/mlx5: add MT task for VM memory registration

2022-06-06 Thread Li Zhang
direct MRs in parallel using the MT mechanism. After completion, the primary thread creates the indirect MR needed for the following virtqs configurations. This optimization accelerrate the LM process and reduce its time by 5%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c

[PATCH 14/16] vdpa/mlx5: add device close task

2022-06-06 Thread Li Zhang
Split the virtqs device close tasks after stopping virt-queue between the configuration threads. This accelerates the LM process and reduces its time by 50%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 56 +-- drivers/vdpa/mlx5/mlx5_vdpa.h

[PATCH v1 13/17] vdpa/mlx5: add virtq creation task for MT management

2022-06-06 Thread Li Zhang
The virtq object and all its sub-resources use a lot of FW commands and can be accelerated by the MT management. Split the virtqs creation between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h

[PATCH v1 14/17] vdpa/mlx5: add virtq LM log task

2022-06-06 Thread Li Zhang
Split the virtqs LM log between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 3 + drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 34 +++ drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 85

[PATCH v1 15/17] vdpa/mlx5: add device close task

2022-06-06 Thread Li Zhang
Split the virtqs device close tasks after stopping virt-queue between the configuration threads. This accelerates the LM process and reduces its time by 50%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 56 +-- drivers/vdpa/mlx5/mlx5_vdpa.h

[PATCH 15/16] vdpa/mlx5: add virtq sub-resources creation

2022-06-06 Thread Li Zhang
pre-created virt-queue sub-resource in device probe stage and then modify virtqueue in device config stage. Steer table also need to support dummy virt-queue. This accelerates the LM process and reduces its time by 40%. Signed-off-by: Li Zhang Signed-off-by: Yajun Wu --- drivers/vdpa/mlx5

[PATCH 16/16] vdpa/mlx5: prepare virtqueue resource creation

2022-06-06 Thread Li Zhang
Split the virtqs virt-queue resource between the configuration threads. Also need pre-created virt-queue resource after virtq destruction. This accelerates the LM process and reduces its time by 30%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 115

[PATCH v1 16/17] vdpa/mlx5: add virtq sub-resources creation

2022-06-06 Thread Li Zhang
pre-created virt-queue sub-resource in device probe stage and then modify virtqueue in device config stage. Steer table also need to support dummy virt-queue. This accelerates the LM process and reduces its time by 40%. Signed-off-by: Li Zhang Signed-off-by: Yajun Wu --- drivers/vdpa/mlx5

[PATCH v1 17/17] vdpa/mlx5: prepare virtqueue resource creation

2022-06-06 Thread Li Zhang
Split the virtqs virt-queue resource between the configuration threads. Also need pre-created virt-queue resource after virtq destruction. This accelerates the LM process and reduces its time by 30%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 115

[PATCH v1 00/17] Add vDPA multi-threads optiomization

2022-06-06 Thread Li Zhang
1868 RFC ("Add vDPA multi-threads optiomization") https://patchwork.dpdk.org/project/dpdk/cover/20220408075606.33056-1-l...@nvidia.com/ Li Zhang (12): vdpa/mlx5: fix usage of capability for max number of virtqs common/mlx5: extend virtq modifiable fields vdpa/mlx5: pre-create virt

[PATCH v1 01/17] vdpa/mlx5: fix usage of capability for max number of virtqs

2022-06-06 Thread Li Zhang
The driver wrongly takes the capability value for the number of virtq pairs instead of just the number of virtqs. Adjust all the usages of it to be the number of virtqs. Fixes: c2eb33a ("vdpa/mlx5: manage virtqs by array") Cc: sta...@dpdk.org Signed-off-by: Li Zhang --- drivers

[PATCH v1 02/17] eal: add device removal in rte cleanup

2022-06-06 Thread Li Zhang
From: Yajun Wu Add device removal in function rte_eal_cleanup. This is the last chance device remove get called for sanity. Loop vdev bus first and then all bus for all device, calling rte_dev_remove. Cc: sta...@dpdk.org Signed-off-by: Yajun Wu --- lib/eal/freebsd/eal.c | 33 +

[PATCH v1 03/17] examples/vdpa: fix devices cleanup

2022-06-06 Thread Li Zhang
From: Yajun Wu Move rte_eal_cleanup to function vdpa_sample_quit which handling all example app quit. Otherwise rte_eal_cleanup won't be called on receiving signal like SIGINT(control + c). Fixes: 10aa3757 ("examples: add eal cleanup to examples") Cc: sta...@dpdk.org Signed-off-by: Yajun Wu --

[PATCH v1 04/17] vdpa/mlx5: support pre create virtq resource

2022-06-06 Thread Li Zhang
From: Yajun Wu The motivation of this change is to reduce vDPA device queue creation time by create some queue resource in vDPA device probe stage. In VM live migration scenario, this can reduce 0.8ms for each queue creation, thus reduce LM network downtime. To create queue resource(umem/counte

[PATCH v1 05/17] common/mlx5: add DevX API to move QP to reset state

2022-06-06 Thread Li Zhang
From: Yajun Wu Support set QP to RESET state. Signed-off-by: Yajun Wu --- drivers/common/mlx5/mlx5_devx_cmds.c | 7 +++ drivers/common/mlx5/mlx5_prm.h | 17 + 2 files changed, 24 insertions(+) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/

[PATCH v1 06/17] vdpa/mlx5: support event qp reuse

2022-06-06 Thread Li Zhang
From: Yajun Wu To speed up queue create time, event qp and cq will create only once. Each virtq creation will reuse same event qp and cq. Because FW will set event qp to error state during virtq destroy, need modify event qp to RESET state, then modify qp to RTS state as usual. This can save abo

[PATCH v1 07/17] common/mlx5: extend virtq modifiable fields

2022-06-06 Thread Li Zhang
mode: event_mode/event_qpn_or_msix Signed-off-by: Li Zhang --- drivers/common/mlx5/mlx5_devx_cmds.c | 70 +++- drivers/common/mlx5/mlx5_devx_cmds.h | 6 ++- drivers/common/mlx5/mlx5_prm.h | 13 +- 3 files changed, 76 insertions(+), 13 deletions(-) diff --git a

[PATCH v1 08/17] vdpa/mlx5: pre-create virtq in the prob

2022-06-06 Thread Li Zhang
accelerates the LM process and reduces its time by 70%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 4 + drivers/vdpa/mlx5/mlx5_vdpa_lm.c| 13 +- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 257 +--- 3 files changed, 170 insertions(+), 104 deletions

[PATCH v1 09/17] vdpa/mlx5: optimize datapath-control synchronization

2022-06-06 Thread Li Zhang
polling and parallel configurations on the same virtq. 2.A doorbell lock synchronizes doorbell update, which is shared for all the virtqs in the device. 3.A steering lock for the shared steering objects updates. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c | 24 --- drivers

[PATCH v1 10/17] vdpa/mlx5: add multi-thread management for configuration

2022-06-06 Thread Li Zhang
. Signed-off-by: Li Zhang --- doc/guides/vdpadevs/mlx5.rst | 11 +++ drivers/vdpa/mlx5/meson.build | 1 + drivers/vdpa/mlx5/mlx5_vdpa.c | 41 drivers/vdpa/mlx5/mlx5_vdpa.h | 36 +++ drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 129

[PATCH v1 11/17] vdpa/mlx5: add task ring for MT management

2022-06-06 Thread Li Zhang
polls its ring and dequeue tasks. That’s why the ring should be in multi-producer and single consumer mode. Anatomic counter manages the tasks completion notification. The threads report errors to the caller by a dedicated error counter per task. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5

[PATCH v1 12/17] vdpa/mlx5: add MT task for VM memory registration

2022-06-06 Thread Li Zhang
direct MRs in parallel using the MT mechanism. After completion, the primary thread creates the indirect MR needed for the following virtqs configurations. This optimization accelerrate the LM process and reduce its time by 5%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.c

[PATCH v1 13/17] vdpa/mlx5: add virtq creation task for MT management

2022-06-06 Thread Li Zhang
The virtq object and all its sub-resources use a lot of FW commands and can be accelerated by the MT management. Split the virtqs creation between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h

[PATCH v1 14/17] vdpa/mlx5: add virtq LM log task

2022-06-06 Thread Li Zhang
Split the virtqs LM log between the configuration threads. This accelerates the LM process and reduces its time by 20%. Signed-off-by: Li Zhang --- drivers/vdpa/mlx5/mlx5_vdpa.h | 3 + drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 34 +++ drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 85

  1   2   3   4   >