Netronome / nfp-drv-kmods

Drivers for Netronome Flow Processor devices, including the NFP4xxx and NFP6xxx models.
Other
32 stars 14 forks source link

loading flower firmware error #2

Closed williamtu closed 6 years ago

williamtu commented 6 years ago

Hi, In my system with kernel 4.15.0-rc3+, the nfp driver loads without any problem when using firmware file /lib/firmware/netronome/nic/nic_AMDA0099-0001_2x25.nffw. then I'm trying to load the flower firmware, first I switch to use the firmware file under "flower" folder, instead of the file under "nic" folder (see last line)

root@ovs-smartnic:/lib/firmware/netronome# tree
.
|-- flower
|   |-- nic_AMDA0081-0001_1x40.nffw -> nic_AMDA0097.nffw
|   |-- nic_AMDA0081-0001_4x10.nffw -> nic_AMDA0097.nffw
|   |-- nic_AMDA0096-0001_2x10.nffw -> nic_AMDA0096.nffw
|   |-- nic_AMDA0096.nffw
|   |-- nic_AMDA0097-0001_2x40.nffw -> nic_AMDA0097.nffw
|   |-- nic_AMDA0097-0001_4x10_1x40.nffw -> nic_AMDA0097.nffw
|   |-- nic_AMDA0097-0001_8x10.nffw -> nic_AMDA0097.nffw
|   |-- nic_AMDA0097.nffw
|   |-- nic_AMDA0099-0001_2x10.nffw -> nic_AMDA0099.nffw
|   |-- nic_AMDA0099-0001_2x25.nffw -> nic_AMDA0099.nffw
|   `-- nic_AMDA0099.nffw
|-- nic
|   |-- nic_AMDA0081-0001_1x40.nffw
|   |-- nic_AMDA0081-0001_4x10.nffw
|   |-- nic_AMDA0096-0001_2x10.nffw
|   |-- nic_AMDA0097-0001_2x40.nffw
|   |-- nic_AMDA0097-0001_4x10_1x40.nffw
|   |-- nic_AMDA0097-0001_8x10.nffw
|   |-- nic_AMDA0099-0001_2x10.nffw
|   `-- nic_AMDA0099-0001_2x25.nffw
|-- nic_AMDA0081-0001_1x40.nffw -> nic/nic_AMDA0081-0001_1x40.nffw
|-- nic_AMDA0081-0001_4x10.nffw -> nic/nic_AMDA0081-0001_4x10.nffw
|-- nic_AMDA0096-0001_2x10.nffw -> nic/nic_AMDA0096-0001_2x10.nffw
|-- nic_AMDA0097-0001_2x40.nffw -> nic/nic_AMDA0097-0001_2x40.nffw
|-- nic_AMDA0097-0001_4x10_1x40.nffw -> nic/nic_AMDA0097-0001_4x10_1x40.nffw
|-- nic_AMDA0097-0001_8x10.nffw -> nic/nic_AMDA0097-0001_8x10.nffw
|-- nic_AMDA0099-0001_2x10.nffw -> nic/nic_AMDA0099-0001_2x10.nffw
`-- nic_AMDA0099-0001_2x25.nffw -> flower/nic_AMDA0099-0001_2x25.nffw

then reload the nfp.ko, but encountered this error

[  121.588146] nfp 0000:02:00.0: Netronome Flow Processor NFP4000/NFP6000 PCIe Card Probe
[  121.588205] nfp 0000:02:00.0: RESERVED BARs: 0.0: General/MSI-X SRAM, 0.1: PCIe XPB/MSI-X PBA, 0.4: Explicit0, 0.5: Explicit1, free: 20/24
[  121.588302] nfp 0000:02:00.0: Model: 0x40010010, SN: 00:15:4d:12:1c:37, Ifc: 0x10ff
[  121.610254] nfp 0000:02:00.0: Assembly: SMAAMDA0099-000117070669-07 CPLD: 0x3010000
[  121.896088] nfp 0000:02:00.0: BSP: 020014.020014.02004e
[  121.896091] nfp 0000:02:00.0: nfp: Looking for firmware file in order of priority:
[  121.910814] nfp 0000:02:00.0: nfp:   netronome/serial-00-15-4d-12-1c-37-10-ff.nffw: not found
[  121.910828] nfp 0000:02:00.0: nfp:   netronome/pci-0000:02:00.0.nffw: not found
[  121.946499] nfp 0000:02:00.0: nfp:   netronome/nic_AMDA0099-0001_2x25.nffw: found, loading...
[  121.946502] nfp 0000:02:00.0: Soft-reset, loading FW image
[  142.380073] nfp 0000:02:00.0: Finished loading FW image
[  142.439076] nfp 0000:02:00.0: nfp: failed to find app with ID 0x03
[  145.676076] nfp 0000:02:00.0: Firmware safely unloaded
[  145.676350] nfp: probe of 0000:02:00.0 failed with error -22

Am I missing some configurations? thanks

If I switch back to firmware file under nic, the successful driver loading

[ 1278.262278] nfp 0000:02:00.0: Netronome Flow Processor NFP4000/NFP6000 PCIe Card Probe
[ 1278.262350] nfp 0000:02:00.0: RESERVED BARs: 0.0: General/MSI-X SRAM, 0.1: PCIe XPB/MSI-X PBA, 0.4: Explicit0, 0.5: Explicit1, free: 20/24
[ 1278.262442] nfp 0000:02:00.0: Model: 0x40010010, SN: 00:15:4d:12:1c:37, Ifc: 0x10ff
[ 1278.284149] nfp 0000:02:00.0: Assembly: SMAAMDA0099-000117070669-07 CPLD: 0x3010000
[ 1278.572096] nfp 0000:02:00.0: BSP: 020014.020014.02004e
[ 1278.572099] nfp 0000:02:00.0: nfp: Looking for firmware file in order of priority:
[ 1278.572140] nfp 0000:02:00.0: nfp:   netronome/serial-00-15-4d-12-1c-37-10-ff.nffw: not found
[ 1278.572152] nfp 0000:02:00.0: nfp:   netronome/pci-0000:02:00.0.nffw: not found
[ 1278.572624] nfp 0000:02:00.0: nfp:   netronome/nic_AMDA0099-0001_2x25.nffw: found, loading...
[ 1278.572626] nfp 0000:02:00.0: Soft-reset, loading FW image
[ 1293.732078] nfp 0000:02:00.0: Finished loading FW image
[ 1293.764732] nfp 0000:02:00.0 eth0: Netronome NFP-6xxx Netdev: TxQs=16/32 RxQs=8/32
[ 1293.764734] nfp 0000:02:00.0 eth0: VER: 0.0.3.5, Maximum supported MTU: 9216
[ 1293.764737] nfp 0000:02:00.0 eth0: CAP: 0x78140233 PROMISC RXCSUM TXCSUM GATHER TSO2 RSS2 AUTOMASK IRQMOD RXCSUM_COMPLETE 

thank you

kuba-moo commented 6 years ago

You can check your kernel config:

$ grep NFP_APP_FLOWER .config
CONFIG_NFP_APP_FLOWER=y

My bet would be it's not selected because of missing CONFIG_NET_SWITCHDEV support, flower depends on switchdev.

williamtu commented 6 years ago

thanks! I will test it next week and get back to you.