[PATCH] net/mlx5/hws: add support for multi pattern

2023-07-09 Thread Alex Vesker
When creating an action it can contain a bulk of objects, but the objects are fixed to a specific pattern and cannot be reused. This can lead to inefficient usage of the HW resources, This support allows creating multiple patterns over a single mlx5dr action. Signed-off-by: Alex Vesker Reviewed

RE: [PATCH v3 3/3] net/mlx5/hws: add support for infiniband BTH match

2023-05-29 Thread Alex Vesker
> + MLX5DR_DEFINER_FNAME_IB_L4_QPN, > MLX5DR_DEFINER_FNAME_MAX, > }; > > diff --git a/drivers/net/mlx5/mlx5_flow_hw.c > b/drivers/net/mlx5/mlx5_flow_hw.c index 853c94af9c..f9e7f844ea 100644 > --- a/drivers/net/mlx5/mlx5_flow_hw.c > +++ b/drivers/net/mlx5/mlx5_flow_hw.c > @@ -4969,6 +4969,7 @@ flow_hw_pattern_validate(struct rte_eth_dev > *dev, > case RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT: > case RTE_FLOW_ITEM_TYPE_ESP: > case RTE_FLOW_ITEM_TYPE_FLEX: > + case RTE_FLOW_ITEM_TYPE_IB_BTH: > break; > case RTE_FLOW_ITEM_TYPE_INTEGRITY: > /* > -- > 2.27.0 Acked-by: Alex Vesker

[PATCH] net/mlx5/hws: fix IPv4 frag matching

2023-03-23 Thread Alex Vesker
fragment_offset based on spec and last same as any other field. Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer") Cc: sta...@dpdk.org Signed-off-by: Hamdan Igbaria Reviewed-by: Alex Vesker Acked-by: Matan Azrad ma...@nvidia.com --- drivers/net/mlx5/hws/mlx5dr_defi

[PATCH] net/mlx5/hws: fix send sync drain empty queue check

2023-03-23 Thread Alex Vesker
nous drain") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad ma...@nvidia.com --- drivers/net/mlx5/hws/mlx5dr_send.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h i

[PATCH] net/mlx5/hws: fix return value of send queue action

2023-03-23 Thread Alex Vesker
The rte_errno should be set to a positive error value while the ret of the function should return a negative value this aligns code to other mlx5dr API functions. Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer") Cc: sta...@dpdk.org Signed-off-by: Alex Vesker Reviewed-by: Erez Shit

RE: [PATCH v3 3/3] net/mlx5/hws: add ICMPv6 ID and sequence match support

2023-02-07 Thread Alex Vesker
mp6(&cd, items, i); > item_flags |= MLX5_FLOW_LAYER_ICMP6; > break; > + case RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REQUEST: > + case RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REPLY: > + ret = mlx5dr_definer_conv_item_icmp6_echo(&cd, > items, i); > + item_flags |= MLX5_FLOW_LAYER_ICMP6; > + break; > case RTE_FLOW_ITEM_TYPE_METER_COLOR: > ret = mlx5dr_definer_conv_item_meter_color(&cd, > items, i); > item_flags |= MLX5_FLOW_ITEM_METER_COLOR; > -- > 2.27.0 Acked-by: Alex Vesker

[v2 16/16] net/mlx5/hws: cache definer for reuse

2023-01-31 Thread Alex Vesker
Definers are a limited resource in the system per GVMI, to avoid failure we try to improve bt checking if it is possible to reuse the definers in some cases. Added a cache on the context for this purpose. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_context.c | 12 ++- drivers

[v2 15/16] net/mlx5/hws: rename pattern cache object

2023-01-31 Thread Alex Vesker
To have the same name convention for future caches, use cache and cache item naming. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 22 +++--- drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff

[v2 14/16] net/mlx5/hws: add debug dump support for range and hash

2023-01-31 Thread Alex Vesker
Add support for dumping range and hash definers objects. Hash definer is a per matcher object describing the fields used for hashing. Range definer is per match template object describing the fields used for range matching. Both are optional based on the given match templates. Signed-off-by: Alex

[v2 13/16] net/mlx5/hws: add FW WQE rule creation logic

2023-01-31 Thread Alex Vesker
FW WQE and HW WQE are done in a similar way but not to jeopardize the performance rule creation is done over the new FW rule creation function. The deletion function is shared between both flows. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 180

[v2 12/16] net/mlx5/hws: add range definer creation support

2023-01-31 Thread Alex Vesker
W GTA WQE command. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_definer.c | 255 +++--- drivers/net/mlx5/hws/mlx5dr_definer.h | 16 +- drivers/net/mlx5/hws/mlx5dr_matcher.c | 27 ++- drivers/net/mlx5/hws/mlx5dr_matcher.h | 17 +- 4 files changed, 281 inser

[v2 11/16] net/mlx5/hws: support partial hash

2023-01-31 Thread Alex Vesker
definers bitmasks intersection. Since current HW GTA implementation doesn't allow specifying match and hash definers rule insertion is done using the FW GTA WQE command. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 4 + drivers/net/mlx5/hws/mlx5dr_definer.c

[v2 09/16] net/mlx5/hws: support range match

2023-01-31 Thread Alex Vesker
matching will be done over these fields. There are two field setter, field copy (fc) and field copy range (fcr). Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_definer.c | 73 +-- drivers/net/mlx5/hws/mlx5dr_definer.h | 5 +- 2 files changed, 72 inserti

[v2 10/16] net/mlx5/hws: redesign definer create

2023-01-31 Thread Alex Vesker
sharing the hl over multiple definers. First calculate the shared hl than create definers based on the definer shared layout. Once all definers use the same layout it is possible to hash over the shared fields since the location is the same across all of the definers. Signed-off-by: Alex Vesker

[v2 08/16] net/mlx5/hws: move matcher size check to function

2023-01-31 Thread Alex Vesker
This check can be later on reused for other places, it will look better in a function Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 43 +-- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b

[v2 07/16] net/mlx5/hws: add send FW range STE WQE

2023-01-31 Thread Alex Vesker
range data1. FW manages STEs/ICM and coherency between deletion and creation. It is possible to also pass the definer value as part of the STE, this is not supported with current HW. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_send.c | 19 +++ drivers/net/mlx5/hws

[v2 06/16] net/mlx5/hws: add send FW match STE using gen WQE

2023-01-31 Thread Alex Vesker
: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_send.c | 134 + drivers/net/mlx5/hws/mlx5dr_send.h | 7 +- 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index a507e5f626..a9958df4f2

[v2 05/16] net/mlx5/hws: align RTC create command with PRM format

2023-01-31 Thread Alex Vesker
Rename rtc params create for new format. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 16 ++-- drivers/net/mlx5/hws/mlx5dr_cmd.c | 13 +++-- drivers/net/mlx5/hws/mlx5dr_cmd.h | 11 +++ drivers/net/mlx5/hws/mlx5dr_matcher.c | 19

[v2 04/16] net/mlx5/hws: add capability query for gen wqe command

2023-01-31 Thread Alex Vesker
Read the capabilities required to determine support for GENERATE_WQE. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 6 -- drivers/net/mlx5/hws/mlx5dr_cmd.c | 12 drivers/net/mlx5/hws/mlx5dr_cmd.h | 3 +++ 3 files changed, 19 insertions(+), 2 deletions

[v2 03/16] net/mlx5/hws: support GTA WQE write using FW command

2023-01-31 Thread Alex Vesker
The generate WQE command is used as an interface to writing GTA WQEs with fields that are not supported in current HW, for example extended match definer. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 27 +- drivers/net/mlx5/hws/mlx5dr_cmd.c | 47

[v2 01/16] net/mlx5/hws: support synchronous drain

2023-01-31 Thread Alex Vesker
the FW command which requires synchronization. This also fixes an issue with shared arguments send that require more than one WQE. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr.h | 6 -- drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 27

[v2 00/16] net/mlx5/hws: support range and partial hash matching

2023-01-31 Thread Alex Vesker
checkpatch comments Alex Vesker (16): net/mlx5/hws: support synchronous drain net/mlx5/hws: matcher remove AT and MT limitation net/mlx5/hws: support GTA WQE write using FW command net/mlx5/hws: add capability query for gen wqe command net/mlx5/hws: align RTC create command with PRM format

[v2 02/16] net/mlx5/hws: matcher remove AT and MT limitation

2023-01-31 Thread Alex Vesker
fixed Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_debug.c | 4 +- drivers/net/mlx5/hws/mlx5dr_matcher.c | 109 -- drivers/net/mlx5/hws/mlx5dr_matcher.h | 8 +- drivers/net/mlx5/hws/mlx5dr_rule.c| 15 ++-- 4 files changed, 78 insertions(+), 58

[v1 01/16] net/mlx5/hws: support synchronous drain

2023-01-31 Thread Alex Vesker
the FW command which requires synchronization. This also fixes an issue with shared arguments send that require more than one WQE. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr.h | 6 -- drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 27

[v1 05/16] net/mlx5/hws: align RTC create command with PRM format

2023-01-31 Thread Alex Vesker
Rename rtc params create for new format. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 16 ++-- drivers/net/mlx5/hws/mlx5dr_cmd.c | 13 +++-- drivers/net/mlx5/hws/mlx5dr_cmd.h | 11 +++ drivers/net/mlx5/hws/mlx5dr_matcher.c | 19

[v1 04/16] net/mlx5/hws: add capability query for gen wqe command

2023-01-31 Thread Alex Vesker
Read the capabilities required to determine support for GENERATE_WQE. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 6 -- drivers/net/mlx5/hws/mlx5dr_cmd.c | 12 drivers/net/mlx5/hws/mlx5dr_cmd.h | 3 +++ 3 files changed, 19 insertions(+), 2 deletions

[v1 15/16] net/mlx5/hws: rename pattern cache object

2023-01-31 Thread Alex Vesker
To have the same name convention for future caches, use cache and cache item naming. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_pat_arg.c | 22 +++--- drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff

[v1 13/16] net/mlx5/hws: add FW WQE rule creation logic

2023-01-31 Thread Alex Vesker
FW WQE and HW WQE are done in a similar way but not to jeopardize the performance rule creation is done over the new FW rule creation function. The deletion function is shared between both flows. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 180

[v1 12/16] net/mlx5/hws: add range definer creation support

2023-01-31 Thread Alex Vesker
W GTA WQE command. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_definer.c | 255 +++--- drivers/net/mlx5/hws/mlx5dr_definer.h | 16 +- drivers/net/mlx5/hws/mlx5dr_matcher.c | 27 ++- drivers/net/mlx5/hws/mlx5dr_matcher.h | 17 +- 4 files changed, 281 inser

[v1 09/16] net/mlx5/hws: support range match

2023-01-31 Thread Alex Vesker
matching will be done over these fields. There are two field setter, field copy (fc) and field copy range (fcr). Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_definer.c | 73 +-- drivers/net/mlx5/hws/mlx5dr_definer.h | 5 +- 2 files changed, 72 inserti

[v1 16/16] net/mlx5/hws: cache definer for reuse

2023-01-31 Thread Alex Vesker
Definers are a limited resource in the system per GVMI, to avoid failure we try to improve bt checking if it is possible to reuse the definers in some cases. Added a cache on the context for this purpose. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_context.c | 12 ++- drivers

[v1 11/16] net/mlx5/hws: support partial hash

2023-01-31 Thread Alex Vesker
definers bitmasks intersection. Since current HW GTA implementation doesn't allow specifying match and hash definers rule insertion is done using the FW GTA WQE command. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 4 + drivers/net/mlx5/hws/mlx5dr_definer.c

[v1 14/16] net/mlx5/hws: add debug dump support for range and hash

2023-01-31 Thread Alex Vesker
Add support for dumping range and hash definers objects. Hash definer is a per matcher object describing the fields used for hashing. Range definer is per match template object describing the fields used for range matching. Both are optional based on the given match templates. Signed-off-by: Alex

[v1 08/16] net/mlx5/hws: move matcher size check to function

2023-01-31 Thread Alex Vesker
This check can be later on reused for other places, it will look better in a function Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_matcher.c | 43 +-- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b

[v1 10/16] net/mlx5/hws: redesign definer create

2023-01-31 Thread Alex Vesker
sharing the hl over multiple definers. First calculate the shared hl than create definers based on the definer shared layout. Once all definers use the same layout it is possible to hash over the shared fields since the location is the same across all of the definers. Signed-off-by: Alex Vesker

[v1 03/16] net/mlx5/hws: support GTA WQE write using FW command

2023-01-31 Thread Alex Vesker
The generate WQE command is used as an interface to writing GTA WQEs with fields that are not supported in current HW, for example extended match definer. Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 27 +- drivers/net/mlx5/hws/mlx5dr_cmd.c | 47

[v1 07/16] net/mlx5/hws: add send FW range STE WQE

2023-01-31 Thread Alex Vesker
range data1. FW manages STEs/ICM and coherency between deletion and creation. It is possible to also pass the definer value as part of the STE, this is not supported with current HW. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_send.c | 19 +++ drivers/net/mlx5/hws

[v1 02/16] net/mlx5/hws: matcher remove AT and MT limitation

2023-01-31 Thread Alex Vesker
fixed Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_debug.c | 4 +- drivers/net/mlx5/hws/mlx5dr_matcher.c | 109 -- drivers/net/mlx5/hws/mlx5dr_matcher.h | 8 +- drivers/net/mlx5/hws/mlx5dr_rule.c| 15 ++-- 4 files changed, 78 insertions(+), 58

[v1 06/16] net/mlx5/hws: add send FW match STE using gen WQE

2023-01-31 Thread Alex Vesker
: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_send.c | 134 + drivers/net/mlx5/hws/mlx5dr_send.h | 7 +- 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index a507e5f626..a9958df4f2

[v1 00/16] net/mlx5/hws: support range and partial hash matching

2023-01-31 Thread Alex Vesker
fields to split the hash and match in a way the HW can support. This increases the match templates combinations possible although it may limit the maximum PPS. Since (1) and (2) are not fully support on current HW the implementation is done on top of a HW like FW API using WQEs. Alex Vesker (16

[PATCH] net/mlx5/hws: fix memory leak on general pool db init

2023-01-11 Thread Alex Vesker
On elemend db init we allocated the element_manager which was unused and not freed. Fixes: b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- drivers/net/mlx5/hws/mlx5dr_pool.c | 7 --- 1 file changed, 7 deletions(-) di

[PATCH v2] net/mlx5: add debug support for dumping all rte ports

2022-12-21 Thread Alex Vesker
Add a special value max_uint16 to request dump of all rte ethernet ports. This is useful for collecting the full info from all the ports in a single dump. Signed-off-by: Alex Vesker Reviewed-by: Ori Kam --- drivers/net/mlx5/linux/mlx5_socket.c | 39 ++-- 1 file changed

[PATCH] net/mlx5: add debug support for dumping all rte ports

2022-12-13 Thread Alex Vesker
Add a special value max_uint16 to request dump of all rte ethernet ports. This is useful for collecting the full info from all the ports in a single dump. Signed-off-by: Alex Vesker Reviewed-by: Ori Kam --- drivers/net/mlx5/linux/mlx5_socket.c | 39 ++-- 1 file changed

[PATCH] net/mlx5/hws: fix incorrect dw_8_6_ext PRM offset

2022-12-08 Thread Alex Vesker
The offset of format_select_dw_8_6_ext was incorrect. Update the reserved offsets to correct value. Fixes: 365cdf5f8ce7 ("net/mlx5/hws: add command layer") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- drivers/common/mlx5/mlx5_prm.h | 7 --- 1 file changed, 4 insert

[PATCH v2] net/mlx5/hws: fix capability check to allow HWS on non esw-mngr

2022-11-07 Thread Alex Vesker
-manager. Fixes: b0290e5 ("net/mlx5/hws: add context object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_co

[PATCH v2] net/mlx5/hws: fix action creation check for HWS support

2022-11-07 Thread Alex Vesker
Fix segmentation fault when a user will request to allocate a HWS action while current device doesn't support HWS. Fixes: f8c8a6d ("net/mlx5/hws: add action object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5

[PATCH v2] net/mlx5/hws: fix possible action setter segmenation fault

2022-11-07 Thread Alex Vesker
: add action object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h index

[PATCH] net/mlx5/hws: fix possible negative return on sq create

2022-11-07 Thread Alex Vesker
The sysconf call can return a negative value (-1) on failure this will lead to posix_memalign to fail. This is not a realistic case which was found by the static checkers. Coverity issue: 381674 Fixes: 3eb7488 ("net/mlx5/hws: add send layer") Signed-off-by: Alex Vesker Reviewed-by: Er

[PATCH] net/mlx5/hws: fix possible action setter segmenation fault

2022-11-07 Thread Alex Vesker
: add action object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h index

[PATCH 4/4] net/mlx5/hws: fix possible negative return on sq create

2022-11-07 Thread Alex Vesker
The sysconf call can return a negative value (-1) on failure this will lead to posix_memalign to fail. This is not a realistic case which was found by the static checkers. Coverity issue: 381674 Fixes: 3eb7488 ("net/mlx5/hws: add send layer") Signed-off-by: Alex Vesker Reviewed-by: Er

RE: [PATCH] net/mlx5/hws: fix possible negative return on sq create

2022-11-03 Thread Alex Vesker
Also forgot to add to commit message: Coverity issue: 381674 > -Original Message- > From: Alex Vesker > Sent: Thursday, November 3, 2022 2:52 PM > To: Alex Vesker ; Slava Ovsiienko > ; NBU-Contact-Thomas Monjalon (EXTERNAL) > ; Suanming Mou ; > Matan Azrad > C

[PATCH] net/mlx5/hws: fix possible negative return on sq create

2022-11-03 Thread Alex Vesker
The sysconf call can return a negative value (-1) on failure this will lead to posix_memalign to fail. This is not a realistic case which was found by the static checkers. Fixes: 3eb7488 ("net/mlx5/hws: add send layer") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- driver

[PATCH] net/mlx5/hws: fix possible action setter segmenation fault

2022-11-03 Thread Alex Vesker
: add action object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- drivers/net/mlx5/hws/mlx5dr_action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.h b/drivers/net/mlx5/hws/mlx5dr_action.h index f14d91f994..808f44a740 10

[PATCH] net/mlx5/hws: check action creation for HWS support

2022-11-03 Thread Alex Vesker
Fix segmentation fault when user will request to allocate a HWS action while current device doesn't support HWS. Fixes: f8c8a6d ("net/mlx5/hws: add action object") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- drivers/net/mlx5/hws/mlx5dr_action.c | 7 +++ 1

[PATCH] net/mlx5/hws: allow HWS support on non esw-manager devices

2022-11-03 Thread Alex Vesker
bject") Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit --- drivers/net/mlx5/hws/mlx5dr_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_context.c b/drivers/net/mlx5/hws/mlx5dr_context.c index ae86694a51..76ada7bb7f 100644 --- a/d

[PATCH] net/mlx5/hws: remove deprecated rte_atomic

2022-10-30 Thread Alex Vesker
The use of rte_atomic functions is deprecated and is not required in HWS code. HWS refcounts are used only during control and always under lock. Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object") Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_action.c | 8 +++- d

RE: [PATCH v3 2/2] common/mlx5: move build config initialization and check

2022-10-30 Thread Alex Vesker
> -Original Message- > From: Thomas Monjalon > Sent: Sunday, October 30, 2022 1:08 PM > To: dev@dpdk.org > Cc: Alex Vesker ; ferruh.yi...@amd.com; > andrew.rybche...@oktetlabs.ru; Raslan Darawsheh ; > david.march...@redhat.com; Matan Azrad ; Slava > Ovsiienko

RE: [PATCH v3 1/2] common/mlx5: fix build disabling

2022-10-30 Thread Alex Vesker
> -Original Message- > From: Thomas Monjalon > Sent: Sunday, October 30, 2022 1:08 PM > To: dev@dpdk.org > Cc: Alex Vesker ; ferruh.yi...@amd.com; > andrew.rybche...@oktetlabs.ru; Raslan Darawsheh ; > david.march...@redhat.com; Matan Azrad ; Fan > Zhang

[v6 18/18] net/mlx5/hws: Enable HWS

2022-10-20 Thread Alex Vesker
Replace stub implenation of HWS with mlx5dr code. Signed-off-by: Alex Vesker --- doc/guides/nics/mlx5.rst | 5 +- doc/guides/rel_notes/release_22_11.rst | 4 + drivers/common/mlx5/linux/meson.build| 9 +- drivers/net/mlx5/hws/meson.build | 18

[v6 17/18] net/mlx5/hws: Add HWS debug layer

2022-10-20 Thread Alex Vesker
From: Hamdan Igbaria The debug layer is used to generate a debug CSV file containing details of the context, table, matcher, rules and other useful debug information. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_debug.c | 462

[v6 15/18] net/mlx5/hws: Add HWS rule object

2022-10-20 Thread Alex Vesker
configured to the HW. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 528 + drivers/net/mlx5/hws/mlx5dr_rule.h | 50 +++ 2 files changed, 578 insertions(+) create mode 100644 drivers/net/mlx5/hws/mlx5dr_rule.c create

[v6 16/18] net/mlx5/hws: Add HWS action object

2022-10-20 Thread Alex Vesker
From: Erez Shitrit Action objects are used for executing different HW actions over packets. Each action contains the HW resources and parameters needed for action use over the HW when creating a rule. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws

[v6 14/18] net/mlx5/hws: Add HWS matcher object

2022-10-20 Thread Alex Vesker
the matcher and from there to other objects. The matcher allows efficent HW packet field matching and action execution based on the configuration done to it. Signed-off-by: Alex Vesker Signed-off-by: Erez Shitrit --- drivers/common/mlx5/linux/meson.build | 2 + drivers/net/mlx5/hws

[v6 13/18] net/mlx5/hws: Add HWS table object

2022-10-20 Thread Alex Vesker
Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_table.c | 248 drivers/net/mlx5/hws/mlx5dr_table.h | 44 + 2 files changed, 292 insertions(+) create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.h

[v6 11/18] net/mlx5/hws: Add HWS definer layer

2022-10-20 Thread Alex Vesker
the field copy (fc) array used for efficient items to WQE conversion. Signed-off-by: Mark Bloch Signed-off-by: Alex Vesker --- doc/guides/nics/features/default.ini |1 + doc/guides/nics/features/mlx5.ini |1 + drivers/net/mlx5/hws/mlx5dr_definer.c | 1968

[v6 12/18] net/mlx5/hws: Add HWS context object

2022-10-20 Thread Alex Vesker
Context is the first mlx5dr object created, all sub object: table, matcher, rule, action are created using the context. The context holds the capabilities and send queues used for configuring the offloads to the HW. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_context.c | 223

[v6 08/18] net/mlx5/hws: Add HWS command layer

2022-10-20 Thread Alex Vesker
From: Erez Shitrit The command layer is used to communicate with the FW, query capabilities and allocate FW resources needed for HWS. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 607 ++- drivers/net/mlx5/hws/mlx5dr_cmd.c

[v6 10/18] net/mlx5/hws: Add HWS send layer

2022-10-20 Thread Alex Vesker
HWS configures flows to the HW using a QP, each WQE has the details of the flow we want to offload. The send layer allocates the resources needed to send the request to the HW as well as managing the queues, getting completions and handling failures. Signed-off-by: Mark Bloch Signed-off-by: Alex

[v6 07/18] net/mlx5: Add additional glue functions for HWS

2022-10-20 Thread Alex Vesker
Add missing glue support for HWS mlx5dr layer. The new glue functions are needed for mlx5dv create matcher and action, which are used as the kernel root table as well as for capabilities query like device name and ports info. Signed-off-by: Alex Vesker --- drivers/common/mlx5/linux/mlx5_glue.c

[v6 09/18] net/mlx5/hws: Add HWS pool and buddy

2022-10-20 Thread Alex Vesker
From: Erez Shitrit HWS needs to manage different types of device memory in an efficient and quick way. For this, memory pools are being used. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_buddy.c | 200 + drivers/net/mlx5/hws/mlx5dr_buddy.h

[v6 05/18] common/mlx5: query set capability of registers

2022-10-20 Thread Alex Vesker
From: Bing Zhao In the flow table capabilities, new fields are added to query the capability to set, add, copy to a REG_C_x. The set capability are queried and saved for the future usage. Signed-off-by: Bing Zhao --- drivers/common/mlx5/mlx5_devx_cmds.c | 30 +++ drivers/commo

[v6 06/18] net/mlx5: provide the available tag registers

2022-10-20 Thread Alex Vesker
From: Bing Zhao The available tags that can be used by the application are fixed after startup. A global array is used to store the information and transfer the TAG item directly from the ID to the REG_C_x. Signed-off-by: Bing Zhao --- drivers/net/mlx5/linux/mlx5_os.c | 2 + drivers/net/mlx5

[v6 03/18] net/mlx5: add hardware steering item translation function

2022-10-20 Thread Alex Vesker
From: Suanming Mou As hardware steering root table flows still work under FW steering mode. This commit provides shared item tranlsation code for hardware steering root table flows. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow.c| 10 +-- drivers/net/mlx5/mlx5_flow.h| 52

[v6 02/18] net/mlx5: split flow item matcher and value translation

2022-10-20 Thread Alex Vesker
From: Suanming Mou As hardware steering mode translates flow matcher and value in two different stages, split the flow item matcher and value translation to help reuse the code. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow.h| 32 + drivers/net/mlx5/mlx5_flow_dv.c | 2314 +++

[v6 04/18] net/mlx5: add port to metadata conversion

2022-10-20 Thread Alex Vesker
From: Dariusz Sosnowski This patch initial version of functions used to: - convert between ethdev port_id and internal tag/mask value, - convert between IB context and internal tag/mask value. Signed-off-by: Dariusz Sosnowski --- drivers/net/mlx5/linux/mlx5_os.c | 10 +- drivers/net/mlx5/

[v6 01/18] net/mlx5: split flow item translation

2022-10-20 Thread Alex Vesker
From: Suanming Mou In order to share the item translation code with hardware steering mode, this commit splits flow item translation code to a dedicate function. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow_dv.c | 1915 --- 1 file changed, 979 insertio

[v6 00/18] net/mlx5: Add HW steering low level support

2022-10-20 Thread Alex Vesker
compile on old rdma-core or no rdma core v6: -Fix meson style and improve configure -Checkpatch and compilation fixes -Fix action number issue Alex Vesker (8): net/mlx5: Add additional glue functions for HWS net/mlx5/hws: Add HWS send layer net/mlx5/hws: Add HWS definer layer net/mlx5/hws

[v5 17/18] net/mlx5/hws: Add HWS debug layer

2022-10-19 Thread Alex Vesker
From: Hamdan Igbaria The debug layer is used to generate a debug CSV file containing details of the context, table, matcher, rules and other useful debug information. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_debug.c | 462

[v5 18/18] net/mlx5/hws: Enable HWS

2022-10-19 Thread Alex Vesker
Replace stub implenation of HWS with mlx5dr code. Signed-off-by: Alex Vesker --- doc/guides/nics/mlx5.rst | 5 +- doc/guides/rel_notes/release_22_11.rst | 4 + drivers/common/mlx5/linux/meson.build| 3 + drivers/net/mlx5/hws/meson.build | 18

[v5 16/18] net/mlx5/hws: Add HWS action object

2022-10-19 Thread Alex Vesker
From: Erez Shitrit Action objects are used for executing different HW actions over packets. Each action contains the HW resources and parameters needed for action use over the HW when creating a rule. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws

[v5 15/18] net/mlx5/hws: Add HWS rule object

2022-10-19 Thread Alex Vesker
configured to the HW. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 528 + drivers/net/mlx5/hws/mlx5dr_rule.h | 50 +++ 2 files changed, 578 insertions(+) create mode 100644 drivers/net/mlx5/hws/mlx5dr_rule.c create

[v5 14/18] net/mlx5/hws: Add HWS matcher object

2022-10-19 Thread Alex Vesker
the matcher and from there to other objects. The matcher allows efficent HW packet field matching and action execution based on the configuration done to it. Signed-off-by: Alex Vesker --- drivers/common/mlx5/linux/meson.build | 2 + drivers/net/mlx5/hws/mlx5dr_matcher.c | 919

[v5 13/18] net/mlx5/hws: Add HWS table object

2022-10-19 Thread Alex Vesker
Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_table.c | 248 drivers/net/mlx5/hws/mlx5dr_table.h | 44 + 2 files changed, 292 insertions(+) create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.c create mode 100644 drivers/net/mlx5/hws/mlx5dr_table.h

[v5 12/18] net/mlx5/hws: Add HWS context object

2022-10-19 Thread Alex Vesker
Context is the first mlx5dr object created, all sub object: table, matcher, rule, action are created using the context. The context holds the capabilities and send queues used for configuring the offloads to the HW. Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_context.c | 223

[v5 11/18] net/mlx5/hws: Add HWS definer layer

2022-10-19 Thread Alex Vesker
the field copy (fc) array used for efficient items to WQE conversion. Signed-off-by: Mark Bloch Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_definer.c | 1968 + drivers/net/mlx5/hws/mlx5dr_definer.h | 585 2 files changed, 2553 insertions

[v5 10/18] net/mlx5/hws: Add HWS send layer

2022-10-19 Thread Alex Vesker
HWS configures flows to the HW using a QP, each WQE has the details of the flow we want to offload. The send layer allocates the resources needed to send the request to the HW as well as managing the queues, getting completions and handling failures. Signed-off-by: Mark Bloch Signed-off-by: Alex

[v5 09/18] net/mlx5/hws: Add HWS pool and buddy

2022-10-19 Thread Alex Vesker
From: Erez Shitrit HWS needs to manage different types of device memory in an efficient and quick way. For this, memory pools are being used. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_buddy.c | 201 + drivers/net/mlx5/hws/mlx5dr_buddy.h

[v5 08/18] net/mlx5/hws: Add HWS command layer

2022-10-19 Thread Alex Vesker
From: Erez Shitrit The command layer is used to communicate with the FW, query capabilities and allocate FW resources needed for HWS. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/common/mlx5/mlx5_prm.h| 607 ++- drivers/net/mlx5/hws/mlx5dr_cmd.c

[v5 07/18] net/mlx5: Add additional glue functions for HWS

2022-10-19 Thread Alex Vesker
Add missing glue support for HWS mlx5dr layer. The new glue functions are needed for mlx5dv create matcher and action, which are used as the kernel root table as well as for capabilities query like device name and ports info. Signed-off-by: Alex Vesker --- drivers/common/mlx5/linux/mlx5_glue.c

[v5 06/18] net/mlx5: provide the available tag registers

2022-10-19 Thread Alex Vesker
From: Bing Zhao The available tags that can be used by the application are fixed after startup. A global array is used to store the information and transfer the TAG item directly from the ID to the REG_C_x. Signed-off-by: Bing Zhao --- drivers/net/mlx5/linux/mlx5_os.c | 2 + drivers/net/mlx5

[v5 05/18] common/mlx5: query set capability of registers

2022-10-19 Thread Alex Vesker
From: Bing Zhao In the flow table capabilities, new fields are added to query the capability to set, add, copy to a REG_C_x. The set capability are queried and saved for the future usage. Signed-off-by: Bing Zhao --- drivers/common/mlx5/mlx5_devx_cmds.c | 30 +++ drivers/commo

[v5 04/18] net/mlx5: add port to metadata conversion

2022-10-19 Thread Alex Vesker
From: Dariusz Sosnowski This patch initial version of functions used to: - convert between ethdev port_id and internal tag/mask value, - convert between IB context and internal tag/mask value. Signed-off-by: Dariusz Sosnowski --- drivers/net/mlx5/linux/mlx5_os.c | 10 +- drivers/net/mlx5/

[v5 02/18] net/mlx5: split flow item matcher and value translation

2022-10-19 Thread Alex Vesker
From: Suanming Mou As hardware steering mode translates flow matcher and value in two different stages, split the flow item matcher and value translation to help reuse the code. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow.h| 32 + drivers/net/mlx5/mlx5_flow_dv.c | 2314 +++

[v5 03/18] net/mlx5: add hardware steering item translation function

2022-10-19 Thread Alex Vesker
From: Suanming Mou As hardware steering root table flows still work under FW steering mode. This commit provides shared item tranlsation code for hardware steering root table flows. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow.c| 10 +-- drivers/net/mlx5/mlx5_flow.h| 52

[v5 01/18] net/mlx5: split flow item translation

2022-10-19 Thread Alex Vesker
From: Suanming Mou In order to share the item translation code with hardware steering mode, this commit splits flow item translation code to a dedicate function. Signed-off-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow_dv.c | 1915 --- 1 file changed, 979 insertio

[v5 00/18] net/mlx5: Add HW steering low level support

2022-10-19 Thread Alex Vesker
compile on old rdma-core or no rdma core Alex Vesker (8): net/mlx5: Add additional glue functions for HWS net/mlx5/hws: Add HWS send layer net/mlx5/hws: Add HWS definer layer net/mlx5/hws: Add HWS context object net/mlx5/hws: Add HWS table object net/mlx5/hws: Add HWS matcher object

[v4 17/18] net/mlx5/hws: Add HWS debug layer

2022-10-19 Thread Alex Vesker
From: Hamdan Igbaria The debug layer is used to generate a debug CSV file containing details of the context, table, matcher, rules and other useful debug information. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_debug.c | 462

[v4 18/18] net/mlx5/hws: Enable HWS

2022-10-19 Thread Alex Vesker
Replace stub implenation of HWS with mlx5dr code. Signed-off-by: Alex Vesker --- doc/guides/nics/mlx5.rst | 5 +- doc/guides/rel_notes/release_22_11.rst | 4 + drivers/common/mlx5/linux/meson.build| 2 + drivers/net/mlx5/hws/meson.build | 18

[v4 16/18] net/mlx5/hws: Add HWS action object

2022-10-19 Thread Alex Vesker
Action objects are used for executing different HW actions over packets. Each action contains the HW resources and parameters needed for action use over the HW when creating a rule. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_action.c |

[v4 15/18] net/mlx5/hws: Add HWS rule object

2022-10-19 Thread Alex Vesker
configured to the HW. Signed-off-by: Erez Shitrit Signed-off-by: Alex Vesker --- drivers/net/mlx5/hws/mlx5dr_rule.c | 528 + drivers/net/mlx5/hws/mlx5dr_rule.h | 50 +++ 2 files changed, 578 insertions(+) create mode 100644 drivers/net/mlx5/hws/mlx5dr_rule.c create

  1   2   >