On Fri, 29 Aug 2025 22:49:53 +0800
Yang Ming <[email protected]> wrote:

> The current implementation always tries to open debug dump files
> under /var/log, which may not be writable in containerized or
> restricted environments (e.g. when the filesystem is mounted as
> read-only).
> 
> This patch introduces an OS-specific helper function
> mlx5_os_debug_dump_file_open() to unify the logic:
> 
> * On Linux:
>   1. Try /var/log if it is writable (kept for backward
>      compatibility).
>   2. Fallback to the DPDK runtime directory.
>   3. Finally, use the current working directory.
> 
> * On Windows:
>   1. Use the DPDK runtime directory.
>   2. Fallback to the current working directory.
> 
> This preserves the previous directory preference while ensuring
> debug dumps can still be written in restricted environments such
> as containers. The structure of the open logic is kept unchanged
> so that test cases and expected logs remain valid.
> 
> Signed-off-by: Yang Ming <[email protected]>

Mlx5 should follow current file system hierarchy standards.
Look at systemd documentation for information.
For example: /tmp should not be used for unix domain sockets
in a system service.

Reply via email to