patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 1/1] eal: enable xz read support and ignore warning
@ 2023-09-22 16:53 Srikanth Yalavarthi
  2023-09-25  9:10 ` David Marchand
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Srikanth Yalavarthi @ 2023-09-22 16:53 UTC (permalink / raw)
  To: David Marchand, Aaron Conole, Igor Russkikh
  Cc: dev, syalavarthi, sshankarnara, aprabhu, ptakkar, jerinjacobk, stable

archive_read_support_filter_xz returns a warning when
compression is not fully supported and is supported
through external program. This warning can be ignored
when reading the files through firmware open as only
decompression is required.

Fixes: 40edb9c0d36b ("eal: handle compressed firmware")
Cc: stable@dpdk.org

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 lib/eal/unix/eal_firmware.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
index d1616b0bd9..05c06c222a 100644
--- a/lib/eal/unix/eal_firmware.c
+++ b/lib/eal/unix/eal_firmware.c
@@ -25,12 +25,19 @@ static int
 firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
 {
 	struct archive_entry *e;
+	int err;
 
 	ctx->a = archive_read_new();
 	if (ctx->a == NULL)
 		return -1;
+
+	err = archive_read_support_filter_xz(ctx->a);
+	if (err != ARCHIVE_OK && err != ARCHIVE_WARN) {
+		ctx->a = NULL;
+		return -1;
+	}
+
 	if (archive_read_support_format_raw(ctx->a) != ARCHIVE_OK ||
-			archive_read_support_filter_xz(ctx->a) != ARCHIVE_OK ||
 			archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK ||
 			archive_read_next_header(ctx->a, &e) != ARCHIVE_OK) {
 		archive_read_free(ctx->a);
-- 
2.41.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-27  9:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22 16:53 [PATCH 1/1] eal: enable xz read support and ignore warning Srikanth Yalavarthi
2023-09-25  9:10 ` David Marchand
2023-09-26 13:32   ` [EXT] " Srikanth Yalavarthi
2023-09-26 13:30 ` [PATCH v2 1/1] eal: update " Srikanth Yalavarthi
2023-09-26 13:56   ` David Marchand
2023-09-26 14:47     ` [EXT] " Srikanth Yalavarthi
2023-09-26 13:49 ` [PATCH v3 " Srikanth Yalavarthi
2023-09-26 14:44 ` [PATCH v4 1/1] eal/unix: fix firmware reading with external xz helper Srikanth Yalavarthi
2023-09-27  8:20   ` David Marchand
2023-09-27  9:35     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).