[PATCH v3 2/2] net/mlx5: improve debug dump file path handling
Dariusz Sosnowski
dsosnowski at nvidia.com
Fri Nov 7 17:48:37 CET 2025
Hi,
> -----Original Message-----
> From: Yang Ming <mosesyyoung at gmail.com>
> Sent: Friday, August 29, 2025 4:50 PM
> To: dev at dpdk.org
> Subject: [PATCH v3 2/2] net/mlx5: improve debug dump file path handling
>
> 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 <mosesyyoung at gmail.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Best regards,
Dariusz Sosnowski
More information about the dev
mailing list