> -----Original Message-----
> From: David Marchand <david.march...@redhat.com>
> Sent: 21 September 2023 18:23
> To: Jerin Jacob <jerinjac...@gmail.com>; Srikanth Yalavarthi
> <syalavar...@marvell.com>
> Cc: Prince Takkar <ptak...@marvell.com>; dev@dpdk.org; Shivah Shankar
> Shankar Narayan Rao <sshankarn...@marvell.com>; Anup Prabhu
> <apra...@marvell.com>
> Subject: [EXT] Re: [PATCH v1 02/34] ml/cnxk: drop use of RTE API for
> firmware read
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Thu, Sep 21, 2023 at 2:08 PM Jerin Jacob <jerinjac...@gmail.com> wrote:
> >
> > On Wed, Aug 30, 2023 at 9:40 PM Srikanth Yalavarthi
> > <syalavar...@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.

The "/lib/firmware/mlip-fw.bin" is Marvell's ML firmware binary. This file is 
in un-compressed form.

When DPDK is built without libarchive support, No issues are observed with 
using  rte_firmware_read to load the firmware file as open and read system 
calls are used.

When libarchive support is enabled, rte_firmware_read tries to parse the 
firmware binary as an xz archive. Since the file is not an archive, this step 
is failing.

Hence, added new ML driver function to read the firmware binary.

> 
> 
> --
> David Marchand

Reply via email to