Message ID | 20210602095836.24901-1-david.marchand@redhat.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1F76A0524; Wed, 2 Jun 2021 11:58:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA9494069F; Wed, 2 Jun 2021 11:58:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 22B8E40689 for <dev@dpdk.org>; Wed, 2 Jun 2021 11:58:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622627928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mtL0y86tztxz+I+SFDZ30RuAtcFgLdpOE3yDSmHzmMo=; b=YQfzO0eMoNoPhIzdmiySh/O2OvBNJgF63QGJUpNKrW862IYrckigK980unAzQiGH/vfGJq Bkzi21iHLN2D7rEiAnt2kBVoYtKQFVDynI2P6Z6laMzhz9SlmHqS+2bdDCLeggB18N9wY0 FFOxYG3GEoO1nXZgBk0BvfwcF0QGECc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-0D9svzGyMWasJMIb5LfwLg-1; Wed, 02 Jun 2021 05:58:45 -0400 X-MC-Unique: 0D9svzGyMWasJMIb5LfwLg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FE41501EC for <dev@dpdk.org>; Wed, 2 Jun 2021 09:58:44 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0BB6A19CAB for <dev@dpdk.org>; Wed, 2 Jun 2021 09:58:43 +0000 (UTC) From: David Marchand <david.marchand@redhat.com> To: dev@dpdk.org Date: Wed, 2 Jun 2021 11:58:34 +0200 Message-Id: <20210602095836.24901-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH 0/2] Support compressed firmwares X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
Support compressed firmwares
|
|
Message
David Marchand
June 2, 2021, 9:58 a.m. UTC
Fedora 34 only provides compressed firmwares. Introduce an internal driver helper to handle transparently compression. I chose libarchive for decompressing as it seems widely available and DPDK had used it in the past. Windows support only matters for net/ice and firmware loading was skipped in this driver before this series. Since I don't know if/how we want to load firmwares on Windows, I let an empty stub for this OS. This series has been compile tested on Linux (I'll trust the CI for others OSes). I only tested basic init with a net/ice device (no DCF test). So please drivers maintainers, check nothing is broken.
Comments
> Fedora 34 only provides compressed firmwares. > > Introduce an internal driver helper to handle transparently compression. > > I chose libarchive for decompressing as it seems widely available and > DPDK had used it in the past. > > Windows support only matters for net/ice and firmware loading was skipped > in this driver before this series. Since I don't know if/how we want to > load firmwares on Windows, I let an empty stub for this OS. > > This series has been compile tested on Linux (I'll trust the CI for > others OSes). > I only tested basic init with a net/ice device (no DCF test). > > So please drivers maintainers, check nothing is broken. Hi David, We (Marvell QED) already provide packed version of FW in linux-firmware: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qed But thats a custom name, and zlib. I'm just wondering if its a good solution to try transparently load .xz variant? User may not expect that. M.b. through this api, give a driver an option to specify archive format? Or even autodetect it from content? Regards, Igor
On Wed, Jun 2, 2021 at 12:38 PM Igor Russkikh <irusskikh@marvell.com> wrote: > We (Marvell QED) already provide packed version of FW in linux-firmware: > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qed > > But thats a custom name, and zlib. Whatever binary blob is available in linux-firmware upstream repo, it ends up compressed on Fedora 34 (and later). # fc33 https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115649&filename=/usr/lib/firmware/qed/qed_init_values-8.10.9.0.bin https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115649&filename=/usr/lib/firmware/qed/qed_init_values_zipped-8.10.10.0.bin # fc34 https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115322&filename=/usr/lib/firmware/qed/qed_init_values-8.10.9.0.bin.xz https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115322&filename=/usr/lib/firmware/qed/qed_init_values_zipped-8.10.10.0.bin.xz # fc35 https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115234&filename=/usr/lib/firmware/qed/qed_init_values-8.10.9.0.bin.xz https://koji.fedoraproject.org/koji/fileinfo?rpmID=26115234&filename=/usr/lib/firmware/qed/qed_init_values_zipped-8.10.10.0.bin.xz Did you try the qede pmd on fc34? > > I'm just wondering if its a good solution to try transparently load .xz variant? The linux kernel (since v5.2, I think) uncompresses this transparently without kernel drivers knowing. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=82fd7a8142a10b8eb41313074b3859d82c0857dc > User may not expect that. M.b. through this api, give a driver an option to specify > archive format? Or even autodetect it from content? User should (do ?) not care about firmwares, only drivers do. If not doing transparently, each driver will have to implement (or ask a common helper for) support of compressed blobs. While this issue is common to all drivers. As for autodetecting compression, libarchive can do this, I added only xz support because this is the only supported compression in the Linux kernel loader.
On 6/2/2021 1:05 PM, David Marchand wrote: > On Wed, Jun 2, 2021 at 12:38 PM Igor Russkikh <irusskikh@marvell.com> wrote: >> We (Marvell QED) already provide packed version of FW in linux-firmware: >> >> But thats a custom name, and zlib. > > Whatever binary blob is available in linux-firmware upstream repo, it > ends up compressed on Fedora 34 (and later). > > Did you try the qede pmd on fc34? Got it, thanks. No, have not tried, but think qede pmd will fail now on fedora without your patch. > The linux kernel (since v5.2, I think) uncompresses this transparently > without kernel drivers knowing. Was not aware of that, thanks. In that perspective your patch fits good with the existing linux kernel behavior, agree. Adding more people from my team. Regards, Igor