net/mlx5: fix use of local array for global error
authorDekel Peled <dekelp@nvidia.com>
Wed, 4 Nov 2020 14:25:19 +0000 (16:25 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:25 +0000 (19:43 +0100)
commit58df16e08cd55cf7aa3de416117f720a4f166035
tree24f2e5231742157d9f38286716c5714b66e25ffd
parent9ade91dfe85d361b24d5242d7de9ca3d4f64e9d9
net/mlx5: fix use of local array for global error

Recent patch uses a local string array as input for function
rte_flow_error_set().
This stack memory may be later used by other code sections,
overwriting the desired error string.

This patch implements an error string for the specific case
requested, of ICMP item not supported in Verbs flow engine.

Fixes: d51475d1bfa5 ("net/mlx5: support item type error message in flow Verbs")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_verbs.c