[PATCH v2] eal/unix: support ZSTD compression for firmware
Bruce Richardson
bruce.richardson at intel.com
Mon May 13 13:37:31 CEST 2024
On Mon, May 13, 2024 at 01:12:04PM +0200, David Marchand wrote:
> Ubuntu 24.04 started to compress firmware files with ZSTD compression.
>
> Bugzilla ID: 1437
> Cc: stable at dpdk.org
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> Chances since v1:
> - fixed link issue when libarchive is not available,
> - Cc'd stable at dpdk.org,
>
> ---
> lib/eal/unix/eal_firmware.c | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Verified that port initializes ok with zstd compressed firmware, and we get
suitable error if libarchive is not installed.
Tested-by: Bruce Richardson <bruce.richardson at intel.com>
One minor suggestion below.
> diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
> index 1d47e879c8..31de027598 100644
> --- a/lib/eal/unix/eal_firmware.c
> +++ b/lib/eal/unix/eal_firmware.c
> @@ -16,6 +16,8 @@
> #include "eal_firmware.h"
> #include "eal_private.h"
>
> +static const char * const compression_algorithms[] = { "xz", "zst" };
Very minor nit: these are the suffixes used to find the files, more than
they are the compression algorithms. There I'd suggest renaming to
"compression_suffixes".
[Perhaps just fix on apply if taking this suggestion]
> +
> #ifdef RTE_HAS_LIBARCHIVE
>
> struct firmware_read_ctx {
<snip>
More information about the dev
mailing list