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 304BA454E8 for ; Tue, 25 Jun 2024 01:59:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B3CB40EE1; Tue, 25 Jun 2024 01:59:26 +0200 (CEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id 8380940DD7 for ; Tue, 25 Jun 2024 01:59:24 +0200 (CEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4249196a361so12204615e9.0 for ; Mon, 24 Jun 2024 16:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273564; x=1719878364; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d6Y7RatR1PHrgtVcWjkjblrHkXHCpjRHpOf7uzL/ooI=; b=YPk+0PKdmqjQ3Npo5LsmJDdKFOKLPjXaS3/KYYFSIgk8rFU/8/xJeiqJ+0or1t2J7+ cku9gewg17J7J46TyTHNqHRZNCCDeeXJCfeiQp3yHw8jVApwKG6EGEmZjcNS4BNPI91V 2on/Rry47pn2UxPwMxI+OLV0gq44mzCFiqOuIsM9y1Lm2UUnla/BUWID+fDmjiPJSPI7 +w82jTEtKZPKOy4dCoQS5M/3BJMnU7lDj9WhrDp4RXr9fPO5+nxnmq1Mz0lRbZBhcmqx AMRt2t6dvrjFqzT2p0UTJ4SHIdymxJ0mpYh6NlMacXHNVzQtcD3aB98Ra3LQKcMhbB6f fDOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273564; x=1719878364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d6Y7RatR1PHrgtVcWjkjblrHkXHCpjRHpOf7uzL/ooI=; b=LRBYPnTXuk2t4wv7q8IaCeLUPA64z1ErMouDH2gA7cLxf9MEvJLYCmStQajL2QFADA zZAzxjIIqdwNTNiTU+tK50AHp+YJWNM78cYsUfOoqDu63xZCSSl9iRCMoZba/BSEvmAK +yUlOLxot/KBiLIHGYT0332Ws10aX1O1I2cTmVI0+ncICx/BURAhAvYsgbtYSZJd7p4M lHeFtUYrrjv517jNl22ERhtUeXFJcgdENyl1hPKrunTEKKa6Ul9YTcpkhTskm2EWAITg QW2qozo4p1rDhNvgzj3g04vRPFcjQh+ITGvt89cCwIROVllQzgVMSOHHW5OohFguumbI 7sHA== X-Forwarded-Encrypted: i=1; AJvYcCUFznak6qRq6AQbGqNNmMHwGCOxOjnAZrAN0cQObPzVlOIW2pxJKi2ipvGkQFsekqshlLoFsgZMwy2TuZDE5nU= X-Gm-Message-State: AOJu0Yxhv4k+ose5Ymci3LwxTP1RsdQ4Fix0TQJ0KVbi65ALZ3y13LH3 xhsSj393OOD5l3IH3BxQOUYVgEIAvLdPrpSbAmf4iFlFuJxneCwx X-Google-Smtp-Source: AGHT+IFv6zaEsPXgQml6Pgkn8gyMcUEa14OcB19HlDIy6QZ4llE3uRx/HN/Sq19gUkIHy0TGxDX3bA== X-Received: by 2002:a05:600c:2d05:b0:421:82ed:28d1 with SMTP id 5b1f17b1804b1-4248cc73e25mr39819075e9.41.1719273563968; Mon, 24 Jun 2024 16:59:23 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4248179d3c5sm157280515e9.8.2024.06.24.16.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 16:59:23 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Bruce Richardson , dpdk stable Subject: patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:57:49 +0100 Message-Id: <20240624235907.885628-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/73c189a0674d34b631241c3757e0a1ec13809c00 Thanks. Luca Boccassi --- >From 73c189a0674d34b631241c3757e0a1ec13809c00 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 | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c index 1a7cf8e7b7..9fc2f7763a 100644 --- a/lib/eal/unix/eal_firmware.c +++ b/lib/eal/unix/eal_firmware.c @@ -15,6 +15,8 @@ #include "eal_firmware.h" +static const char * const compression_suffixes[] = { "xz", "zst" }; + #ifdef RTE_HAS_LIBARCHIVE struct firmware_read_ctx { @@ -36,7 +38,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) goto error; @@ -147,16 +153,21 @@ 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:13.416458958 +0100 +++ 0003-eal-unix-support-ZSTD-compression-for-firmware.patch 2024-06-25 00:22:13.061183121 +0100 @@ -1 +1 @@ -From 6f80df8cb0f889203d7cd27766abcc6ebc720e33 Mon Sep 17 00:00:00 2001 +From 73c189a0674d34b631241c3757e0a1ec13809c00 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 1d47e879c8..0d69b1e3f0 100644 +index 1a7cf8e7b7..9fc2f7763a 100644 @@ -21 +22,2 @@ -@@ -16,6 +16,8 @@ +@@ -15,6 +15,8 @@ + @@ -23 +24,0 @@ - #include "eal_private.h" @@ -30 +31 @@ -@@ -37,7 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize) +@@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize) @@ -35 +36 @@ -+ EAL_LOG(DEBUG, "could not initialise libarchive for xz compression"); ++ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression\n"); @@ -39 +40 @@ -+ EAL_LOG(DEBUG, "could not initialise libarchive for zstd compression"); ++ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression\n"); @@ -43 +44 @@ -@@ -148,16 +154,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz) +@@ -147,16 +153,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz) @@ -58 +59 @@ - EAL_LOG(WARNING, "libarchive not linked, %s cannot be decompressed", + RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",