[PATCH v3] net/mlx5: fix assert on getting register of sample flow

2022-12-09 Thread Jiawei Wang
/SF). This patch adds the checking for reserved metadata register before getting the register, to avoid assertion failure. Fixes: 9a726360dd30 ("net/mlx5: fix sample flow action on trusted device") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- v2:

[RFC 0/5] add new port affinity item and affinity in Tx queue API

2022-12-21 Thread Jiawei Wang
ceived. Jiawei Wang (5): ethdev: add port affinity match item ethdev: introduce the affinity field in Tx queue API drivers: add lag Rx port affinity in PRM net/mlx5: add port affinity item support drivers: enhance the Tx queue affinity app/test-pmd/cmdline.c

[RFC 1/5] ethdev: add port affinity match item

2022-12-21 Thread Jiawei Wang
-off-by: Jiawei Wang --- app/test-pmd/cmdline_flow.c | 29 + doc/guides/prog_guide/rte_flow.rst | 7 + doc/guides/rel_notes/release_22_03.rst | 5 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +++ lib/ethdev/rte_flow.c

[RFC 2/5] ethdev: introduce the affinity field in Tx queue API

2022-12-21 Thread Jiawei Wang
with TxQ 2 or TxQ 3. Signed-off-by: Jiawei Wang --- app/test-pmd/cmdline.c | 84 + devtools/libabigail.abignore| 5 ++ doc/guides/rel_notes/release_22_03.rst | 4 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 13 li

[RFC 3/5] drivers: add lag Rx port affinity in PRM

2022-12-21 Thread Jiawei Wang
This patch adds function to query hca capability via Devx for lag_rx_port_affinity. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 7 +-- drivers/net/mlx5/linux/mlx5_os.c | 4

[RFC 4/5] net/mlx5: add port affinity item support

2022-12-21 Thread Jiawei Wang
This patch adds the new port affinity item supports in PMD: RTE_FLOW_ITEM_TYPE_PORT_AFFINITY. This patch adds the validation function for the new item, it works for NIC-RX rules on ROOT-table only. Signed-off-by: Jiawei Wang --- doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5

[RFC 5/5] drivers: enhance the Tx queue affinity

2022-12-21 Thread Jiawei Wang
hash mode. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/mlx5_prm.h | 8 --- drivers/net/mlx5/mlx5.c| 43 +++--- drivers/net/mlx5/mlx5_devx.c | 21 ++--- drivers/net/mlx5/mlx5_tx.h | 1 + drivers/net/mlx5/mlx5_txq.c| 9

[dpdk-dev] [PATCH] doc: update sample actions support in mlx5 guide

2021-03-09 Thread Jiawei Wang
Updates the documentation for supported sample actions in the NIC Rx and E-Switch steering flow. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst

[dpdk-dev] [PATCH] doc: add sampling and mirroring in testpmd guide

2021-03-09 Thread Jiawei Wang
Update documentation for sample action usage in testpmd and show the command line example. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 60 + 1 file changed, 60 insertions(+) diff --git a/doc/guides

[dpdk-dev] [PATCH v2] doc: update sample actions support in mlx5 guide

2021-03-14 Thread Jiawei Wang
Updates the documentation for supported sample actions in the NIC Rx and E-Switch steering flow. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/mlx5.rst b

[dpdk-dev] [PATCH] app/testpmd: fix the miss configuration for NVGRE encap

2021-03-15 Thread Jiawei Wang
ned-off-by: Jiawei Wang Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 49d9f9c..2c40c69 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -5439

[dpdk-dev] [PATCH v3] doc: update sample actions support in mlx5 guide

2021-03-16 Thread Jiawei Wang
Updates the documentation for supported sample actions in the NIC Rx and E-Switch steering flow. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- v3: * Update the description. v2: * Update the description. --- doc/guides/nics/mlx5.rst | 14 +++--- 1 file changed, 11

[PATCH] net/mlx5: fix modify action attributes detection

2022-08-31 Thread Jiawei Wang
mlx5: fix match information in meter") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index bee9363515..f0dbc96dc8

[PATCH v2] net/mlx5: fix modify action attributes detection

2022-08-31 Thread Jiawei Wang
mlx5: fix match information in meter") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- v2: fix the style warning --- drivers/net/mlx5/mlx5_flow_dv.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_d

[PATCH v4] net/mlx5: fix the NIC egress flow mismatch in switchdev mode

2022-03-02 Thread Jiawei Wang
TX_QUEUE items in order to not impact hairpins. Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko Acked-by: Ori Kam --- v4: rebase v3: update the tx_item checking v2: fix one typo ---

[PATCH] net/mlx5: fix the port match in sample flow

2022-03-06 Thread Jiawei Wang
after flow split. This patch copies the explicit port match to the sample suffix subflow, and the latter gets the correct source vport value in the flow matcher. Fixes: b4c0ddbfcc58 ("net/mlx5: split sample flow into two sub-flows") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- d

[PATCH] net/mlx5: fix the sample flow failure on the trusted device

2022-03-09 Thread Jiawei Wang
ned-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst| 2 ++ drivers/net/mlx5/mlx5_flow.c| 6 ++ drivers/net/mlx5/mlx5_flow_dv.c | 10 ++ 3 files changed, 18 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index

[PATCH] net/mlx5: fix the implicit tag insertion in sample flow

2022-03-09 Thread Jiawei Wang
AN or encap action (if any) in the prefix sub-flow. Fixes: 6a951567c159 ("net/mlx5: support E-Switch mirroring and jump in one flow") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 63 +

[dpdk-dev] [PATCH] net/mlx5: fix RSS expansion for GRE KEY

2021-05-07 Thread Jiawei Wang
KEY and mlx5 PMD performs RSS expansion correctly. Fixes: 048f0d45e342 ("net/mlx5: support RSS expansion for IPv6 GRE") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Xiaoyu Min Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 16 +--- 1 file c

[dpdk-dev] [PATCH 0/3] app/flow-perf: support meter policy API

2021-05-10 Thread Jiawei Wang
This patch set contains three updates for flow perf application: 1. Adds the option 'policy-mtr' to indicate if create a meter with policy; 2. Adds the option 'meter-cir' to configure the CIR parameter; 3. Adds the option 'packet-mode' to enable the meter PPS. Ji

[dpdk-dev] [PATCH 1/3] app/flow-perf: support meter policy API

2021-05-10 Thread Jiawei Wang
: Haifei Luo Signed-off-by: Jiawei Wang Acked-by: Wisam Jaddo --- app/test-flow-perf/main.c | 87 -- doc/guides/tools/flow-perf.rst | 3 ++ 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/mai

[dpdk-dev] [PATCH 2/3] app/flow-perf: add new meter CIR Configuration

2021-05-10 Thread Jiawei Wang
Add the new meter CIR configuration parameter, user can set the different value for committed information rate(CIR) parameter. The usage as below: --meter-cir=N, default count is 125. Signed-off-by: Jiawei Wang Acked-by: Wisam Jaddo --- app/test-flow-perf/main.c | 13

[dpdk-dev] [PATCH 3/3] app/flow-perf: add the supports for meter PPS

2021-05-10 Thread Jiawei Wang
The flow perf application used the srtcm_rfc2697 as meter profile while do the meter testing. This patch adds the support new configuration parameter '--packet-mode' to generate the meter flows with the packet mode. Signed-off-by: Jiawei Wang Acked-by: Wisam Jaddo --- app/test-flow-p

[dpdk-dev] [PATCH 1/2] net/mlx5: fix the checking for age action

2021-05-10 Thread Jiawei Wang
actual group value for age action checking, Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow_dv.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/d

[dpdk-dev] [PATCH 2/2] net/mlx5: fix ASO age null context issue

2021-05-10 Thread Jiawei Wang
is NULL then return rte_flow pointer to user, otherwise return the original flow context. Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow_dv.c | 33 - 1 file c

[dpdk-dev] [PATCH] net/mlx5: support RSS expansion for NVGRE

2021-05-11 Thread Jiawei Wang
Currently RSS expansion only support GRE and GRE KEY. This patch add RSS expansion for NVGRE item so PMD can expand flow item correctly. Fixes: f4b901a46aec ("net/mlx5: add flow GRE item") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_

[dpdk-dev] [PATCH] net/mlx5: fix the mirror not work with meter action

2021-05-11 Thread Jiawei Wang
ction before. Fixes: 07627fbf1506 ("net/mlx5: support E-Switch mirroring with modify action") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5_flow.

[dpdk-dev] [PATCH v2] net/mlx5: fix RSS expansion for NVGRE

2021-05-12 Thread Jiawei Wang
Currently RSS expansion only supports GRE and GRE KEY. This patch adds RSS expansion for NVGRE item so PMD can expand flow item correctly. Fixes: ea81c1b816f7 ("net/mlx5: fix NVGRE matching") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Xiaoyu Min --- drivers/net/mlx5/m

[dpdk-dev] [PATCH v2 1/2] net/mlx5: fix age action in transfer root group

2021-05-12 Thread Jiawei Wang
transfer checking for ASO age action. Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[dpdk-dev] [PATCH 1/2] net/mlx5: fix the checking for age action

2021-05-12 Thread Jiawei Wang
actual group value for age action checking, Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow_dv.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/d

[dpdk-dev] [PATCH 2/2] net/mlx5: fix ASO age null context issue

2021-05-12 Thread Jiawei Wang
is NULL then return rte_flow pointer to user, otherwise return the original flow context. Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow_dv.c | 33 - 1 file c

[dpdk-dev] [PATCH v2 2/2] net/mlx5: fix default context in flow age action

2021-05-12 Thread Jiawei Wang
modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 81 + 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_

[dpdk-dev] [PATCH v3 2/2] net/mlx5: fix default context in flow age action

2021-05-12 Thread Jiawei Wang
modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 81 + 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_

[dpdk-dev] [PATCH v3 1/2] net/mlx5: fix age action in transfer root group

2021-05-12 Thread Jiawei Wang
transfer checking for ASO age action. Fixes: f9bc5274a6f9 ("net/mlx5: allow age modes combination") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[dpdk-dev] [PATCH 1/2] common/mlx5: add glue function for duplicate rule ability

2021-05-28 Thread Jiawei Wang
Add glue function to update the duplicate rule allow/disallow through rdma-core DV API. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/linux/meson.build | 2 ++ drivers/common/mlx5/linux/mlx5_glue.c | 12 drivers/common/mlx5/linux/mlx5_glue.h | 1 + 3 files changed, 15

[dpdk-dev] [PATCH 2/2] net/mlx5: control rules with identical pattern behavior

2021-05-28 Thread Jiawei Wang
cted. The default is to allow. Set it to 0 if disallow, for example: -a ,allow_duplicate_pattern=0 Signed-off-by: Jiawei Wang --- doc/guides/nics/mlx5.rst | 10 ++ doc/guides/rel_notes/release_21_08.rst | 6 ++ drivers/net/mlx5/linux/mlx5_os.c | 7 ++

[dpdk-dev] [PATCH] net/mlx5: fix incorrect group value of sample suffix flow

2020-10-28 Thread Jiawei Wang
at will be set to 1 for the sample suffix flow, and will skip the scale with table factor in the translation function. Redmine: 2337417 Fixes: dc67aa65c698 ("net/mlx5: implement tunnel offload API") Signed-off-by: Jiawei Wang --- drivers/net/mlx5/

[dpdk-dev] [PATCH] common/mlx5: free MR resource while device DMA unmap

2020-10-28 Thread Jiawei Wang
: 989e999d9305 ("net/mlx5: support PCI device DMA map and unmap") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/common/mlx5/mlx5_common_mr.c | 12 ++-- drivers/common/mlx5/mlx5_common_mr.h | 4 drivers/common/mlx5/version.map | 1 + drivers/net/mlx5

[dpdk-dev] [PATCH v2] fix incorrect group value of sample suffix flow

2020-10-30 Thread Jiawei Wang
This patch fix the wrong flow group configuration for sample suffix flow in mlx5 pmd driver. v2: * Update commit message * Rebase Jiawei Wang (1): net/mlx5: fix incorrect group value of sample suffix flow drivers/net/mlx5/mlx5_flow.c| 155

[dpdk-dev] [PATCH v2] net/mlx5: fix incorrect group value of sample suffix flow

2020-10-30 Thread Jiawei Wang
on. On the mlx5_flow_group_to_table function skips the scale with table factor to use the correct group value. Redmine: 2337417 Fixes: dc67aa6 ("net/mlx5: implement tunnel offload API") Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 155 ++---

[dpdk-dev] [PATCH v3] net/mlx5: fix incorrect group value of sample suffix flow

2020-10-31 Thread Jiawei Wang
on. On the mlx5_flow_group_to_table function skips the scale with table factor to use the correct group value. Fixes: dc67aa6 ("net/mlx5: implement tunnel offload API") Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 155 ++

[dpdk-dev] [PATCH v2] common/mlx5: free MR resource while device DMA unmap

2020-11-01 Thread Jiawei Wang
/mlx5: support PCI device DMA map and unmap") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_common_mr.c | 12 ++-- drivers/common/mlx5/mlx5_common_mr.h | 4 drivers/common/mlx5/version.map | 1 + driver

[dpdk-dev] [PATCH 0/7] support the flow-based traffic sampling

2020-07-02 Thread Jiawei Wang
patches based on the latest code. * Update rte_flow and release documents. * Fix the compile error. * Removed unnecessary change in [PATCH 7/8] net/mlx5: update the metadata register c0 support since FDB will use 5-tuple to do match. * Update changes based on the comments. Jiawei Wang (7): ethdev

[dpdk-dev] [PATCH 3/7] common/mlx5: query sampler object capability via DevX

2020-07-02 Thread Jiawei Wang
Update function mlx5_devx_cmd_query_hca_attr() to add the NIC Flow Table attributes query, then get the log_max_flow_sampler_num from flow table properties. Add the related structs definition in mlx5_prm.h. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/mlx5_devx_cmds.c

[dpdk-dev] [PATCH 2/7] common/mlx5: glue for sample action

2020-07-02 Thread Jiawei Wang
rdma-core introduce a new DR sample action. Add the rdma-core commands in glue to create this action. Sample action is used for creating the sample object to implement the sampling/mirroring function. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/Makefile | 5

[dpdk-dev] [PATCH 1/7] ethdev: introduce sample action for rte flow

2020-07-02 Thread Jiawei Wang
d be completely mirrored. The sample packet can be assigned with different set of actions from the original packet. In order to support the sample packet in rte_flow, new rte_flow action definition RTE_FLOW_ACTION_TYPE_SAMPLE and structure rte_flow_action_sample will be introduced. Signed-off-by: Jiawei

[dpdk-dev] [PATCH 7/7] app/testpmd: add testpmd command for sample action

2020-07-02 Thread Jiawei Wang
2 ... The flow will result in all the matched ingress packets will be sent to port 2, and the each second packet will also be sent to e-switch manager vport. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 285 ++-- 1 file ch

[dpdk-dev] [PATCH 4/7] net/mlx5: add the validate sample action

2020-07-02 Thread Jiawei Wang
igned-off-by: Jiawei Wang --- drivers/net/mlx5/linux/mlx5_os.c | 14 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 133 +++ 4 files changed, 149 insertions(+) diff --git a/drivers/net

[dpdk-dev] [PATCH 6/7] net/mlx5: update translate function for sample action

2020-07-02 Thread Jiawei Wang
Translate the attribute of sample action that include sample ratio and sub actions list, then create the sample DR action. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 16 +- drivers/net/mlx5/mlx5_flow.h| 14 +- drivers/net/mlx5/mlx5_flow_dv.c | 494

[dpdk-dev] [PATCH 5/7] net/mlx5: split sample flow into two sub flows

2020-07-02 Thread Jiawei Wang
will add the extra tag item to match that unique id. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/net/mlx5/mlx5.c | 11 ++ drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_flow.c | 258 ++- drivers/net/mlx5/mlx5_flow.h | 36

[dpdk-dev] [PATCH v2 0/7] [v2] support the flow-based traffic sampling

2020-07-02 Thread Jiawei Wang
-tuple to do match. * Update changes based on the comments. Jiawei Wang (7): ethdev: introduce sample action for rte flow common/mlx5: glue for sample action common/mlx5: query sampler object capability via DevX net/mlx5: add the validate sample action net/mlx5: split sample flow into two

[dpdk-dev] [PATCH v2 3/7] common/mlx5: query sampler object capability via DevX

2020-07-02 Thread Jiawei Wang
Update function mlx5_devx_cmd_query_hca_attr() to add the NIC Flow Table attributes query, then get the log_max_flow_sampler_num from flow table properties. Add the related structs definition in mlx5_prm.h. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/mlx5_devx_cmds.c

[dpdk-dev] [PATCH v2 2/7] common/mlx5: glue for sample action

2020-07-02 Thread Jiawei Wang
rdma-core introduce a new DR sample action. Add the rdma-core commands in glue to create this action. Sample action is used for creating the sample object to implement the sampling/mirroring function. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/Makefile | 5

[dpdk-dev] [PATCH v2 1/7] ethdev: introduce sample action for rte flow

2020-07-02 Thread Jiawei Wang
d be completely mirrored. The sample packet can be assigned with different set of actions from the original packet. In order to support the sample packet in rte_flow, new rte_flow action definition RTE_FLOW_ACTION_TYPE_SAMPLE and structure rte_flow_action_sample will be introduced. Signed-off-by: Jiawei

[dpdk-dev] [PATCH v2 6/7] net/mlx5: update translate function for sample action

2020-07-02 Thread Jiawei Wang
Translate the attribute of sample action that include sample ratio and sub actions list, then create the sample DR action. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 16 +- drivers/net/mlx5/mlx5_flow.h| 14 +- drivers/net/mlx5/mlx5_flow_dv.c | 494

[dpdk-dev] [PATCH v2 4/7] net/mlx5: add the validate sample action

2020-07-02 Thread Jiawei Wang
igned-off-by: Jiawei Wang --- drivers/net/mlx5/linux/mlx5_os.c | 14 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 133 +++ 4 files changed, 149 insertions(+) diff --git a/drivers/net

[dpdk-dev] [PATCH v2 7/7] app/testpmd: add testpmd command for sample action

2020-07-02 Thread Jiawei Wang
2 ... The flow will result in all the matched ingress packets will be sent to port 2, and the each second packet will also be sent to e-switch manager vport. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 285 ++-- 1 file ch

[dpdk-dev] [PATCH v2 5/7] net/mlx5: split sample flow into two sub flows

2020-07-02 Thread Jiawei Wang
will add the extra tag item to match that unique id. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/net/mlx5/mlx5.c | 11 ++ drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_flow.c | 258 ++- drivers/net/mlx5/mlx5_flow.h | 36

[dpdk-dev] [PATCH v3 0/7] support the flow-based traffic sampling

2020-07-06 Thread Jiawei Wang
se 5-tuple to do match. * Update changes based on the comments. Jiawei Wang (7): ethdev: introduce sample action for rte flow common/mlx5: glue for sample action common/mlx5: query sampler object capability via DevX net/mlx5: add the validate sample action net/mlx5: split sample flow in

[dpdk-dev] [PATCH v3 2/7] common/mlx5: glue for sample action

2020-07-06 Thread Jiawei Wang
rdma-core introduce a new DR sample action. Add the rdma-core commands in glue to create this action. Sample action is used for creating the sample object to implement the sampling/mirroring function. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/Makefile | 5

[dpdk-dev] [PATCH v3 3/7] common/mlx5: query sampler object capability via DevX

2020-07-06 Thread Jiawei Wang
Update function mlx5_devx_cmd_query_hca_attr() to add the NIC Flow Table attributes query, then get the log_max_flow_sampler_num from flow table properties. Add the related structs definition in mlx5_prm.h. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/common/mlx5/mlx5_devx_cmds.c

[dpdk-dev] [PATCH v3 5/7] net/mlx5: split sample flow into two sub flows

2020-07-06 Thread Jiawei Wang
will add the extra tag item to match that unique id. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/net/mlx5/mlx5.c | 11 ++ drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_flow.c | 258 ++- drivers/net/mlx5/mlx5_flow.h | 36

[dpdk-dev] [PATCH v3 4/7] net/mlx5: add the validate sample action

2020-07-06 Thread Jiawei Wang
igned-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/net/mlx5/linux/mlx5_os.c | 14 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 133 +++ 4 files changed, 149 insertions(+) diff

[dpdk-dev] [PATCH v3 1/7] ethdev: introduce sample action for rte flow

2020-07-06 Thread Jiawei Wang
d be completely mirrored. The sample packet can be assigned with different set of actions from the original packet. In order to support the sample packet in rte_flow, new rte_flow action definition RTE_FLOW_ACTION_TYPE_SAMPLE and structure rte_flow_action_sample will be introduced. Signed-off-by: Jiawei

[dpdk-dev] [PATCH v3 6/7] net/mlx5: update translate function for sample action

2020-07-06 Thread Jiawei Wang
Translate the attribute of sample action that include sample ratio and sub actions list, then create the sample DR action. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow.c| 16 +- drivers/net/mlx5/mlx5_flow.h| 14 +- drivers/net/mlx5/mlx5_flow_dv.c | 494

[dpdk-dev] [PATCH v3 7/7] app/testpmd: add testpmd command for sample action

2020-07-06 Thread Jiawei Wang
2 ... The flow will result in all the matched ingress packets will be sent to port 2, and the each second packet will also be sent to e-switch manager vport. Signed-off-by: Jiawei Wang Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 285 ++-- 1 file ch

[dpdk-dev] [PATCH] net/mlx5: fix imissed counter overflow issue

2020-03-29 Thread Jiawei Wang
update the new value into lower 32bit, finally return the 64bit counter value. Fixes: ce9494d76c4 ("net/mlx5: report imissed statistics") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5.h | 3 ++ drivers/net/mlx5/mlx5_stats.c | 57

[dpdk-dev] [RFC] ethdev: introduce sample action for rte flow

2020-06-11 Thread Jiawei Wang
reate...pattern eth / end actions sample ratio 1 index 2 / raw_encap index 1 / port_id id 0 / end Signed-off-by: Jiawei Wang --- lib/librte_ethdev/rte_flow.c | 1 + lib/librte_ethdev/rte_flow.h | 29 + 2 files changed, 30 insertions(+) diff --git a/lib/librt

[dpdk-dev] [PATCH 1/8] ethdev: introduce sample action for rte flow

2020-06-25 Thread Jiawei Wang
d be completely mirrored. The sample packet can be assigned with different set of actions from the original packet. In order to support the sample packet in rte_flow, new rte_flow action definition RTE_FLOW_ACTION_TYPE_SAMPLE and structure rte_flow_action_sample will be introduced. Signed-off-by: Jiawei

[dpdk-dev] [PATCH 0/8] support the flow-based traffic sampling

2020-06-25 Thread Jiawei Wang
sample ratio value be set to 1, means that the packets would be completely mirrored. The sample packet can be assigned with additional set of actions from the original packet. MLX5 PMD driver will be responsible for validate and translate the sample action while creating a flow. Jiawei Wang (8

[dpdk-dev] [PATCH 4/8] net/mlx5: add the validate sample action

2020-06-25 Thread Jiawei Wang
Add sample action validate function. For Sample flow support NIC-RX and FDB domain, must include an action of a dest TIR in NIC_RX or DEFAULT_MISS in FDB. Only NIC_RX support with addition optinal actions. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/linux/mlx5_os.c | 14 + drivers

[dpdk-dev] [PATCH 2/8] common/mlx5: glue for default miss and sample action

2020-06-25 Thread Jiawei Wang
object to implement the sampling/mirroring function. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/Makefile | 10 ++ drivers/common/mlx5/linux/meson.build | 4 drivers/common/mlx5/linux/mlx5_glue.c | 28 drivers/common/mlx5/linux/mlx5_glue.h

[dpdk-dev] [PATCH 3/8] common/mlx5: query sampler object capability via DevX

2020-06-25 Thread Jiawei Wang
Update function mlx5_devx_cmd_query_hca_attr() to add the NIC Flow Table attributes query, then get the log_max_flow_sampler_num from flow table properties. Add the related structs definition in mlx5_prm.h. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/mlx5_devx_cmds.c | 27

[dpdk-dev] [PATCH 5/8] net/mlx5: split sample flow into two sub flows

2020-06-25 Thread Jiawei Wang
will add the extra tag item to match that unique id. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5.c | 11 ++ drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_flow.c | 254 ++- drivers/net/mlx5/mlx5_flow.h | 37 +++ 4 files

[dpdk-dev] [PATCH 7/8] net/mlx5: update the metadata register c0 support

2020-06-25 Thread Jiawei Wang
-bits of metadata register c0 filed. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow_dv.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 62a4a3b..ed9d2d2e

[dpdk-dev] [PATCH 6/8] net/mlx5: update translate function for sample action

2020-06-25 Thread Jiawei Wang
Translate the attribute of sample action that include sample ratio and sub actions list, then create the sample DR action. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 16 +- drivers/net/mlx5/mlx5_flow.h| 14 +- drivers/net/mlx5/mlx5_flow_dv.c | 502

[dpdk-dev] [PATCH 8/8] app/testpmd: add testpmd command for sample action

2020-06-25 Thread Jiawei Wang
2 ... The flow will result in all the matched ingress packets will be sent to port 2, and the each second packet will also be sent to e-switch manager vport. Signed-off-by: Jiawei Wang --- app/test-pmd/cmdline_flow.c | 285 ++-- 1 file changed, 276 insert

[dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump overlapping

2021-01-06 Thread Jiawei Wang
string buffer that collects all the packet dump output into this buffer and then printouts it at last, that guarantees to printout separately the dump output per packet. Fixes: d862c45 ("app/testpmd: move dumping packets to a separate function") Signed-off-by: Jiawei Wang Acked-by:

[dpdk-dev] [PATCH 2/3] net/mlx5: handle the RSS action in the sample

2021-01-10 Thread Jiawei Wang
with the original flow list, since the expanding items for RSS should same in one flow. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 24 - drivers/net/mlx5/mlx5_flow_dv.c | 226 +++- 2 files changed, 175 insertions(+), 75 deletions

[dpdk-dev] [PATCH 1/3] app/testpmd: add RSS support in sample action

2021-01-10 Thread Jiawei Wang
result in all the matched ingress packets will be jumped to next table, and the each packet will be marked and sent to rss queues of the control application. Signed-off-by: Jiawei Wang --- app/test-pmd/cmdline_flow.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a

[dpdk-dev] [PATCH 0/3] Add RSS action support in the sample sub-actions list

2021-01-10 Thread Jiawei Wang
create 0 ingress group 1 pattern eth / end actions sample ratio 1 index 0 / jump group 2 / end This flow will result in all the matched ingress packets will be jumped to next table, and the each packet will be marked and sent to rss queues of the control application. Jiawei Wang (3): app/testpmd

[dpdk-dev] [PATCH 3/3] doc: update RSS support in sample action

2021-01-10 Thread Jiawei Wang
Add descrption about RSS action will be supported in the Sample action in MLX5 PMD. Signed-off-by: Jiawei Wang --- doc/guides/nics/mlx5.rst | 1 + doc/guides/rel_notes/release_21_02.rst | 5 + 2 files changed, 6 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides

[dpdk-dev] [PATCH 1/5] common/mlx5: query register c preserve capability via DevX

2021-01-10 Thread Jiawei Wang
(using Flow Sampler). If the reg_c_preserve bit is set to 1, then the above limitation is obsolete, the all metadata registers Cx preserve their values even through the operations mentioned above. Signed-off-by: Jiawei Wang --- drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++ drivers/common/mlx5

[dpdk-dev] [PATCH 2/5] net/mlx5: support E-Switch mirroring and jump in one flow

2021-01-10 Thread Jiawei Wang
/ end actions set_mac_dst mac_addr 00:aa:bb:cc:dd:ee / port_id id 2 / end The flow results all the matched ingress packets are mirrored to port id 1 and go to group 1. In the group 1, packets are modified with the destination mac and sent to port id 2. Signed-off-by: Jiawei Wang --- drivers

[dpdk-dev] [PATCH 0/5] Add the E-Switch mirroring and jump supports

2021-01-10 Thread Jiawei Wang
modified with the destination mac and sent to port id 2. Jiawei Wang (5): common/mlx5: query register c preserve capability via DevX net/mlx5: support E-Switch mirroring and jump in one flow net/mlx5: extend the skip scale flag net/mlx5: supports modify one port in E-Switch mirroring doc: update

[dpdk-dev] [PATCH 4/5] net/mlx5: supports modify one port in E-Switch mirroring

2021-01-10 Thread Jiawei Wang
below: Original flow: items / actions pre / sample / modify / actions sfx prefix sub flow - items / actions pre / set_tag action / sample / jump suffix sub flow - tag_item / modify / actions sfx Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c

[dpdk-dev] [PATCH 3/5] net/mlx5: extend the skip scale flag

2021-01-10 Thread Jiawei Wang
bit0 of 'skip_scale' flag is set to 1, then skip the scale the original flow group; If bit1 of 'skip_scale' flag is set to 1, then skip the scale the jump flow group. Signed-off-by: Jiawei Wang --- drivers/net/mlx5/mlx5_flow.c| 2 +- drivers/net/mlx5/mlx5_flow.h| 21

[dpdk-dev] [PATCH 5/5] doc: update the advanced E-switch mirroring supports

2021-01-10 Thread Jiawei Wang
Updates the description in MLX5 PMD and release note. Adds the new supports for E-switch mirroring and jump in one flow, and header modify one port in E-switch mirroring. Signed-off-by: Jiawei Wang --- doc/guides/nics/mlx5.rst | 2 ++ doc/guides/rel_notes/release_21_02.rst | 6

[dpdk-dev] [PATCH v2 4/4] doc: update RSS support in sample action

2021-01-12 Thread Jiawei Wang
Add description about mlx5 PMD RSS action support for the Sample action. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 1 + doc/guides/rel_notes/release_21_02.rst | 5 + 2 files changed, 6 insertions(+) diff --git a/doc/guides/nics

[dpdk-dev] [PATCH v2 3/4] net/mlx5: handle the RSS action in the sample

2021-01-12 Thread Jiawei Wang
consistent with the original flow list, since the expanding items for RSS should be the same for both actions. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c| 20 +++- drivers/net/mlx5/mlx5_flow_dv.c | 226 +++- 2 files

[dpdk-dev] [PATCH v2 1/4] app/testpmd: add RSS support in sample action

2021-01-12 Thread Jiawei Wang
result in all the matched ingress packets will be jumped to next table, and the each packet will be marked with 0x12 and duplicated to rss queues of the control application. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- app/test-pmd/cmdline_flow.c | 26

[dpdk-dev] [PATCH v2 0/4] Add RSS action support in the sample sub-actions list

2021-01-12 Thread Jiawei Wang
: * Rebase * Update commit message and document description * Split the commit into one fix for rss checking and another for sample rss feature Jiawei Wang (4): app/testpmd: add RSS support in sample action net/mlx5: fix the unnecessary checking for RSS action net/mlx5: handle the RSS action in the

[dpdk-dev] [PATCH v2 2/4] net/mlx5: fix the unnecessary checking for RSS action

2021-01-12 Thread Jiawei Wang
RSS action is valid only in NIC-RX domain, this fix bypass the function that getting RSS action from the flow action list under no NIC-RX domain. Fixes: e745f900072e ("net/mlx5: optimize flow RSS struct") Cc: sta...@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Viacheslav

[dpdk-dev] [PATCH v2 5/5] doc: update the advanced E-switch mirroring supports

2021-01-12 Thread Jiawei Wang
Updates the description in MLX5 PMD and release note. Adds the new supports for E-switch mirroring and jump action in the same flow, and handle modify action in correct order regarding the mirroring action on E-Switch. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides

[dpdk-dev] [PATCH v2 3/5] net/mlx5: extend the skip scale flag

2021-01-12 Thread Jiawei Wang
bit0 of 'skip_scale' flag is set to 1, then skip the scale the original flow group; If bit1 of 'skip_scale' flag is set to 1, then skip the scale the jump flow group. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c| 2

[dpdk-dev] [PATCH v2 1/5] common/mlx5: query register c preserve capability via DevX

2021-01-12 Thread Jiawei Wang
(using Flow Sampler). If the reg_c_preserve bit is set to 1, then the above limitation is obsolete, the all metadata registers Cx preserve their values even through the operations mentioned above. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_devx_cmds.c | 2

[dpdk-dev] [PATCH v2 4/5] net/mlx5: update modify actions support for E-Switch mirror

2021-01-12 Thread Jiawei Wang
below: Original flow: items / actions pre / sample / modify / actions sfx prefix sub flow - items / actions pre / set_tag action / sample / jump suffix sub flow - tag_item / modify / actions sfx Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_f

[dpdk-dev] [PATCH v2 0/5] Add the E-Switch mirroring and jump supports

2021-01-12 Thread Jiawei Wang
modified with the destination mac and sent to port id 2. v2: * Rebase * Update commit message and document description Jiawei Wang (5): common/mlx5: query register c preserve capability via DevX net/mlx5: support E-Switch mirroring and jump in one flow net/mlx5: extend the skip scale flag net

[dpdk-dev] [PATCH v2 2/5] net/mlx5: support E-Switch mirroring and jump in one flow

2021-01-12 Thread Jiawei Wang
eth / end actions set_mac_dst mac_addr 00:aa:bb:cc:dd:ee / port_id id 2 / end The flow results all the matched ingress packets are mirrored to port id 1 and go to group 1. In the group 1, packets are modified with the destination mac and sent to port id 2. Signed-off-by: Jiawei Wang Acked-by

[dpdk-dev] [PATCH v3 4/4] doc: update RSS support in sample action

2021-01-13 Thread Jiawei Wang
Add description about mlx5 PMD RSS action support for the Sample action. Signed-off-by: Jiawei Wang Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 1 + doc/guides/rel_notes/release_21_02.rst | 5 + 2 files changed, 6 insertions(+) diff --git a/doc/guides/nics

<    1   2   3   4   >