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 8C68AA0A0F; Mon, 5 Jul 2021 08:54:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B80840686; Mon, 5 Jul 2021 08:54:25 +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 75F5540141 for ; Mon, 5 Jul 2021 08:54:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625468062; 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=rvNa8bc9VAgazR9X5bKQIL5gnxaa2OE63FstBQn7xZc=; b=I8mmO0aQOSPjw0zvDRnB47ynXG4hNZxFGUSolcslx8kmKFvGdmVs4BJpJ2nDCXiwX4f+mx bVLT/VXi4p7QJ3qEYitDcX//Fh6VwSoSzLHeCz+6xim0CKINbN1A0LgRduGCeOk143suYp q6xbgO6DrfUVwv51t14AdPrkLwRoZ5s= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-508-G46MfOyIMQeDxUbxLtFFZA-1; Mon, 05 Jul 2021 02:54:21 -0400 X-MC-Unique: G46MfOyIMQeDxUbxLtFFZA-1 Received: by mail-ua1-f70.google.com with SMTP id 34-20020a9f20250000b0290299365741bfso4559909uam.2 for ; Sun, 04 Jul 2021 23:54:21 -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=rvNa8bc9VAgazR9X5bKQIL5gnxaa2OE63FstBQn7xZc=; b=H1h7A6Dg+HFWvrtU9KqePJwdZMxO0k31GwiZN5o7HNkZyYDuSXdrCzIpk2hv+2D82O hq1Wu/fWcH5KgArtiyAcbo95S0PegjqNstbYkqhQnaj2xFQyD5DKrXohqChz7rgy5i2d thNXbG5GtQmIYFB8Pacz4gAE9Ut/NcMF9OOTGC0VRAgxYHpV5WmhyrLMqTAXawZ/SAXw MaJnZ4VjLZXQhYel3DnGF1AA3JMSUE2Eb+T83icVQbBkj+5ZPbT9XkokSv1PBlLEIP/B H1vj1n7UiZgVPIttkLxt6CtNiNHjKCk+AQvGqXjIw8KbKxhf8c2CPuIVNnNEBcY5an9q ncEA== X-Gm-Message-State: AOAM530VnlK+SR/GDGPNxoqRqgLaVKRR1PZw3VtjH8389B6CRQ2EPimo RZWi4mxt3Jiijmq1NvrYiyo+8Vv4OrOhTEmVcPygFO4SmpgnwJNrvQU8hBEgqKcIB+NyeppHtEO BIPytWazS2gd9GO3ZfIE= X-Received: by 2002:ab0:1484:: with SMTP id d4mr8783248uae.86.1625468061443; Sun, 04 Jul 2021 23:54:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiiShP+xAVwouTIrGe9pUDWhMDSzFVTWeJy9rGJ9M88U44z5c9IFoW6rGCW/J0Wtihmy1BbMwcfmNDpKDObXg= X-Received: by 2002:ab0:1484:: with SMTP id d4mr8783231uae.86.1625468061205; Sun, 04 Jul 2021 23:54:21 -0700 (PDT) MIME-Version: 1.0 References: <20210602095836.24901-1-david.marchand@redhat.com> <20210629080632.30964-1-david.marchand@redhat.com> <20210629080632.30964-3-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Mon, 5 Jul 2021 08:54:10 +0200 Message-ID: To: "Wang, Haiyue" Cc: "dev@dpdk.org" , Igor Russkikh , Aaron Conole , Michael Santana , "Richardson, Bruce" , Rasesh Mody , Shahed Shaikh , "Yang, Qiming" , "Zhang, Qi Z" , Heinrich Kuhn , Devendra Singh Rawat , Ray Kinsella , Neil Horman , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , "Kadam, Pallavi" 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 v3 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 Mon, Jul 5, 2021 at 8:35 AM Wang, Haiyue wrote: > > +int > > +rte_firmware_read(const char *name, void **buf, size_t *bufsz) > > +{ > > + char path[PATH_MAX]; > > + int ret; > > + > > + ret = firmware_read(name, buf, bufsz); > > + if (ret < 0) { > > + snprintf(path, sizeof(path), "%s.xz", name); > > + path[PATH_MAX - 1] = '\0'; > > +#ifndef RTE_HAS_LIBARCHIVE > > + if (access(path, F_OK) == 0) { > > + RTE_LOG(WARNING, EAL, "libarchive not available, %s cannot be decompressed\n", > > + path); > > + } > > +#else > > + ret = firmware_read(path, buf, bufsz); > > +#endif > > + } > > + return ret; > > +} > > > Since ice PMD needs to check if the firmware file with different name can be accessed > by some kind of order, before doing the final firmware selection. Should we also add > the firmware access API for handling this ? I don't see the need. Is the behavior changed for net/ice with this patch? -- David Marchand