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 CA883A0524; Wed, 2 Jun 2021 23:19:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ECD84069F; Wed, 2 Jun 2021 23:19:23 +0200 (CEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 1621940689 for ; Wed, 2 Jun 2021 23:19:22 +0200 (CEST) Received: by mail-lj1-f182.google.com with SMTP id u22so4394260ljh.7 for ; Wed, 02 Jun 2021 14:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PJID2tCQr6MG0fHDfpHfrO4EnFJN2mD6dPoU61ScAhU=; b=OQOqY1GthOirvseVdNWn6R0Go0GLyKc96wFpYujbDisXKy1fOnvOylq7fju8aOY4Pj P/JJFNvb3rXOwo55UUTnr5Bu4R0zmDQOSQ+bMvzGplUi6+5AD0/C4jPv1T0lb+Gf19KW 8DbLXaeFQMrpnLCekgZhVZGqwtUxtOcAKA0VsSiMZCN7cJ308Uf/Aqa/uuVAEBJPTVIu B9D2PwsNRSbPjx+1kjoN9EOwZYZ+zx7pj+YGUjuMtnpduZVU3dNCz5HcnC+SHOZgUEBB ZpeqFElv4fCczdIx14J57M2FYGJnz3TjcaZ0P4X2buPFEUlrWD6Ga8XqsVoAb0ElN485 FoTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PJID2tCQr6MG0fHDfpHfrO4EnFJN2mD6dPoU61ScAhU=; b=qc3TLErNPGIgN1dVKD4YzTuA+ppZ9FQG1NhiNNoR2OBiZ4Tq3nN2sNYPK1su9PDFqK xxe4c6FICqEMEXsBxJmP4SQwYxUSZLliaSDXQo7+IlWVr8iEG1vwbp5uUnOU+cEgWUuu LpxR3s3SpFzQM6/7GexZM9C0gUyzJ19zfzfQTySoS3Tc8zTCsxLQcswJI7J+6mKReynB zLijT4XDxnPbhyHtMItQhDKPSz+BWt2OqY99COuGuLKxdq25cJEh1R36HKT+p6DnCmd6 Cg3RYDQhgmzJLwd27/i4Kex6ymVaQGa5ythSGZLzRqKp7w0wVEGAXJkWMjlUXcMnIu0G dFJw== X-Gm-Message-State: AOAM533lvb1k+P0mmtMKJE0UHrjextdVTyk1iZ4n0SUz0elAjSe1P+87 d7JwMQgr6sLBoARPU6Cfe3E= X-Google-Smtp-Source: ABdhPJyCICwWZia9N9O7GyxH9mhujy6tiIvcjdafRNk2it/paEoAm9lHNqoO+73MHZP6gpri1oaYaQ== X-Received: by 2002:a05:651c:200d:: with SMTP id s13mr26192630ljo.254.1622668761517; Wed, 02 Jun 2021 14:19:21 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id h25sm104472lfe.3.2021.06.02.14.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 14:19:20 -0700 (PDT) Date: Thu, 3 Jun 2021 00:19:19 +0300 From: Dmitry Kozlyuk To: David Marchand Cc: dev@dpdk.org, Aaron Conole , Michael Santana , Bruce Richardson , Rasesh Mody , Shahed Shaikh , Qiming Yang , Qi Zhang , Heinrich Kuhn , Devendra Singh Rawat , Igor Russkikh , Ray Kinsella , Neil Horman , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Message-ID: <20210603001919.7ea9c273@sovereign> In-Reply-To: <20210602095836.24901-3-david.marchand@redhat.com> References: <20210602095836.24901-1-david.marchand@redhat.com> <20210602095836.24901-3-david.marchand@redhat.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] eal: handle compressed firmwares X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2021-06-02 11:58 (UTC+0200), David Marchand: > 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. JFYI, it doesn't seem hard to implement as a follow-up if need be. libarchive is available for Windows and even provides a .pc file. [...] > diff --git a/config/meson.build b/config/meson.build > index 017bb2efbb..337daa2719 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -166,6 +166,15 @@ if fdt_dep.found() and cc.has_header('fdt.h') > dpdk_extra_ldflags += '-lfdt' > endif > > +has_libarchive = 0 > +archive_dep = cc.find_library('libarchive', required: false) > +if archive_dep.found() and cc.has_header('archive.h') > + dpdk_conf.set10('RTE_HAS_LIBARCHIVE', true) > + has_libarchive = 1 > + add_project_link_arguments('-larchive', language: 'c') > + dpdk_extra_ldflags += '-larchive' > +endif > + Why not use pkg-config? `has_libarchive` is unused. > libexecinfo = cc.find_library('libexecinfo', required: false) > if libexecinfo.found() and cc.has_header('execinfo.h') > add_project_link_arguments('-lexecinfo', language: 'c') [...] > diff --git a/lib/eal/version.map b/lib/eal/version.map > index fe5c3dac98..020c058e5f 100644 > --- a/lib/eal/version.map > +++ b/lib/eal/version.map > @@ -423,11 +423,13 @@ EXPERIMENTAL { > rte_version_release; # WINDOWS_NO_EXPORT > rte_version_suffix; # WINDOWS_NO_EXPORT > rte_version_year; # WINDOWS_NO_EXPORT > + > }; Unnecessary empty line. > > INTERNAL { > global: > > + rte_firmware_read; > rte_mem_lock; > rte_mem_map; > rte_mem_page_size;