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 15CBDA0A0A; Thu, 3 Jun 2021 09:23:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9297C40689; Thu, 3 Jun 2021 09:23:28 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 467FF4067A for ; Thu, 3 Jun 2021 09:23:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622705005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LzampRbXSK76Ollb9QO+gVT/qMYkoGpHFtjB7IuRR04=; b=ffl9UOxPUq48GNQPZxu7saPAdJUlRsrpx5sM1eoYwDVyS2Pg2eXROObM3tShSdPDziIg1T KYVplF+HSrYLnaICQWgrafDrAbTh3o2hLXesRzKW5DZlRdibJiSxkoqSpptlktetbFegsf n3gGeOZTXzBhh3lPJxLzXS2rhYUmw/c= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-NpTOCWxYNU2sysuWiyKIgg-1; Thu, 03 Jun 2021 03:23:24 -0400 X-MC-Unique: NpTOCWxYNU2sysuWiyKIgg-1 Received: by mail-lf1-f72.google.com with SMTP id m123-20020a193f810000b02902706618de14so1986321lfa.21 for ; Thu, 03 Jun 2021 00:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LzampRbXSK76Ollb9QO+gVT/qMYkoGpHFtjB7IuRR04=; b=P9orJadJ7C7VVC85Mz8H2eXBwGKQTpokxe2ZL+Uo1i4nKOr3sghRA4qtAbTq4FKSI3 OdEccaMaXrdCfjSPOMaAnTyaiN1nyx9JDmF29VjJ4Z5GT143T8WEa05cdlSK0olnlrM7 1nXTJ7hTx/R5Luel3eZyspWb/hFHhtfBKeA2yF4COPjYYhJX3wYBVaE0eaixxSCRMVVZ B5ePczSrD9TdcFUn5Uq8+fdAmP+Ldp+GR43HxKUrp7clZgPL+QMDcI6W/rC6ohRO+Tg/ lxaRafTcPllmA25yVoShj2sYtibxXw8xZl01K8LmjUokdlicclp9qXGteMAPN8o8aaj+ WxYA== X-Gm-Message-State: AOAM532b1y+JbY0hbNRUY6ULLEhvXHrtHxEqQww2GYaTXAkdllc3FqKP E6SKPU9FMbLIeaISuNmi9lDT8wVlDJHyVEImtHfYBH2h2QTBeX5WPRg+QKZk1n/ZydaP67t1EkZ 4//camhQCPXtKGIeiqLE= X-Received: by 2002:a19:7d82:: with SMTP id y124mr24616549lfc.76.1622705002847; Thu, 03 Jun 2021 00:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6JoUS9mqOJR+EWVsXc6npmaKcXWpGFCBzKHP4EhjRXfJDpnDj4HbCgMNO4wU9X5u4Wv9L3jVJvfXQyDTg/UU= X-Received: by 2002:a19:7d82:: with SMTP id y124mr24616532lfc.76.1622705002663; Thu, 03 Jun 2021 00:23:22 -0700 (PDT) MIME-Version: 1.0 References: <20210602095836.24901-1-david.marchand@redhat.com> <20210602095836.24901-3-david.marchand@redhat.com> <20210603001919.7ea9c273@sovereign> In-Reply-To: <20210603001919.7ea9c273@sovereign> From: David Marchand Date: Thu, 3 Jun 2021 09:23:11 +0200 Message-ID: To: Dmitry Kozlyuk Cc: dev , 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" On Wed, Jun 2, 2021 at 11:19 PM Dmitry Kozlyuk wrote: > > 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. I noticed. But I am not sure the current API is abstracted enough since we pass a firmware filename. > > [...] > > 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. Frankly, I just copied the logic already present in config/meson.build. If there is better to do, please advise. > > > 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. Yep, already fixed in my local branch. Thanks. -- David Marchand