From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: <dev@dpdk.org>, Yu Jiang <yux.jiang@intel.com>
Subject: Re: [PATCH] eal/unix: support ZSTD compression for firmwares
Date: Wed, 8 May 2024 11:50:02 +0100 [thread overview]
Message-ID: <ZjtY2lPSrpo3q2oZ@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240508095214.2541115-1-david.marchand@redhat.com>
On Wed, May 08, 2024 at 11:52:14AM +0200, David Marchand wrote:
> Ubuntu 24.04 started to compress firmwares with ZSTD compression.
>
> Bugzilla ID: 1437
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> lib/eal/unix/eal_firmware.c | 42 +++++++++++++++++++++++++++++--------
> 1 file changed, 33 insertions(+), 9 deletions(-)
>
> diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
> index 1d47e879c8..065e251f9d 100644
> --- a/lib/eal/unix/eal_firmware.c
> +++ b/lib/eal/unix/eal_firmware.c
> @@ -16,6 +16,21 @@
> #include "eal_firmware.h"
> #include "eal_private.h"
>
> +#ifndef RTE_HAS_LIBARCHIVE
> +/* Fake definitions for the compression_algorithms array below. */
> +struct archive;
> +extern int archive_read_support_filter_xz(struct archive *a);
> +extern int archive_read_support_filter_zstd(struct archive *a);
> +#endif
> +
Do these not lead to unresolved symbols on link?
> +static struct {
> + const char *suffix;
> + int (*support_callback)(struct archive *a);
> +} compression_algorithms[] = {
> + { "xz", archive_read_support_filter_xz, },
> + { "zst", archive_read_support_filter_zstd, },
> +};
> +
Rather than defining stubs for these functions from libarchive, can you
just have an empty list if no libarchive?
struct archive; /* may need to be #ifdef'ed perhaps? */
static struct {
const char *suffix;
int (*support_callback)(struct archive *a);
} compression_algorithms[] = {
#ifdef RTE_HAS_LIBARCHIVE
{ "xz", archive_read_support_filter_xz, },
{ "zst", archive_read_support_filter_zstd, },
#endif
};
> #ifdef RTE_HAS_LIBARCHIVE
>
<snip>
next prev parent reply other threads:[~2024-05-08 10:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 9:52 David Marchand
2024-05-08 10:50 ` Bruce Richardson [this message]
2024-05-08 15:01 ` Bruce Richardson
2024-05-13 9:46 ` David Marchand
2024-05-13 11:12 ` [PATCH v2] eal/unix: support ZSTD compression for firmware David Marchand
2024-05-13 11:37 ` Bruce Richardson
2024-05-13 11:47 ` David Marchand
2024-05-17 17:01 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjtY2lPSrpo3q2oZ@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=yux.jiang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).