patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 21.11.8
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 18:17:10 CEST 2024
Hi,
FYI, your patch has been queued to stable release 21.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/87e7322144bf6f18c31e5f4d6c467f9340796bed
Thanks.
Kevin
---
>From 87e7322144bf6f18c31e5f4d6c467f9340796bed Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Tue, 7 May 2024 13:01:53 +0200
Subject: [PATCH] eal/unix: support ZSTD compression for firmware
[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
Ubuntu 24.04 started to compress firmware files with ZSTD compression.
Bugzilla ID: 1437
Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/eal/unix/eal_firmware.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
index 1a7cf8e7b7..b999420de0 100644
--- a/lib/eal/unix/eal_firmware.c
+++ b/lib/eal/unix/eal_firmware.c
@@ -16,4 +16,6 @@
#include "eal_firmware.h"
+static const char * const compression_suffixes[] = { "xz", "zst" };
+
#ifdef RTE_HAS_LIBARCHIVE
@@ -37,5 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
err = archive_read_support_filter_xz(ctx->a);
if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
- goto error;
+ RTE_LOG(DEBUG, EAL,
+ "could not initialise libarchive for xz compression\n");
+
+ err = archive_read_support_filter_zstd(ctx->a);
+ if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
+ RTE_LOG(DEBUG, EAL,
+ "could not initialise libarchive for zstd compression\n");
if (archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK)
@@ -148,14 +156,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
ret = firmware_read(name, buf, bufsz);
if (ret < 0) {
- snprintf(path, sizeof(path), "%s.xz", name);
- path[PATH_MAX - 1] = '\0';
+ unsigned int i;
+
+ for (i = 0; i < RTE_DIM(compression_suffixes); i++) {
+ snprintf(path, sizeof(path), "%s.%s", name, compression_suffixes[i]);
+ path[PATH_MAX - 1] = '\0';
+ if (access(path, F_OK) != 0)
+ continue;
#ifndef RTE_HAS_LIBARCHIVE
- if (access(path, F_OK) == 0) {
RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
path);
- }
#else
- ret = firmware_read(path, buf, bufsz);
+ ret = firmware_read(path, buf, bufsz);
#endif
+ break;
+ }
}
return ret;
--
2.46.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-23 17:18:10.000708928 +0100
+++ 0002-eal-unix-support-ZSTD-compression-for-firmware.patch 2024-08-23 17:18:09.603429697 +0100
@@ -1 +1 @@
-From 6f80df8cb0f889203d7cd27766abcc6ebc720e33 Mon Sep 17 00:00:00 2001
+From 87e7322144bf6f18c31e5f4d6c467f9340796bed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -14,2 +15,2 @@
- lib/eal/unix/eal_firmware.c | 23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
+ lib/eal/unix/eal_firmware.c | 25 +++++++++++++++++++------
+ 1 file changed, 19 insertions(+), 6 deletions(-)
@@ -18 +19 @@
-index 1d47e879c8..0d69b1e3f0 100644
+index 1a7cf8e7b7..b999420de0 100644
@@ -21,2 +22,2 @@
-@@ -17,4 +17,6 @@
- #include "eal_private.h"
+@@ -16,4 +16,6 @@
+ #include "eal_firmware.h"
@@ -28 +29 @@
-@@ -38,5 +40,9 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
+@@ -37,5 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
@@ -32 +33,2 @@
-+ EAL_LOG(DEBUG, "could not initialise libarchive for xz compression");
++ RTE_LOG(DEBUG, EAL,
++ "could not initialise libarchive for xz compression\n");
@@ -36 +38,2 @@
-+ EAL_LOG(DEBUG, "could not initialise libarchive for zstd compression");
++ RTE_LOG(DEBUG, EAL,
++ "could not initialise libarchive for zstd compression\n");
@@ -39 +42 @@
-@@ -149,14 +155,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
+@@ -148,14 +156,19 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
@@ -53 +56 @@
- EAL_LOG(WARNING, "libarchive not linked, %s cannot be decompressed",
+ RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
More information about the stable
mailing list