eal: handle compressed firmware
authorDavid Marchand <david.marchand@redhat.com>
Wed, 7 Jul 2021 12:08:18 +0000 (14:08 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 7 Jul 2021 14:41:53 +0000 (16:41 +0200)
commit40edb9c0d36b781d711fabb91e250dca8fa6bd99
treee11dc85c0a6d2b6982a837000685e2a848394cbb
parent7f7cbf80bdb7b57f3f67fe244be4572efa69b374
eal: handle compressed firmware

Introduce an internal firmware loading helper to remove code duplication
in our drivers and handle xz compressed firmware by calling libarchive.

This helper tries to look for .xz suffixes so that drivers are not aware
the firmware has been compressed.

libarchive is set as an optional dependency: without libarchive, a
runtime warning is emitted so that users know there is a compressed
firmware.

Windows implementation is left as an empty stub.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Tested-by: Haiyue Wang <haiyue.wang@intel.com>
13 files changed:
.github/workflows/build.yml
.travis.yml
config/meson.build
doc/guides/rel_notes/release_21_08.rst
drivers/net/bnx2x/bnx2x.c
drivers/net/ice/ice_ethdev.c
drivers/net/nfp/nfp_net.c
drivers/net/qede/qede_main.c
lib/eal/common/eal_firmware.h [new file with mode: 0644]
lib/eal/unix/eal_firmware.c [new file with mode: 0644]
lib/eal/unix/meson.build
lib/eal/version.map
lib/eal/windows/eal.c