]> git.dujemihanovic.xyz Git - linux.git/commitdiff
net/mlx5: DR, Fix 'stack guard page was hit' error in dr_rule
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Tue, 30 Jul 2024 06:16:32 +0000 (09:16 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Aug 2024 01:04:51 +0000 (18:04 -0700)
This patch reduces the size of hw_ste_arr_optimized array that is
allocated on stack from 640 bytes (5 match STEs + 5 action STES)
to 448 bytes (2 match STEs + 5 action STES).
This fixes the 'stack guard page was hit' issue, while still fitting
majority of the usecases (up to 2 match STEs).

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Link: https://patch.msgid.link/20240730061638.1831002-4-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c

index 042ca0349124332ab875d11b9c8112b9b1173de4..d1db04baa1fa6f01a297879dd383aa42ace22a6e 100644 (file)
@@ -7,7 +7,7 @@
 /* don't try to optimize STE allocation if the stack is too constaraining */
 #define DR_RULE_MAX_STES_OPTIMIZED 0
 #else
-#define DR_RULE_MAX_STES_OPTIMIZED 5
+#define DR_RULE_MAX_STES_OPTIMIZED 2
 #endif
 #define DR_RULE_MAX_STE_CHAIN_OPTIMIZED (DR_RULE_MAX_STES_OPTIMIZED + DR_ACTION_MAX_STES)