diff mbox series

[net-next,01/15] net/mlx5: DR, Move ACTION_CACHE_LINE_SIZE macro to header

Message ID 20230414220939.136865-2-saeed@kernel.org (mailing list archive)
State Accepted
Commit b47dddc624efbc6c31afe0f4ee415ccbdeb0e4ce
Delegated to: Netdev Maintainers
Headers show
Series [net-next,01/15] net/mlx5: DR, Move ACTION_CACHE_LINE_SIZE macro to header | expand

Checks

Context Check Description
netdev/series_format success Pull request is its own cover letter
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch warning WARNING: line length of 84 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Saeed Mahameed April 14, 2023, 10:09 p.m. UTC
From: Yevgeny Kliteynik <kliteyn@nvidia.com>

Move ACTION_CACHE_LINE_SIZE macro to header to be used by
the pattern functions as well.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 .../ethernet/mellanox/mlx5/core/steering/dr_action.c   | 10 ++++------
 .../ethernet/mellanox/mlx5/core/steering/dr_types.h    |  1 +
 2 files changed, 5 insertions(+), 6 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 17, 2023, 7:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Saeed Mahameed <saeedm@nvidia.com>:

On Fri, 14 Apr 2023 15:09:25 -0700 you wrote:
> From: Yevgeny Kliteynik <kliteyn@nvidia.com>
> 
> Move ACTION_CACHE_LINE_SIZE macro to header to be used by
> the pattern functions as well.
> 
> Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
> Reviewed-by: Alex Vesker <valex@nvidia.com>
> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net-next,01/15] net/mlx5: DR, Move ACTION_CACHE_LINE_SIZE macro to header
    https://git.kernel.org/netdev/net-next/c/b47dddc624ef
  - [net-next,02/15] net/mlx5: DR, Add cache for modify header pattern
    https://git.kernel.org/netdev/net-next/c/da5d0027d666
  - [net-next,03/15] net/mlx5: DR, Split chunk allocation to HW-dependent ways
    https://git.kernel.org/netdev/net-next/c/2533e726f472
  - [net-next,04/15] net/mlx5: DR, Check for modify_header_argument device capabilities
    https://git.kernel.org/netdev/net-next/c/b7ba743a2f1c
  - [net-next,05/15] net/mlx5: DR, Add create/destroy for modify-header-argument general object
    https://git.kernel.org/netdev/net-next/c/de69696b6eee
  - [net-next,06/15] net/mlx5: DR, Add support for writing modify header argument
    https://git.kernel.org/netdev/net-next/c/4605fc0a2b65
  - [net-next,07/15] net/mlx5: DR, Read ICM memory into dedicated buffer
    https://git.kernel.org/netdev/net-next/c/7d7c9453d679
  - [net-next,08/15] net/mlx5: DR, Fix QP continuous allocation
    https://git.kernel.org/netdev/net-next/c/17dc71c336aa
  - [net-next,09/15] net/mlx5: DR, Add modify header arg pool mechanism
    https://git.kernel.org/netdev/net-next/c/608d4f1769d8
  - [net-next,10/15] net/mlx5: DR, Add modify header argument pointer to actions attributes
    https://git.kernel.org/netdev/net-next/c/0caebadda57b
  - [net-next,11/15] net/mlx5: DR, Apply new accelerated modify action and decapl3
    https://git.kernel.org/netdev/net-next/c/62e40c856825
  - [net-next,12/15] net/mlx5: DR, Support decap L3 action using pattern / arg mechanism
    https://git.kernel.org/netdev/net-next/c/947e258537ea
  - [net-next,13/15] net/mlx5: DR, Modify header action of size 1 optimization
    https://git.kernel.org/netdev/net-next/c/40ff097f2503
  - [net-next,14/15] net/mlx5: DR, Add support for the pattern/arg parameters in debug dump
    https://git.kernel.org/netdev/net-next/c/a21e52bb8f37
  - [net-next,15/15] net/mlx5: DR, Enable patterns and arguments for supporting devices
    https://git.kernel.org/netdev/net-next/c/220ae987838c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
index ee104cf04392..724e4d9e70ac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
@@ -1365,8 +1365,6 @@  dr_action_verify_reformat_params(enum mlx5dr_action_type reformat_type,
 	return -EINVAL;
 }
 
-#define ACTION_CACHE_LINE_SIZE 64
-
 static int
 dr_action_create_reformat_action(struct mlx5dr_domain *dmn,
 				 u8 reformat_param_0, u8 reformat_param_1,
@@ -1403,13 +1401,13 @@  dr_action_create_reformat_action(struct mlx5dr_domain *dmn,
 	}
 	case DR_ACTION_TYP_TNL_L3_TO_L2:
 	{
-		u8 hw_actions[ACTION_CACHE_LINE_SIZE] = {};
+		u8 hw_actions[DR_ACTION_CACHE_LINE_SIZE] = {};
 		int ret;
 
 		ret = mlx5dr_ste_set_action_decap_l3_list(dmn->ste_ctx,
 							  data, data_sz,
 							  hw_actions,
-							  ACTION_CACHE_LINE_SIZE,
+							  DR_ACTION_CACHE_LINE_SIZE,
 							  &action->rewrite->num_of_actions);
 		if (ret) {
 			mlx5dr_dbg(dmn, "Failed creating decap l3 action list\n");
@@ -1427,7 +1425,7 @@  dr_action_create_reformat_action(struct mlx5dr_domain *dmn,
 		action->rewrite->index = (mlx5dr_icm_pool_get_chunk_icm_addr
 					  (action->rewrite->chunk) -
 					 dmn->info.caps.hdr_modify_icm_addr) /
-					 ACTION_CACHE_LINE_SIZE;
+					 DR_ACTION_CACHE_LINE_SIZE;
 
 		ret = mlx5dr_send_postsend_action(dmn, action);
 		if (ret) {
@@ -2006,7 +2004,7 @@  static int dr_action_create_modify_action(struct mlx5dr_domain *dmn,
 	action->rewrite->num_of_actions = num_hw_actions;
 	action->rewrite->index = (mlx5dr_icm_pool_get_chunk_icm_addr(chunk) -
 				  dmn->info.caps.hdr_modify_icm_addr) /
-				  ACTION_CACHE_LINE_SIZE;
+				  DR_ACTION_CACHE_LINE_SIZE;
 
 	ret = mlx5dr_send_postsend_action(dmn, action);
 	if (ret)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
index 5b9faa714f42..7453fc6df494 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
@@ -21,6 +21,7 @@ 
 #define DR_NUM_OF_FLEX_PARSERS 8
 #define DR_STE_MAX_FLEX_0_ID 3
 #define DR_STE_MAX_FLEX_1_ID 7
+#define DR_ACTION_CACHE_LINE_SIZE 64
 
 #define mlx5dr_err(dmn, arg...) mlx5_core_err((dmn)->mdev, ##arg)
 #define mlx5dr_info(dmn, arg...) mlx5_core_info((dmn)->mdev, ##arg)