1. /var/log is hard code which is not a good coding style. 2. /var/log may be not allowed to be written via container's read-only mode.
Signed-off-by: Yang Ming <ming.1.y...@nokia-sbell.com> --- drivers/net/mlx5/mlx5_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index eadadcdffb..a0da73c9c3 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -12,6 +12,7 @@ #include <rte_prefetch.h> #include <rte_common.h> #include <rte_branch_prediction.h> +#include <rte_eal.h> #include <rte_ether.h> #include <rte_cycles.h> #include <rte_flow.h> @@ -311,7 +312,7 @@ mlx5_set_swp_types_table(void) } } -#define MLX5_SYSTEM_LOG_DIR "/var/log" +#define MLX5_SYSTEM_LOG_DIR rte_eal_get_runtime_dir() /** * Dump debug information to log file. * -- 2.34.1