背景
Mellanox网卡早期版本以及Engineer simple的DPU支持导出配置文件,该配置文件就是用来告诉firmware的行为。但不是mlxconfig真正设置的文件(mlxconfig -d xxx -e -q应该就是把这个文件读取出来,并且有3个文件,包括默认的,当前的,下次启动的) 。而是生成fw镜像文件使用的配置。理解这个配置文件的作用是能够更底层的辅助理解高性能网卡底底层实现架构
命令
flint -d 06:00.0 dc
说明:
效果:
实战数据
可以看到分了很多域段,根据格式看是使用INI配置文件格式,并且看里面的 iniprep tool
,应该是一个ini prepare的工具,打印包括了[]区分的节[SectionName]
,键值对key=value
,以及注释; This is a commen
以及另外一种注释方式# This is also a comment
节包括了8个节:
可以看到包括了:
- psid的数据:
psid = MT_0000000809
,关于PSID是什么参考兄弟篇:https://blog.csdn.net/essencelite/article/details/138429032 - name:就是型号
MBF2M345A-VENOT_ES_Ax
- 以及psid的描述:
NVIDIA BlueField-2 E-Series Eng. sample DPU; 200GbE single-port QSFP56; PCIe Gen4 x16; Secure Boot Disabled; Crypto Enabled; 16GB on-board DDR; 1GbE OOB management
(这就是flint和mlxfw工具读取的数据
其他详细看举例:
fw_boot_config 节
- 比如nv_config.global.pci.settings.num_pfs = 0x1, pf的数量
- nv_config.global.emulation_nvme_conf.nvme_emu_enable是否开启nvme的emu
hw_boot_config 节
- 比如 pcie_cfg.pcie_max_speed_supported = 0xf最大速度
[root@one rshim1]# flint -d 06:00.0 dc
;; Generated automatically by iniprep tool on Sun Feb 04 12:18:03 IST 2024 from ./Bluefield-2_MBF2M345A_1p_200g_eth_crypto_ES.prs;; FW version: 24.40.1000
;; Mellanox Technologies LTD
;;[PS_INFO]
;;Name = MBF2M345A-VENOT_ES_Ax
;;Description = NVIDIA BlueField-2 E-Series Eng. sample DPU; 200GbE single-port QSFP56; PCIe Gen4 x16; Secure Boot Disabled; Crypto Enabled; 16GB on-board DDR; 1GbE OOB management
[image_info]
;;;;; This section contains info which is shared by FW and burning tool
psid = MT_0000000809
name = MBF2M345A-VENOT_ES_Ax
description = NVIDIA BlueField-2 E-Series Eng. sample DPU; 200GbE single-port QSFP56; PCIe Gen4 x16; Secure Boot Disabled; Crypto Enabled; 16GB on-board DDR; 1GbE OOB management
prs_name = Bluefield-2_MBF2M345A_1p_200g_eth_crypto_ES.prs
[mfg_info]
guids.guids.num_allocated = 8
guids.macs.num_allocated = 8
[device_info]
guids.guids.num_allocated = 8
guids.macs.num_allocated = 8
[boot_record]
;;;;; 1. Boot record endianes: reserved1 is the fist Byte that should be written on the NVRAM (address 0);2. Each line is protected by parity bit (bit 31) the xor of the 32 read bits should be 1
arm.opn = MBF2M345A-VENOT_ES
arm.tile_cluster_disable = 0x00
[fw_boot_config]
;;;;; boot + iron fw config data
pcie_cfg_data.pci_cfg_space.cfg_hdr.device_id = 41686
pcie_cfg_data.pci_cfg_space.cfg_hdr.subsystem_id = 0x0085
multi_function.mac_for_bmc_required = 0
nv_config.global.pci.settings.num_pfs = 0x1
nv_config.global.pci.capabilities.max_num_pfs = 0x2
nv_config.global.pci.settings.log_vf_uar_bar_size = 0x0
nv_config.global.pci.settings.sriov_en = 1
nv_config.global.pci.settings.total_vfs = 8
nv_config.global.pci.settings.fpp_en = 1
nv_config.port[0].vpi.network_link_type_ib = 0x0
nv_config.port[0].vpi.network_link_type_eth = 0x1
nv_config.port[0].vpi.default_link_type_ib = 0x0
nv_config.port[0].vpi.default_link_type_eth = 0x1
multi_function.num_of_logical_ports = 1
nv_config.global.emulation_nvme_cap.nvme_emu_supported = 1
nv_config.global.emulation_nvme_cap.nvme_emu_max_num_pf = 2
nv_config.global.emulation_nvme_conf.nvme_emu_enable = 0
nv_config.global.emulation_nvme_conf.nvme_emu_num_pf = 1
nv_config.global.emulation_nvme_conf.nvme_emu_vendor_id = 0x15b3
nv_config.global.emulation_nvme_conf.nvme_emu_device_id = 0x6001
[fw_main_config]
management.bf_alarm_temp_thresh = 0x57
management.bf_relax_temp_thresh = 0x50
;;;;; plastic fw config data
phy_fw_main_config.phy_shomron.port0_width = 2
leds.port_leds_gt_mode = 1
leds.leds_high_low_speed_support = 0
leds.led_control_supported_by_mux = 0
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed1Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed10Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed25Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed40Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed50Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed50Gb_Pam4 = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed100Gb = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed100Gb_Pam4 = 0x1
phy_fw_main_config.phy_shomron.lcl[0].eth_speeds_supported.Speed200Gb = 0x1
host_management.ncsi_ini.num_channels_per_pkg = 1
host_management.ncsi_ini.supported_pkg_id = 0
host_management.ncsi_ini.rmii_en = 1
host_management.ncsi_ini.hw_arbitration_en = 0x1
host_management.ncsi_ini.num_of_bmc = 1
host_management.mctp_ini.smbus_enable = 0x4
host_management.mctp_ini.nic_slave_addr = 0x32
host_management.mctp_ini.nic_eid = 0
host_management.mctp_ini.pci_enable = 0x1
host_management.pldm_ini.pldm_supported_features.platform_event_message = 1
host_management.pldm_ini.pldm_supported_features.firmware_update = 1
host_management.pldm_ini.pldm_supported_features.redfish = 1
host_management.pldm_ini.pldm_sensor_rec_handle_en.rh_adapter_rde_pdr = 1
host_management.pldm_ini.pldm_sensor_rec_handle_en.rh_port_collection_rde_pdr = 1
host_management.pldm_ini.pldm_sensor_rec_handle_en.rh_dev_func_collection_rde_pdr = 1
host_management.pldm_ini.pldm_sensor_rec_handle_en.rh_port_rde_pdr = 1
host_management.pldm_ini.pldm_sensor_rec_handle_en.rh_dev_func_rde_pdr = 1
[hw_boot_config]
;;;;; boot and iron hw and board config data
pcie_cfg.pcie_max_width_supported = 0x10
pcie_cfg.pcie_max_speed_supported = 0xf
pcie_cfg.pcie_tx_polarity = 0xFFFF
multi_host_en = 0
socket_direct_en = 0
pcie_cfg.receiver_detect_en = 1
;;;;; gpios
;;;;; gpio ARM_PCIE_ERROR
gpios.functions.gpio_func[248].mapping= 523
gpios.functions.gpio_func[248].reverse_polarity= 0
gpios.configurations.gpios[523].gpio_config_en= 1
gpios.configurations.gpios[523].mode= 1
gpios.configurations.gpios[523].pull_up= 0
gpios.configurations.gpios[523].pull_en= 0
gpios.configurations.gpios[523].functional_enable= 0
;;;;; gpio ARM_INT_REQ
gpios.functions.gpio_func[188].mapping= 520
gpios.functions.gpio_func[188].reverse_polarity= 0
gpios.configurations.gpios[520].gpio_config_en= 1
gpios.configurations.gpios[520].mode= 1
gpios.configurations.gpios[520].pull_up= 0
gpios.configurations.gpios[520].pull_en= 0
gpios.configurations.gpios[520].functional_enable= 0
;;;;; gpio ARM_INT_ACK
gpios.functions.gpio_func[189].mapping= 521
gpios.functions.gpio_func[189].reverse_polarity= 0
gpios.configurations.gpios[521].gpio_config_en= 1
gpios.configurations.gpios[521].mode= 1
gpios.configurations.gpios[521].pull_up= 0
gpios.configurations.gpios[521].pull_en= 0
gpios.configurations.gpios[521].functional_enable= 0
;;;;; gpio ARM_BOOT_PROGRESS
gpios.functions.gpio_func[190].mapping= 512
gpios.functions.gpio_func[190].reverse_polarity= 0
gpios.configurations.gpios[512].gpio_config_en= 1
gpios.configurations.gpios[512].mode= 1
gpios.configurations.gpios[512].pull_up= 0
gpios.configurations.gpios[512].pull_en= 0
gpios.configurations.gpios[512].functional_enable= 0
gpios.configurations.gpios[513].gpio_config_en= 1
gpios.configurations.gpios[513].mode= 1
gpios.configurations.gpios[513].pull_up= 0
gpios.configurations.gpios[513].pull_en= 0
gpios.configurations.gpios[513].functional_enable= 0
gpios.configurations.gpios[514].gpio_config_en= 1
gpios.configurations.gpios[514].mode= 1
gpios.configurations.gpios[514].pull_up= 0
gpios.configurations.gpios[514].pull_en= 0
gpios.configurations.gpios[514].functional_enable= 0
gpios.configurations.gpios[515].gpio_config_en= 1
gpios.configurations.gpios[515].mode= 1
gpios.configurations.gpios[515].pull_up= 0
gpios.configurations.gpios[515].pull_en= 0
gpios.configurations.gpios[515].functional_enable= 0
gpios.configurations.gpios[516].gpio_config_en= 1
gpios.configurations.gpios[516].mode= 1
gpios.configurations.gpios[516].pull_up= 0
gpios.configurations.gpios[516].pull_en= 0
gpios.configurations.gpios[516].functional_enable= 0
gpios.configurations.gpios[517].gpio_config_en= 1
gpios.configurations.gpios[517].mode= 1
gpios.configurations.gpios[517].pull_up= 0
gpios.configurations.gpios[517].pull_en= 0
gpios.configurations.gpios[517].functional_enable= 0
gpios.configurations.gpios[518].gpio_config_en= 1
gpios.configurations.gpios[518].mode= 1
gpios.configurations.gpios[518].pull_up= 0
gpios.configurations.gpios[518].pull_en= 0
gpios.configurations.gpios[518].functional_enable= 0
gpios.configurations.gpios[519].gpio_config_en= 1
gpios.configurations.gpios[519].mode= 1
gpios.configurations.gpios[519].pull_up= 0
gpios.configurations.gpios[519].pull_en= 0
gpios.configurations.gpios[519].functional_enable= 0
;;;;; gpio ARM_SHDN_REQ
gpios.functions.gpio_func[208].mapping= 522
gpios.functions.gpio_func[208].reverse_polarity= 0
gpios.configurations.gpios[522].gpio_config_en= 1
gpios.configurations.gpios[522].mode= 1
gpios.configurations.gpios[522].pull_up= 0
gpios.configurations.gpios[522].pull_en= 0
gpios.configurations.gpios[522].functional_enable= 0
;;;;; gpio ARM_THERMAL_STATE
gpios.functions.gpio_func[245].mapping= 532
gpios.functions.gpio_func[245].reverse_polarity= 0
gpios.configurations.gpios[532].gpio_config_en= 1
gpios.configurations.gpios[532].mode= 1
gpios.configurations.gpios[532].def_val= 1
gpios.configurations.gpios[532].pull_up= 0
gpios.configurations.gpios[532].pull_en= 0
gpios.configurations.gpios[532].functional_enable= 0
;;;;; gpio ARM_THERMAL_STATE_VALID
gpios.functions.gpio_func[246].mapping= 535
gpios.functions.gpio_func[246].reverse_polarity= 0
gpios.configurations.gpios[535].gpio_config_en= 1
gpios.configurations.gpios[535].mode= 1
gpios.configurations.gpios[535].def_val= 0
gpios.configurations.gpios[535].pull_up= 0
gpios.configurations.gpios[535].pull_en= 0
gpios.configurations.gpios[535].functional_enable= 0
;;;;; gpio PRSNT
gpios.functions.gpio_func[1].mapping= 38
gpios.functions.gpio_func[1].reverse_polarity= 1
gpios.configurations.gpios[38].gpio_config_en= 1
gpios.configurations.gpios[38].mode= 0
gpios.configurations.gpios[38].pull_up= 1
gpios.configurations.gpios[38].pull_en= 1
gpios.configurations.gpios[38].functional_enable= 0
;;;;; gpio INT
gpios.functions.gpio_func[2].mapping= 21
gpios.functions.gpio_func[2].reverse_polarity= 1
gpios.configurations.gpios[21].gpio_config_en= 1
gpios.configurations.gpios[21].mode= 0
gpios.configurations.gpios[21].pull_up= 1
gpios.configurations.gpios[21].pull_en= 1
gpios.configurations.gpios[21].functional_enable= 0
;;;;; gpio RESET
gpios.functions.gpio_func[3].mapping= 33
gpios.functions.gpio_func[3].reverse_polarity= 1
gpios.configurations.gpios[33].gpio_config_en= 1
gpios.configurations.gpios[33].mode= 1
gpios.configurations.gpios[33].def_val= 0
gpios.configurations.gpios[33].pull_up= 1
gpios.configurations.gpios[33].pull_en= 1
gpios.configurations.gpios[33].functional_enable= 0
;;;;; gpio FAN_PWM_CTRL
gpios.functions.gpio_func[20].mapping= 42
gpios.functions.gpio_func[20].reverse_polarity= 0
gpios.configurations.gpios[42].gpio_config_en= 1
gpios.configurations.gpios[42].mode= 1
gpios.configurations.gpios[42].def_val= 0
gpios.configurations.gpios[42].pull_up= 0
gpios.configurations.gpios[42].pull_en= 1
gpios.configurations.gpios[42].functional_enable= 2
;;;;; gpio PWR_EN_PORT0
gpios.functions.gpio_func[26].mapping= 41
gpios.functions.gpio_func[26].reverse_polarity= 0
gpios.configurations.gpios[41].gpio_config_en= 1
gpios.configurations.gpios[41].mode= 1
gpios.configurations.gpios[41].def_val= 0
gpios.configurations.gpios[41].pull_up= 0
gpios.configurations.gpios[41].pull_en= 1
gpios.configurations.gpios[41].functional_enable= 0
;;;;; gpio PHY_LED_PORT0
gpios.functions.gpio_func[32].mapping= 0
gpios.functions.gpio_func[32].reverse_polarity= 1
gpios.configurations.gpios[0].gpio_config_en= 1
gpios.configurations.gpios[0].mode= 2
gpios.configurations.gpios[0].def_val= 1
gpios.configurations.gpios[0].pull_up= 1
gpios.configurations.gpios[0].pull_en= 1
gpios.configurations.gpios[0].functional_enable= 0
;;;;; gpio LOGIC_LED_PORT0
gpios.functions.gpio_func[34].mapping= 1
gpios.functions.gpio_func[34].reverse_polarity= 1
gpios.configurations.gpios[1].gpio_config_en= 1
gpios.configurations.gpios[1].mode= 2
gpios.configurations.gpios[1].def_val= 1
gpios.configurations.gpios[1].pull_up= 1
gpios.configurations.gpios[1].pull_en= 1
gpios.configurations.gpios[1].functional_enable= 0
;;;;; gpio WAKE0
gpios.functions.gpio_func[37].mapping= 13
gpios.functions.gpio_func[37].reverse_polarity= 1
gpios.configurations.gpios[13].gpio_config_en= 1
gpios.configurations.gpios[13].mode= 1
gpios.configurations.gpios[13].def_val= 1
gpios.configurations.gpios[13].pull_up= 1
gpios.configurations.gpios[13].pull_en= 1
gpios.configurations.gpios[13].functional_enable= 0
;;;;; gpio SOCKET_DIRECT_MULTI-HOST_STRAPPING
gpios.functions.gpio_func[55].mapping= 37
gpios.functions.gpio_func[55].reverse_polarity= 1
;;;;; gpio PERST0_ON_ASIC
gpios.functions.gpio_func[86].mapping= 36
gpios.functions.gpio_func[86].reverse_polarity= 1
gpios.configurations.gpios[36].gpio_config_en= 1
gpios.configurations.gpios[36].mode= 0
gpios.configurations.gpios[36].pull_up= 0
gpios.configurations.gpios[36].pull_en= 1
;;;;; gpio FAN_TACHO
gpios.functions.gpio_func[100].mapping= 43
;;;;; gpio LOW_PWR_PORT0
gpios.functions.gpio_func[126].mapping= 32
;;;;; gpio PWR_GOOD_P0
gpios.functions.gpio_func[135].mapping= 40
gpios.functions.gpio_func[135].reverse_polarity= 0
gpios.configurations.gpios[40].gpio_config_en= 1
gpios.configurations.gpios[40].mode= 0
gpios.configurations.gpios[40].pull_up= 1
gpios.configurations.gpios[40].pull_en= 1
gpios.configurations.gpios[40].functional_enable= 0
[hw_main_config]
;;;;; plastic hw and board config data
boards_management.board_power_consumption_1p = 31800
;;;;; modules
;;;;; module 0
module.num[0].label_port= 1
module.num[0].type= 1
module.num[0].m2l.tx.lane[0].serdes= 7
module.num[0].m2l.rx.lane[0].serdes= 4
module.num[0].m2l.tx.lane[0].polarity= 1
module.num[0].m2l.rx.lane[0].polarity= 0
module.num[0].m2l.rx.lane[0].local_lane = 0
module.num[0].m2l.tx.lane[0].local_lane = 0
module.num[0].m2l.rx.lane[0].local_port = 0
module.num[0].m2l.tx.lane[0].local_port = 0
module.num[0].m2l.tx.lane[1].serdes= 6
module.num[0].m2l.rx.lane[1].serdes= 5
module.num[0].m2l.tx.lane[1].polarity= 0
module.num[0].m2l.rx.lane[1].polarity= 1
module.num[0].m2l.rx.lane[1].local_lane = 1
module.num[0].m2l.tx.lane[1].local_lane = 1
module.num[0].m2l.rx.lane[1].local_port = 0
module.num[0].m2l.tx.lane[1].local_port = 0
module.num[0].m2l.tx.lane[2].serdes= 5
module.num[0].m2l.rx.lane[2].serdes= 6
module.num[0].m2l.tx.lane[2].polarity= 0
module.num[0].m2l.rx.lane[2].polarity= 1
module.num[0].m2l.rx.lane[2].local_lane = 2
module.num[0].m2l.tx.lane[2].local_lane = 2
module.num[0].m2l.rx.lane[2].local_port = 0
module.num[0].m2l.tx.lane[2].local_port = 0
module.num[0].m2l.tx.lane[3].serdes= 4
module.num[0].m2l.rx.lane[3].serdes= 7
module.num[0].m2l.tx.lane[3].polarity= 1
module.num[0].m2l.rx.lane[3].polarity= 0
module.num[0].m2l.rx.lane[3].local_lane = 3
module.num[0].m2l.tx.lane[3].local_lane = 3
module.num[0].m2l.rx.lane[3].local_port = 0
module.num[0].m2l.tx.lane[3].local_port = 0
module.num[0].smbus_slv_indx= 1
module.num[0].module_power_level_supported = 7
;;;;; I2C Devices
;;;;; QSFP module 1
i2c_devices.i2c_device[1].slave_addr= 0x50
i2c_devices.i2c_device[1].gw_idx= 1
i2c_devices.i2c_device[1].type= 4
;;;;; VRD
i2c_devices.i2c_device[4].slave_addr= 0x69
i2c_devices.i2c_device[4].gw_idx= 4
;;;;; Viper I2C slave
i2c_devices.i2c_device[5].slave_addr= 0x48
i2c_devices.i2c_device[5].gw_idx= 0
;;;;; SMBUS(BMC)
i2c_devices.i2c_device[10].gw_idx= 2
i2c_devices.i2c_device[10].type= 12
i2c_devices.i2c_device[10].pec_en= 1