[dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares

Wang, Haiyue haiyue.wang at intel.com
Mon Jul 5 15:19:14 CEST 2021


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of David Marchand
> Sent: Tuesday, June 29, 2021 16:07
> To: dev at dpdk.org
> Cc: Igor Russkikh <irusskikh at marvell.com>; Aaron Conole <aconole at redhat.com>; Michael Santana
> <maicolgabriel at hotmail.com>; Richardson, Bruce <bruce.richardson at intel.com>; Rasesh Mody
> <rmody at marvell.com>; Shahed Shaikh <shshaikh at marvell.com>; Yang, Qiming <qiming.yang at intel.com>; Zhang,
> Qi Z <qi.z.zhang at intel.com>; Heinrich Kuhn <heinrich.kuhn at netronome.com>; Devendra Singh Rawat
> <dsinghrawat at marvell.com>; Ray Kinsella <mdr at ashroe.eu>; Neil Horman <nhorman at tuxdriver.com>; Dmitry
> Kozlyuk <dmitry.kozliuk at gmail.com>; Narcisa Ana Maria Vasile <navasile at linux.microsoft.com>; Dmitry
> Malloy <dmitrym at microsoft.com>; Kadam, Pallavi <pallavi.kadam at intel.com>
> Subject: [dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares
> 
> Introduce an internal firmware loading helper to remove code duplication
> in our drivers and handle xz compressed firmwares by calling libarchive.
> 
> This helper tries to look for .xz suffixes so that drivers are not aware
> the firmwares have 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 at redhat.com>
> Reviewed-by: Igor Russkikh <irusskikh at marvell.com>
> ---
> Changes since v2:
> - added a comment on libarchive link dependency,
> 
> Changes since v1:
> - used pkg-config for libarchive detection,
> - updated doxygen annotations,
> - added internal helpers in eal_firmware.c to enhance readability,
> - dropped whitespace damage in version.map,
> 
> ---
>  .github/workflows/build.yml    |   1 +
>  .travis.yml                    |   1 +
>  config/meson.build             |  10 +++
>  drivers/net/bnx2x/bnx2x.c      |  35 +++-----
>  drivers/net/ice/ice_ethdev.c   |  60 +++----------

For ice PMD:

Tested-by: Haiyue Wang <haiyue.wang at intel.com>

>  drivers/net/nfp/nfp_net.c      |  57 +++----------
>  drivers/net/qede/qede_main.c   |  45 ++++------
>  lib/eal/include/rte_firmware.h |  32 +++++++
>  lib/eal/unix/eal_firmware.c    | 149 +++++++++++++++++++++++++++++++++
>  lib/eal/unix/meson.build       |   1 +
>  lib/eal/version.map            |   1 +
>  lib/eal/windows/eal.c          |   9 ++
>  12 files changed, 259 insertions(+), 142 deletions(-)
>  create mode 100644 lib/eal/include/rte_firmware.h
>  create mode 100644 lib/eal/unix/eal_firmware.c
> 


> --
> 2.23.0



More information about the dev mailing list