[PATCH] net/mlx5/hws: allow vport action to wire in RX flow

2024-11-19 Thread Itamar Gozlan
From: Erez Shitrit Now that the FW should allow it we can go to a wire interface under the assumption it is a north directed wire. Signed-off-by: Erez Shitrit Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/hws/mlx5dr_action.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) d

[PATCH] net/mlx5/hws: fix allocation of STCs

2024-10-29 Thread Itamar Gozlan
From: Erez Shitrit STC is a limited resource of the HW, and might get consumed till no more contexts can be opened. So, let the user to define the size of how many STCs to allocate per context. In case the user has many representors, no need to allocate per each of them the default value of STCs,

[v2] net/mlx5/hws: in NAT64 fix TC to TOS fields mapping

2024-10-27 Thread Itamar Gozlan
From: Hamdan Igbaria In IPv6 to IPv4 scenario when copying the TC field to the TOS[DSCP:6 bits, ECN: 2 bits] field the mapping of the fields get set wrongly, since the destination field of TOS is defined as 2 split fields of DSCP and ECN. In IPv4 to IPv6 we don't have this issue since both the so

[PATCH] net/mlx5/hws: in NAT64 fix TC to TOS fields mapping

2024-10-07 Thread Itamar Gozlan
From: Hamdan Igbaria In IPv6 to IPv4 scenario when copying the TC field to the TOS[DSCP:6 bits, ECN: 2 bits] field the mapping of the fields get set wrongly, since the destination field of TOS is defined as 2 split fields of DSCP and ECN. In IPv4 to IPv6 we don't have this issue since both the so

[PATCH 8/8] net/mlx5/hws: fix NA64 copy TOS field instead of TTL

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit We don't have enough registers to copy TTL and TOS, so we will set TTL to be the default value (64) and will copy TOS. Fixes: 06d969a8c5b8 ("net/mlx5/hws: support NAT64 flow action") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad

[PATCH 7/8] net/mlx5/hws: fix NAT64 csum issue

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit Due to HW limitation we got two csum's that were not correct, udp and ip, both of them were not calculated correctly by the HW. By adding the next W/A we allow the HW to collect it well: Separate the protocol field and zero all the addresses before fixed the UDP csum. We saw th

[PATCH 6/8] net/mlx5/hws: take out not needed variable

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit Removing a redundant variable. Was there from day 1, not in use. Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 1 - 1 file chan

[PATCH 5/8] net/mlx5/hws: fix incorrect port ID on root item convert

2024-07-09 Thread Itamar Gozlan
From: Alex Vesker When calling item convert function we need to pass the port_id in the attributes. This value should be passed not only for cases that match on PORT related items, to resolve we will always pass it. Fixes: 572fe9ef2f46 ("net/mlx5/hws: fix port ID for root table") Cc: ere...@nvid

[PATCH 4/8] net/mlx5/hws: fix deletion of action vport

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit No more ignoring this action while destroying it. Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.c | 4 drivers/net/mlx5/hws/mlx

[PATCH 3/8] net/mlx5/hws: strictly range templates check fix

2024-07-09 Thread Itamar Gozlan
range definer creation") Cc: va...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/ne

[PATCH 2/8] net/mlx5/hws: fix memory leak in modify header free

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2 we use modify-header object, we support few of that type at the same time over this action depends on the number of headers. Now when destroying the modify-header object we run over the number_of_patterns, t

[PATCH 0/8] HW steering team updates

2024-07-09 Thread Itamar Gozlan
: fix NAT64 csum issue net/mlx5/hws: fix NA64 copy TOS field instead of TTL Itamar Gozlan (1): net/mlx5/hws: strictly range templates check fix drivers/net/mlx5/hws/mlx5dr_action.c | 213 ++ drivers/net/mlx5/hws/mlx5dr_action.h | 17 +- drivers/net/mlx5/hws

[PATCH 1/8] net/mlx5/hws: set eswitch owner vhc ID valid accordingly

2024-07-09 Thread Itamar Gozlan
From: Erez Shitrit eswitch_owner_vhca_id_valid value should be set to 1 only on merged-eswitch device. Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.c | 12 drivers/net/mlx5/hws/mlx5dr_cmd.c| 3 ++- drivers/net/mlx5/hws/mlx5dr_cmd.h

[PATCH 10/10] net/mlx5/hws: fix NA64 copy TOS field instead of TTL

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit We don't have enough registers to copy TTL and TOS, so we will set TTL to be the default value (64) and will copy TOS. Fixes: 06d969a8c5b8 ("net/mlx5/hws: support NAT64 flow action") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad

[PATCH 09/10] net/mlx5/hws: fix NAT64 csum issue

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit Due to HW limitation we got two csum's that were not correct, udp and ip, both of them were not calculated correctly by the HW. By adding the next W/A we allow the HW to collect it well: Separate the protocol field and zero all the addresses before fixed the UDP csum. We saw th

[PATCH 08/10] net/mlx5/hws: take out not needed variable

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit Removing a redundant variable. Was there from day 1, not in use. Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 1 - 1 file chan

[PATCH 07/10] net/mlx5/hws: fix incorrect port ID on root item convert

2024-07-07 Thread Itamar Gozlan
From: Alex Vesker When calling item convert function we need to pass the port_id in the attributes. This value should be passed not only for cases that match on PORT related items, to resolve we will always pass it. Fixes: 572fe9ef2f46 ("net/mlx5/hws: fix port ID for root table") Cc: ere...@nvid

[PATCH 06/10] net/mlx5/hws: fix deletion of action vport

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit No more ignoring this action while destroying it. Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object") Cc: ere...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.c | 4 drivers/net/mlx5/hws/mlx

[PATCH 05/10] net/mlx5/hws: strictly range templates check fix

2024-07-07 Thread Itamar Gozlan
range definer creation") Cc: va...@nvidia.com Cc: sta...@dpdk.org Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/ne

[PATCH 04/10] net/mlx5/hws: fix memory leak in modify header free

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2 we use modify-header object, we support few of that type at the same time over this action depends on the number of headers. Now when destroying the modify-header object we run over the number_of_patterns, t

[PATCH 03/10] net/mlx5/hws: set eswitch owner vhc ID valid accordingly

2024-07-07 Thread Itamar Gozlan
From: Erez Shitrit eswitch_owner_vhca_id_valid value should be set to 1 only on merged-eswitch device. Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.c | 12 drivers/net/mlx5/hws/mlx5dr_cmd.c| 3 ++- drivers/net/mlx5/hws/mlx5dr_cmd.h

[PATCH 02/10] net/mlx5: fix matcher object memory leak

2024-07-07 Thread Itamar Gozlan
From: Mahmoud Maatuq This makes sure that the allocated matcher object is freed for all branches that return NULL. Coverity issue: 426424 Fixes: 27d171b88031 ("net/mlx5: abstract flow action and enable reconfigure") Signed-off-by: Mahmoud Maatuq Acked-by: Bing Zhao Acked-by: Dariusz Sosnowski

[PATCH 01/10] net/mlx5: add hairpin out of buffer counter

2024-07-07 Thread Itamar Gozlan
From: Shani Peretz Currently mlx5 PMD exposes rx_out_of_buffer counter that tracks packets dropped when Rx queue was full. To provide more granular statistics, this patch splits the `rx_out_of_buffer` counter into two separate counters: 1. hairpin_out_of_buffer - This counter specifically tracks

[v2 13/16] net/mlx5/hws: set default miss when replacing table

2024-05-06 Thread Itamar Gozlan
.@dpdk.org Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_table.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_table.c b/drivers/net/mlx5/hws/mlx5dr_table.c index 55b9b20150..ab73017ade 100644 --- a/d

[v2 16/16] net/mlx5/hws: fix action template only term param dump print

2024-05-06 Thread Itamar Gozlan
From: Hamdan Igbaria The debug print of only_term param in the action template was printed incorrectly. Fixes: 78580cf4e796 ("net/mlx5/hws: add debug layer") Cc: sta...@dpdk.org Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_debug.c | 2 +- 1 file changed

[v2 15/16] net/mlx5/hws: dump action ste arrays info

2024-05-06 Thread Itamar Gozlan
From: Hamdan Igbaria Dump action ste arrays info for resizing matchers. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_debug.c | 23 +++ drivers/net/mlx5/hws/mlx5dr_debug.h | 1 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 1 + drive

[v2 14/16] net/mlx5/hws: fix invalid memory access in decapl3

2024-05-06 Thread Itamar Gozlan
From: Alex Vesker In case decapL3 action is created we would access header data even in case the SHARED flag is not set, this would lead to an invalid memory access. Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern") Cc: sta...@dpdk.org Signed-off-by: Alex Vesker Acked-by: Matan Azrad

[v2 11/16] net/mlx5/hws: extending tag saving for match and jumbo

2024-05-06 Thread Itamar Gozlan
From: Erez Shitrit Save the exact tag when matching over jumbo masking. Fixes: 348cdeec6472 ("net/mlx5/hws: add FW WQE rule creation logic") Cc: sta...@dpdk.org Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 9 +++-- 1 file changed, 7 insertion

[v2 10/16] net/mlx5/hws: drop at attach number of actions

2024-05-06 Thread Itamar Gozlan
From: Alex Vesker Requesting the user for number of action resources is not defined well enough, instead the user should provide an initial action template which should contain the future attached action templates. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5

[v2 12/16] net/mlx5/hws: dw order optimization code enhancement

2024-05-06 Thread Itamar Gozlan
;) Cc: sta...@dpdk.org Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 39 ++- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c index

[v2 09/16] net/mlx5/hws: simplify code for updating CQ doorbell record

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Simplify the code that does CQ poll - have DB record update as part of CQ polling. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx

[v2 08/16] net/mlx5/hws: fix code analysis error in passing 0 enum val

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Instead of passing 0 as an enum parameter, define flag NONE. This resolves the following code analysis error: "enumerated type mixed with another type". This value is currently used in tests only, and will later be used in backward-compatible steering API. Fixes: 5cadd74f

[v2 07/16] net/mlx5/hws: fix error flow in mlx5dr context open

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Add missing spinlock destruction in error flow. Fixes: b0290e56dd08 ("net/mlx5/hws: add context object") Cc: sta...@dpdk.org Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_context.c | 1 + 1 file changed, 1 insertion(+) diff --

[v2 06/16] net/mlx5/hws: simplify send queues close code

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Small simplification to the send_queues_close code Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/n

[v2 05/16] net/mlx5/hws: negating rte errno on rule creation failure

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik mlx5dr_rule_create returns -ret, so internal functions should return rte_errno on failure. Fix return values of the function that creates rule in root table. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 2 +- 1 file ch

[v2 04/16] net/mlx5/hws: remove unused capabilities and fields

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik The following caps were never in use: - wire_regc - metadata_c - metadata_c_mask Also send ring's reg_addr field wasn't in use. Removing these caps and fields from structs and removing the code that queried them. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad

[v2 03/16] net/mlx5/hws: fix wrong comment in mlx5dr send

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Remove comment that documents parameter that doesn't exist. Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer") Cc: sta...@dpdk.org Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.h | 2 -- 1 file changed, 2 deletions(-) d

[v2 02/16] common/mlx5: fix error in mlx5 prm structs

2024-05-06 Thread Itamar Gozlan
From: Yevgeny Kliteynik Fix wrong reserved size and add helpful comment Fixes: 365cdf5f8ce7 ("net/mlx5/hws: add command layer") Cc: sta...@dpdk.org Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletio

[v2 01/16] net/mlx5/hws: move warn into debug level when needed

2024-05-06 Thread Itamar Gozlan
From: Erez Shitrit When the user tries to create a matcher and if failed with specific errno (E2BIG) the message will be in debug level and not in warning. It is a part of a feature when the user re-try to insert a new matching depends on that errno, no need the annoying message. Fixes: c55c2bf

[PATCH 13/13] net/mlx5/hws: fix port ID for root matcher and rule

2024-03-14 Thread Itamar Gozlan
From: Erez Shitrit In root tables matcher and rule need to have their port-id, otherwise the translate function that done in dpdk layer will not get the right attributes. For that whenever the matcher is matching the source-port we need to get the relevant port-id before calling the translate fun

[PATCH 12/13] net/mlx5/hws: extending tag saving for match and jumbo

2024-03-14 Thread Itamar Gozlan
From: Erez Shitrit Save the exact tag when matching over jumbo masking. Fixes: 348cdeec6472 ("net/mlx5/hws: add FW WQE rule creation logic") Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PATCH 10/13] net/mlx5/hws: fix rule is in resize check

2024-03-14 Thread Itamar Gozlan
From: Alex Vesker The check to detect if a rule is in resize was done incorrectly, this can lead to an incorrect function call upon completion for rules which are not in resize (move). Since the resize_info is in a union we cannot rely only on the pointer value but also need to make sure the matc

[PATCH 11/13] net/mlx5/hws: drop at attach number of actions

2024-03-14 Thread Itamar Gozlan
From: Alex Vesker Requesting the user for number of action resources is not defined well enough, instead the user should provide an initial action template which should contain the future attached action templates. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5

[PATCH 09/13] net/mlx5/hws: simplify code for updating CQ doorbell record

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Simplify the code that does CQ poll - have DB record update as part of CQ polling. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx

[PATCH 08/13] net/mlx5/hws: fix code analysis error in passing 0 enum val

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Instead of passing 0 as an enum parameter, define flag NONE. This resolves the following code analysis error: "enumerated type mixed with another type". This value is currently used in tests only, and will later be used in backward-compatible steering API. Fixes: 5cadd74f

[PATCH 06/13] net/mlx5/hws: simplify send_queues_close code

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Small simplification to the send_queues_close code Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/n

[PATCH 07/13] net/mlx5/hws: fix error flow in mlx5dr_context_open

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Add missing spinlock destruction in error flow. Fixes: b0290e56dd08 ("net/mlx5/hws: add context object") Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx

[PATCH 05/13] net/mlx5/hws: return -rte_errno on rule creation failure

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik mlx5dr_rule_create returns -ret, so internal functions should return rte_errno on failure. Fix return values of the function that creates rule in root table. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 2 +- 1 file ch

[PATCH 04/13] net/mlx5/hws: remove unused capabilities and fields

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik The following caps were never in use: - wire_regc - metadata_c - metadata_c_mask Also send ring's reg_addr field wasn't in use. Removing these caps and fields from structs and removing the code that queried them. Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad

[PATCH 03/13] net/mlx5/hws: fix wrong comment in mlx5dr_send

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Remove comment that documents parameter that doesn't exist. Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer") Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/

[PATCH 02/13] common/mlx5: fix error in mlx5 prm structs

2024-03-14 Thread Itamar Gozlan
From: Yevgeny Kliteynik Fix wrong reserved size and add helpful comment Fixes: 365cdf5f8ce ("net/mlx5/hws: add command layer") Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH 01/13] net/mlx5/hws: move warn into debug level when needed

2024-03-14 Thread Itamar Gozlan
From: Erez Shitrit When the user tries to create a matcher and if failed with specific errno (E2BIG) the message will be in debug level and not in warning. It is a part of a feature when the user re-try to insert a new matching depends on that errno, no need the annoying message. Fixes: c55c2bf

[v2 10/10] net/mlx5/hws: typo fix parm to param

2024-02-17 Thread Itamar Gozlan
Fixing a typo in mlx5dr_cmd.c file, changing a variable name from stc_parm to stc_param, as short for parameter. Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_cmd.c | 68 +++ 1 file changed, 34 insertions(+), 34 deletions

[v2 09/10] net/mlx5/hws: support push_esp flag for insert header action

2024-02-17 Thread Itamar Gozlan
From: Hamdan Igbaria support push_esp flag for insert header action, it must be set when inserting an ESP header, it's also sets the next_protocol field in the IPsec trailer. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 3 ++- drivers/net/mlx5

[v2 08/10] net/mlx5/hws: add missing actions STE limitation

2024-02-17 Thread Itamar Gozlan
From: Hamdan Igbaria Today if we pass a remove header action and after it an insert header action then our action template builder will set two different STE setters, because it won't allow insert header in same STE as remove header. But if we have the opposite order of insert header and then rem

[v2 05/10] net/mlx5/hws: check the rule status on rule update

2024-02-17 Thread Itamar Gozlan
From: Hamdan Igbaria Only allow rule updates for rules with their status value equal to MLX5DR_RULE_STATUS_CREATED. Otherwise, the rule may be in an unstable stage like deleting and this will result in a faulty unexpected scenario. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drive

[v2 07/10] net/mlx5/hws: extend action template creation API

2024-02-17 Thread Itamar Gozlan
From: Hamdan Igbaria Extend mlx5dr_action_template_create function params to include flags parameter. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr.h | 10 +- drivers/net/mlx5/hws/mlx5dr_action.c | 11 ++- drivers/net/mlx5/hws/mlx

[v2 03/10] net/mlx5/hws: add support for resizable matchers

2024-02-17 Thread Itamar Gozlan
From: Yevgeny Kliteynik Add support for matcher resize with the following new API calls: - mlx5dr_matcher_resize_set_target - mlx5dr_matcher_resize_rule_move The first function links two matchers and allows moving rules from src matcher to dst matcher. Both matchers should have the same charac

[v2 06/10] net/mlx5/hws: fix VLAN item handling on non relaxed mode

2024-02-17 Thread Itamar Gozlan
From: Hamdan Igbaria If a VLAN item was passed with null mask, the item handler would return immediately and thus won't set default values for non relax mode. Also change the non relax default set to single-tagged (CVLAN). Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer") Signed-off-by: Ha

[v2 04/10] net/mlx5/hws: reordering the STE fields to improve hash

2024-02-17 Thread Itamar Gozlan
inputs. By using precomputed optimal DW locations, we can change the STE order for a limited set of the most common values to reduce the number of hash collisions and improve latency. Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 64

[v2 01/10] net/mlx5/hws: skip RTE item when inserting rules by index

2024-02-17 Thread Itamar Gozlan
The location of indexed rules is determined by the index, not the item hash. A matcher test is added to prevent access to non-existent items. This avoids unnecessary processing and potential segmentation faults. Fixes: 405242c ("net/mlx5/hws: add rule object") Signed-off-by: Itamar Goz

[v2 02/10] net/mlx5/hws: add check for not supported fields in VXLAN

2024-02-17 Thread Itamar Gozlan
From: Erez Shitrit Don't allow the user to mask over rsvd1 / rsvd2 fields which are not supported. Fixes: dbff89ef806f ("net/mlx5/hws: fix tunnel protocol checks") Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 7 +++ 1 file changed, 7 insert

[PATCH 9/9] net/mlx5/hws: support push_esp flag for insert header action

2024-02-13 Thread Itamar Gozlan
From: Hamdan Igbaria support push_esp flag for insert header action, it must be set when inserting an ESP header, it's also sets the next_protocol field in the IPsec trailer. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 3 ++- drivers/net/mlx5

[PATCH 8/9] net/mlx5/hws: add missing actions STE limitation

2024-02-13 Thread Itamar Gozlan
From: Hamdan Igbaria Today if we pass a remove header action and after it an insert header action then our action template builder will set two different STE setters, because it won't allow insert header in same STE as remove header. But if we have the opposite order of insert header and then rem

[PATCH 7/9] net/mlx5/hws: extend action template creation API

2024-02-13 Thread Itamar Gozlan
From: Hamdan Igbaria Extend mlx5dr_action_template_create function params to include flags parameter. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr.h | 10 +- drivers/net/mlx5/hws/mlx5dr_action.c | 11 ++- drivers/net/mlx5/hws/mlx

[PATCH 6/9] net/mlx5/hws: fix VLAN item handling on non relaxed mode

2024-02-13 Thread Itamar Gozlan
From: Hamdan Igbaria If a VLAN item was passed with null mask, the item handler would return immediately and thus won't set default values for non relax mode. Also change the non relax default set to single-tagged (CVLAN). Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer") Signed-off-by: Ha

[PATCH 5/9] net/mlx5/hws: check the rule status on rule update

2024-02-13 Thread Itamar Gozlan
From: Hamdan Igbaria Only allow rule updates for rules with their status value equal to MLX5DR_RULE_STATUS_CREATED. Otherwise, the rule may be in an unstable stage like deleting and this will result in a faulty unexpected scenario. Signed-off-by: Hamdan Igbaria Acked-by: Matan Azrad --- drive

[PATCH 4/9] net/mlx5/hws: reordering the STE fields to improve hash

2024-02-13 Thread Itamar Gozlan
inputs. By using precomputed optimal DW locations, we can change the STE order for a limited set of the most common values to reduce the number of hash collisions and improve latency. Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 64

[PATCH 3/9] net/mlx5/hws: add support for resizable matchers

2024-02-13 Thread Itamar Gozlan
From: Yevgeny Kliteynik Add support for matcher resize with the following new API calls: - mlx5dr_matcher_resize_set_target - mlx5dr_matcher_resize_rule_move The first function links two matchers and allows moving rules from src matcher to dst matcher. Both matchers should have the same charac

[PATCH 2/9] net/mlx5/hws: add check for not supported fields in VXLAN

2024-02-13 Thread Itamar Gozlan
Don't allow the user to mask over rsvd1 / rsvd2 fields which are not supported. Fixes: dbff89ef806f ("net/mlx5/hws: fix tunnel protocol checks") Signed-off-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_definer.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a

[PATCH 1/9] net/mlx5/hws: skip RTE item when inserting rules by index

2024-02-13 Thread Itamar Gozlan
The location of indexed rules is determined by the index, not the item hash. A matcher test is added to prevent access to non-existent items. This avoids unnecessary processing and potential segmentation faults. Fixes: 405242c ("net/mlx5/hws: add rule object") Signed-off-by: Itamar Goz

[PATCH 4/5] net/mlx5/hws: supporting default miss table in HWS

2023-09-18 Thread Itamar Gozlan
target table. Issue: 3441251 Signed-off-by: Itamar Gozlan --- drivers/common/mlx5/mlx5_prm.h| 5 +- drivers/net/mlx5/hws/mlx5dr.h | 12 ++ drivers/net/mlx5/hws/mlx5dr_cmd.c | 7 +- drivers/net/mlx5/hws/mlx5dr_cmd.h | 1 + drivers/net/mlx5/hws/mlx5dr_debug.c | 5

[PATCH 5/5] net/mlx5/hws: fix field copy bind

2023-09-18 Thread Itamar Gozlan
From: Alex Vesker Fix an issue with binding for unused DW selectors, these selectors are set to zero but zero is also a valid value used for DMAC_47_16. Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer") Reviewed-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr

[PATCH 1/5] net/mlx5/hws: add support for matching on bth_a bit

2023-09-18 Thread Itamar Gozlan
RTE_FLOW_ITEM_TYPE_IB_BTH matches an InfiniBand base transport header. We extend the match on the acknowledgment bit (BTH_A). Signed-off-by: Itamar Gozlan --- drivers/net/mlx5/hws/mlx5dr_definer.c | 12 ++-- drivers/net/mlx5/hws/mlx5dr_definer.h | 1 + 2 files changed, 11 insertions

[PATCH 3/5] net/mlx5/hws: supporting add_field action

2023-09-18 Thread Itamar Gozlan
Supporting a new modify action: ADD_FIELD. The new action allows the summing of the packet source field and destination field/meta-data. The result is stored in the destination field. This new action is supported only on capable devices. Signed-off-by: Itamar Gozlan --- drivers/common/mlx5

[PATCH 2/5] net/mlx5/hws: support additional 4 C registers

2023-09-18 Thread Itamar Gozlan
New connectX devices have 4 additional registers which can be used by the application. This support will allow matching on these new registers. Signed-off-by: Itamar Gozlan --- drivers/common/mlx5/mlx5_prm.h| 4 drivers/net/mlx5/hws/mlx5dr_definer.c | 16 drivers

[v3 5/5] net/mlx5/hws: support default miss action on FDB

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker Add the support for default miss on HWS FDB, this implementation was missing until now. Default miss can be used for more efficient miss flow instead of going to an empty matcher or some defecated empty table. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/

[v3 4/5] net/mlx5/hws: renaming FT to TBL

2023-07-04 Thread Itamar Gozlan
An action naming change is made to describe the action better and avoid implicit meaning. Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr.h| 2 +- drivers/net/mlx5/hws/mlx5dr_action.c | 16 drivers/net/mlx5/hws/mlx5dr_debug.c | 2

[v3 3/5] net/mlx5/hws: remove duplicated reformat type

2023-07-04 Thread Itamar Gozlan
From: Shun Hao Currently there are two enum definitions for reformat type: mlx5dr_action_reformat_type and mlx5dr_action_type. They are actually the same. This patch remove the unnecessary mlx5dr_action_reformat_type so use only one definition for reformat type. Signed-off-by: Shun Hao Acked-by

[v3 2/5] net/mlx5/hws: allow destroying rule resources on error

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker In case the send engine is in error state API should provide a way to free rule resources and provide a fake completion. Otherwise there is no way to release these resources. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 10 +--

[v3 1/5] net/mlx5/hws: remove unneeded new line for DR_LOG

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker In some places an extra new line was added, remove to have clean prints. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- v1 -> v3 (1) amending a wrong subject prefix send (v1 instead of v3). (2) typo fix (uneeded -> unneeded) v2->v3 1. Right patches instead of wrong patc

[v1 5/5] net/mlx5/hws: support default miss action on FDB

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker Add the support for default miss on HWS FDB, this implementation was missing until now. Default miss can be used for more efficient miss flow instead of going to an empty matcher or some defecated empty table. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/

[v1 4/5] net/mlx5/hws: renaming FT to TBL

2023-07-04 Thread Itamar Gozlan
An action naming change is made to describe the action better and avoid implicit meaning. Signed-off-by: Itamar Gozlan Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr.h| 2 +- drivers/net/mlx5/hws/mlx5dr_action.c | 16 drivers/net/mlx5/hws/mlx5dr_debug.c | 2

[v1 3/5] net/mlx5/hws: remove duplicated reformat type

2023-07-04 Thread Itamar Gozlan
From: Shun Hao Currently there are two enum definitions for reformat type: mlx5dr_action_reformat_type and mlx5dr_action_type. They are actually the same. This patch remove the unnecessary mlx5dr_action_reformat_type so use only one definition for reformat type. Signed-off-by: Shun Hao Acked-by

[v1 2/5] net/mlx5/hws: allow destroying rule resources on error

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker In case the send engine is in error state API should provide a way to free rule resources and provide a fake completion. Otherwise there is no way to release these resources. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_rule.c | 10 +--

[v1 1/5] net/mlx5/hws: remove uneeded new line for DR_LOG

2023-07-04 Thread Itamar Gozlan
From: Alex Vesker In some places an extra new line was added, remove to have clean prints. Signed-off-by: Alex Vesker Acked-by: Matan Azrad --- v2->v3 1. Right patches instead of wrong patches in the previous series v1->v2 1. Last patch in the series (net/mlx5/hws: support default miss action

[v2 5/5] net/mlx5/hws: support default miss action on FDB

2023-07-03 Thread Itamar Gozlan
From: Alex Vesker Add the support for default miss on HWS FDB, this implementation was missing until now. Default miss can be used for more efficient miss flow instead of going to an empty matcher or some defecated empty table. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_action.

[v2 4/5] net/mlx5: support symmetric RSS hash function

2023-07-03 Thread Itamar Gozlan
From: Xueming Li This patch supports symmetric hash function that creating same hash result for bi-direction traffic which having reverse source and destination IP and L4 port. Since the hash algorithom is different than spec(XOR), leave a warning in validation. Signed-off-by: Xueming Li ---

[v2 3/5] net/mlx5: add indirect encap decap support

2023-07-03 Thread Itamar Gozlan
From: Rongwei Liu Support the raw_encap/decap combinations in the indirect action list, and translates to 4 types of underlayer tunnel operations: 1. Layer 2 encapsulation like VxLAN. 2. Layer 2 decapsulation like VxLAN. 3. Layer 3 encapsulation like GRE. 4. Layer 3 decapsulation like GRE. Each

[v2 2/5] app/testpmd: support indirect actions list syntax

2023-07-03 Thread Itamar Gozlan
From: Gregory Etelson Syntax: actions .. indirect_list handle H conf C .. H references shared action resources related to that handle. C references configuration array: if H was created from a list of actions A1 / A2 / ... / END, C[i] points to a flow configuration update of A[i]. Signed-off-by

[v2 1/5] net/mlx5: support indirect list METER_MARK action

2023-07-03 Thread Itamar Gozlan
From: Gregory Etelson Signed-off-by: Gregory Etelson --- drivers/net/mlx5/mlx5_flow.c| 69 +- drivers/net/mlx5/mlx5_flow.h| 67 - drivers/net/mlx5/mlx5_flow_hw.c | 419 +++- 3 files changed, 476 insertions(+), 79 deletions(-) diff --git a/drivers/n

[PATCH 5/5] net/mlx5/hws: support default miss action on FDB

2023-06-29 Thread Itamar Gozlan
From: Alex Vesker Add the support for default miss on HWS FDB, this implementation was missing until now. Default miss can be used for more efficient miss flow instead of going to an empty matcher or some defecated empty table. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_table.c

[PATCH 4/5] net/mlx5/hws: renaming FT to TBL

2023-06-29 Thread Itamar Gozlan
An action naming change is made to describe the action better and avoid implicit meaning. Signed-off-by: Itamar Gozlan --- drivers/net/mlx5/hws/mlx5dr.h| 2 +- drivers/net/mlx5/hws/mlx5dr_action.c | 16 drivers/net/mlx5/hws/mlx5dr_debug.c | 2 +- drivers/net/mlx5

[PATCH 3/5] net/mlx5/hws: remove duplicated reformat type

2023-06-29 Thread Itamar Gozlan
From: Shun Hao Currently there are two enum definitions for reformat type: mlx5dr_action_reformat_type and mlx5dr_action_type. They are actually the same. This patch remove the unnecessary mlx5dr_action_reformat_type so use only one definition for reformat type. Signed-off-by: Shun Hao --- dri

[PATCH 2/5] net/mlx5/hws: allow destroying rule resources on error

2023-06-29 Thread Itamar Gozlan
From: Alex Vesker In case the send engine is in error state API should provide a way to free rule resources and provide a fake completion. Otherwise there is no way to release these resources. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 10 +- 1 file changed, 5

[PATCH 1/5] net/mlx5/hws: remove uneeded new line for DR_LOG

2023-06-29 Thread Itamar Gozlan
From: Alex Vesker In some places an extra new line was added, remove to have clean prints. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_action.c | 30 +-- drivers/net/mlx5/hws/mlx5dr_cmd.c | 2 +- drivers/net/mlx5/hws/mlx5dr_definer.c | 4 ++-- driv