Bug 1437 - [dpdk-24.07] DPDK should adapt ICE DDP package search path on ubuntu24.04?
Summary: [dpdk-24.07] DPDK should adapt ICE DDP package search path on ubuntu24.04?
Status: RESOLVED FIXED
Alias: None
Product: DPDK
Classification: Unclassified
Component: other (show other bugs)
Version: 24.07
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: David Marchand
URL:
Depends on:
Blocks:
 
Reported: 2024-05-07 12:27 CEST by jiang,yu
Modified: 2024-05-17 19:02 CEST (History)
2 users (show)



Attachments
0001-eal-unix-support-ZSTD-compression-for-firmwares.patch (2.67 KB, patch)
2024-05-07 13:03 CEST, David Marchand
Details | Diff

Description jiang,yu 2024-05-07 12:27:44 CEST
[Environment]

DPDK version: 24.07.0-rc0
OS: Ubuntu 24.04 LTS (Noble Numbat); 6.8.0-31-generic
Compiler: gcc version 13.2.0
Hardware platform: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz
NIC hardware & NIC firmware: 
    root@dut245:~/dpdk# ethtool -i ens801f0np0
    driver: ice
    version: 6.8.0-31-generic
    firmware-version: 4.30 0x80019938 1.3403.0

[Test Setup]
Steps to reproduce
List the steps to reproduce the issue.

1.Bind 1 port to vfio-pci driver:

dpdk-devbind.py --force --bind=vfio-pci 0000:4b:00.0

2.Start dpdk-testpmd as the following command:

x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 5-7 -n 8 -a 0000:4b:00.0 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1'  --force-max-simd-bitwidth=512   -- -i --nb-cores=2 --txd=1024 --rxd=1024
dut.10.239.252.245_vhost-user: EAL: Detected CPU lcores: 80
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/vhost/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(4)
EAL: Probe PCI driver: net_ice (8086:1592) device: 0000:4b:00.0 (socket 0)
ice_load_pkg(): failed to search file path
 
ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode
EAL: Releasing PCI mapped resource for 0000:4b:00.0
EAL: Calling pci_unmap_resource for 0000:4b:00.0 at 0x2101000000
EAL: Calling pci_unmap_resource for 0000:4b:00.0 at 0x2103000000
EAL: Requested device 0000:4b:00.0 cannot be used
EAL: Bus (pci) probe failed.
Interactive-mode selected


[Trace log]
DPDK code:
root@dut245:~/dpdk# grep -nr ICE_PKG_FILE_DEFAULT *
drivers/net/ice/ice_ethdev.h:50:#define ICE_PKG_FILE_DEFAULT 

/* DDP package search path */
#define ICE_PKG_FILE_DEFAULT "/lib/firmware/intel/ice/ddp/ice.pkg.zst"
#define ICE_PKG_FILE_UPDATES "/lib/firmware/updates/intel/ice/ddp/ice.pkg.zst"
#define ICE_PKG_FILE_SEARCH_PATH_DEFAULT "/lib/firmware/intel/ice/ddp/"
#define ICE_PKG_FILE_SEARCH_PATH_UPDATES "/lib/firmware/updates/intel/ice/ddp/"


Server's actual file name as below:
root@dut245:~/dpdk# ll /lib/firmware/intel/ice/ddp/
total 40
drwxr-xr-x 2 root root  4096 May  7 10:55 ./
drwxr-xr-x 6 root root  4096 May  7 10:55 ../
-rw-r--r-- 1 root root 30847 Apr  9 22:14 ice-1.3.36.0.pkg.zst
lrwxrwxrwx 1 root root    20 Apr  9 22:14 ice.pkg.zst -> ice-1.3.36.0.pkg.zst
root@dut245:~/dpdk#

[Expected Result]
Start dpdk-testpmd successed and no error info. 


[Regression]
Is this issue a regression: (N)
The first time to test on Ubuntu 24.04.
Comment 1 Bruce Richardson 2024-05-07 12:41:26 CEST
Firmware files appear to be compressed now. Need to add decompression support to our drivers.
Comment 2 David Marchand 2024-05-07 13:03:33 CEST
Created attachment 280 [details]
0001-eal-unix-support-ZSTD-compression-for-firmwares.patch
Comment 3 David Marchand 2024-05-07 13:04:07 CEST
Can you have a try with this patch?
I only checked compilation, so it might be broken, but I think you can figure out how to make it work.

Thanks.
Comment 4 Bruce Richardson 2024-05-07 18:48:11 CEST
Patch works for me with one small change - file suffix for the zstd-compressed files on ubuntu is ".zst", i.e. no "d". With that very minor change, patch works.
Comment 5 jiang,yu 2024-05-08 04:49:58 CEST
Build dpdk failed:
[75/2926] Compiling C object lib/librte_eal.a.p/eal_unix_eal_firmware.c.o
FAILED: lib/librte_eal.a.p/eal_unix_eal_firmware.c.o
gcc -Ilib/librte_eal.a.p -Ilib -I../lib -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE -fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation '-DABI_VERSION="24.2"' -DRTE_LOG_DEFAULT_LOGTYPE=lib.eal -MD -MQ lib/librte_eal.a.p/eal_unix_eal_firmware.c.o -MF lib/librte_eal.a.p/eal_unix_eal_firmware.c.o.d -o lib/librte_eal.a.p/eal_unix_eal_firmware.c.o -c ../lib/eal/unix/eal_firmware.c
In file included from ../lib/eal/unix/eal_firmware.c:13:
../lib/eal/unix/eal_firmware.c: In function ‘rte_firmware_read’:
../lib/eal/unix/eal_firmware.c:164:41: error: ‘compression_algorithms’ undeclared (first use in this function)
  164 |                 for (i = 0; i < RTE_DIM(compression_algorithms); i++) {
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_common.h:719:34: note: in definition of macro ‘RTE_DIM’
  719 | #define RTE_DIM(a)      (sizeof (a) / sizeof ((a)[0]))
      |                                  ^
../lib/eal/unix/eal_firmware.c:164:41: note: each undeclared identifier is reported only once for each function it appears in
  164 |                 for (i = 0; i < RTE_DIM(compression_algorithms); i++) {
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_common.h:719:34: note: in definition of macro ‘RTE_DIM’
  719 | #define RTE_DIM(a)      (sizeof (a) / sizeof ((a)[0]))
      |                                  ^
[156/2926] Compiling C object lib/librte_ethdev.a.p/ethdev_rte_ethdev.c.o
Comment 6 Bruce Richardson 2024-05-08 09:23:57 CEST
Hi Jiang,

patch may not have applied correctly for you. "compression_algorithms" is declared as a global at the top of the file in the patch. Patch compiles ok for me, and works with the one minor change made as I describe.
Comment 7 David Marchand 2024-05-08 11:11:50 CEST
This is a problem in the patch when libarchive is not available, I'll fix it. For now make sure to install pkg-config and libarchive-dev.
Comment 8 David Marchand 2024-05-17 19:02:30 CEST
Fixed in 6f80df8cb0f8 ("eal/unix: support ZSTD compression for firmware").

Note You need to log in before you can comment on or make changes to this bug.