Networking NVIDIA Firmware Tools (MFT) Documentation

resourcedump Utility

The resourcedump tool extracts and prints data segments generated by the firmware. It is supported in 5th generation NIC’s devices. The dump output is used by NVIDIA for debug and troubleshooting.

Scapy and Pyverbs are no longer resourcedump dependencies. The same functionality has been changed with a C code that is based on the RDMA core included in OFED (v5.7 and up) or Upstream (Kernel v5.14 and up).

mstresourcedump can be used only if Python 3.x is installed. Using lower versions will result in tool's failure.

To use the memory mode, the user must install the MLNX_OFED driver version that includes the rdma-core package, and in addition, must install the scapy package.

It is important for the user to generate a bin file for debugging and troubleshooting cases when needed by NVIDIA.

If the firmware version used is not supported, the tool will generate the following error message:
“Error: Failed to fetch query data with exception: Failed to send Register RESOURCE DUMP with rc: 515. Exiting...”.

resourcedump Usage

resourcedump [-h] [-v] {dump,query} 

where

dump

Dump command

query

Query command

-h, --help

Show help message and exit

-v, --version

Shows tool version and exit

resourcedump query Usage 
resourcedump query [-h] [-v VIRTUAL_HCA_ID] [-m [MEM]] -d DEVICE

where

-h, --help

Show help message and exit

-v, --virtual-hca-id 

The virtual HCA (host channel adapter, NIC) ID

-d, --device

The device name

-m, --mem

Perform the dump through memory (OFED with rdma-core dependency).

Optionally accepts: [rdma device (for example "mlx5_4")]


An example of how to run the query command:

# resourcedump query --device /dev/mst/mt4119_pciconf0
__________________________________________________________________

                 Segment Type - 0x1300 (FULL_EQC)
                
Dump Params                        Applicability    Special Values
--------------------------------   --------------   --------------
index1 (EQN)                       Mandatory        N/A      
num-of-obj1                        N/A              N/A      
index2 (N/A)                       N/A              N/A      
num-of-obj2                        N/A              N/A      
__________________________________________________________________
__________________________________________________________________

                 Segment Type - 0x1000 (FULL_QPC)
                
Dump Params                        Applicability    Special Values
--------------------------------   --------------   --------------
index1 (QPN)                       Mandatory        N/A      
num-of-obj1                        N/A              N/A      
index2 (N/A)                       N/A              N/A      
num-of-obj2                        N/A              N/A      
…
…
…
resourcedump dump Usage
usage: resourcedump dump [-h] -d DEVICE -s SEGMENT [-v VIRTUAL_HCA_ID] [-i1 INDEX1]
[-i2 INDEX2][-n1 NUM_OF_OBJ1] [-n2 NUM_OF_OBJ2] [-de DEPTH] [-b BIN] [-m [MEM]] [PARSE_ARGUMENTS]

where

-h, --help

Show help message and exit

-v, --virtual-hca-id 

The virtual HCA (host channel adapter, NIC) ID

-i1, --index1

The first context index to dump (if supported for this segment)

-i2, --index2

The second context index to dump (if supported for this segment)

-n1, --num-of-obj1

The number of objects to be dumped (if supported for this segment). accepts: ["all", "active", number, depends on the capabilities]

-n2, --num-of-obj2

The number of objects to be dumped (if supported for this segment). accepts: ["all", "active", number, depends on the capabilities]

-de, --depth

The depth of walking through reference segments. 0 stands for flat, 1 allows crawling of a single layer down the struct, etc. "inf" for all

-b, --bin

The output to a binary file that replaces the default print in hexadecimal, a readable format

-d, --device

The device name

-s, --segment

The segment to dump

-m, --mem

Perform the dump through memory (OFED with rdma-core dependency).

Optionally accepts: [rdma device (for example "mlx5_4")]

The dumped segments can be parsed in the same run, by resourceparse arguments placed after the dump arguments (see resourceparse Utility):

resourcedump dump ... [-p RESOURCE_PARSER] [-f FORMATTER] [-o OUT | --out-dir OUT_DIR] [PARSE_METHOD_ARGUMENTS]

where

-p, --parser

The parsing method. Available options: ['adb', 'map', 'cm', 'raw', 'menu']. Default: 'raw', which prints the data of each segment in hex-view

-f, --formatter

Available options: ['basic', 'pcie-events', 'pcie-events-json']. Default: 'basic'. A formatter other than 'basic' requires the adb parsing method (-p adb -a ADB_FILE)

-o, --out

Location of the output file

--out-dir

Location of the output directory, a separate file is created for each segment (basic formatter only)

-a, --adb-file

Location of the ADB file (adb parsing method)

-c, --csv-file

Location of the mstdump-style CSV file describing the addresses, either a ".csv" or a compressed ".csv.xz" file (cm parsing method)

-r, --raw

Prints the raw data in addition to the parsed data (basic formatter only)

--hide-segment-header

Hide segment header during printing (basic formatter only)


Examples of how to:

  • Run the dump command: 

    # resourcedump dump --device /dev/mst/mt4119_pciconf0 --segment 0x1200 --index1 0x404 --depth 0
    Found 10 segments:                                                                                                                                                                     
    -------------------------------------------                                                                                                                                            
    Segment Type: 0xfffe                                                                                                                                                                   
    Segment Size: 16 Bytes                                                                                                                                                                 
    Segment Data:                                                                                                                                                                          
    0x0004FFFE 0x00000000 0x00000000 0x101A0111                                                                                                                                            
    -------------------------------------------                                                                                                                                            
    Segment Type: 0xfffa                                                                                                                                                                   
    Segment Size: 20 Bytes                                                                                                                                                                 
    Segment Data:                                                                                                                                                                          
    0x0005FFFA 0x12000000 0x00000404 0x00000000                                                                                                                                            
    0x00000000                                                                                                                                                                             
    -------------------------------------------
    
  • Run the Dump command and save it in bin file: 

    # resourcedump dump --device /dev/mst/mt4119_pciconf0 --segment 0x1200 --index1 0x404 --depth 0 -–bin segment_1200.bin
    write to file:  segment_1200.bin
    
    
  • Run the dump command and present the PCIe event log: 

    # resourcedump dump --device /dev/mst/mt4131_pciconf0 --segment PCIE_EVENTS --parser adb --adb-file /usr/lib64/mft/python_tools/nvpcie/data/pcie_event.adb --formatter pcie-events
    

Last updated: