[PATCH v1 02/34] ml/cnxk: drop use of RTE API for firmware read
David Marchand
david.marchand at redhat.com
Thu Sep 21 14:52:34 CEST 2023
On Thu, Sep 21, 2023 at 2:08 PM Jerin Jacob <jerinjacobk at gmail.com> wrote:
>
> On Wed, Aug 30, 2023 at 9:40 PM Srikanth Yalavarthi
> <syalavarthi at marvell.com> wrote:
> >
> > Dropped use of rte_firmware_read API to read ML firmware
> > binary. When DPDK is built with libarchive aaupport, the
> > the RTE API assumes the binary file as a compressed
The rte_firmware API supports both xz-compressed and uncompressed files.
Otherwise, it would break loading net/ice on systems where
/lib/firmware content is uncompressed (which is still the case in some
Linux distributions).
To convince myself, I wrote a quick tool ("./archive" below) that
outputs in hexa the content of a file, with the same libarchive calls.
With a xz-compressed file:
$ hexdump -C /lib/firmware/intel/ice/ddp/ice.pkg.xz | head -1
00000000 fd 37 7a 58 5a 00 00 01 69 22 de 36 02 00 21 01 |.7zXZ...i".6..!.|
$ ./archive /lib/firmware/intel/ice/ddp/ice.pkg.xz | head -1
00000000: 01 00 00 00 05 00 00 00 1C 00 00 00 70 00 00 00 | ............p...
Uncompressing this file, and passing it to the same tool:
$ hexdump -C ice.pkg | head
00000000 01 00 00 00 05 00 00 00 1c 00 00 00 70 00 00 00 |............p...|
$ ./archive ice.pkg | head
00000000: 01 00 00 00 05 00 00 00 1C 00 00 00 70 00 00 00 | ............p...
For the record, I am using:
$ rpm -q libarchive
libarchive-3.6.1-3.fc37.x86_64
> > archive. This causes the ML firmware binary to be parsed
> > incorrectly.
>
> + @David Marchand rte_firmware_read() author for his opinions
/lib/firmware/mlip-fw.bin does not seem to be something packaged in
Fedora, and I found no trace in linux-firmware repo, so I can't
reproduce your issue.
Please add some debug and give more details about the issue you are facing.
--
David Marchand
More information about the dev
mailing list