From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0549945804 for ; Fri, 23 Aug 2024 18:19:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D352B402BE; Fri, 23 Aug 2024 18:19:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8D6D340295 for ; Fri, 23 Aug 2024 18:19:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724429988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=or4JIjREZ/ykuAbMRnV9/WWblO/XU4z27K9Oa+DLUnM=; b=OGXRO8LQ0KxSY9mUz/XVdMcBjcPLW98FTwMImKuCi4BQv6VO0+eTh+JFiP9npIj6hei9Lo Sl7TWaUQVmqzt8h/NrKEqqVRuah0IBkKkBs98Af3gNEdZj9JJWluGuNB3MhWIfDMqdKdK/ OPDED5vrF88n86qW4VGVoH0U3biL4UM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-225-0ymz3bA2OBqivosbVaaevg-1; Fri, 23 Aug 2024 12:19:45 -0400 X-MC-Unique: 0ymz3bA2OBqivosbVaaevg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ACEE519560A3; Fri, 23 Aug 2024 16:19:44 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F0DC21955F44; Fri, 23 Aug 2024 16:19:42 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Bruce Richardson , dpdk stable Subject: patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:17:10 +0100 Message-ID: <20240823161929.1004778-2-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Bruce Richardson --- 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@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",