嘘~ 正在从服务器偷取页面 . . .

Broadcom NICCLI Configuration Utility介绍


一、NICCLI简介

根据Broadcom官网上的信息,Bnxtnvm将会被Broadcom NICCLI Configuration Utility取代,NICCLI的架构将更加注重安全性。NICCLI是Broadcom于2023年首次发布的工具,在用户指南2.28版本中就已经不再支持Bnxtnvm命令,并且从2.30版本开始NICCLI全面替代Bnxtnvm。NICCLI配置实用程序可对Broadcom以太网网卡的NVM进行设置,例如启用或禁用RoCE、SR-IOV和其他选项。NICCLI配置实用工具还可以执行固件升级。NICCLI配置实用程序使用Sliff驱动程序与底层固件进行通信,并对Broadcom以太网网卡执行管理操作。NICCLI配置实用工具同时支持BCM9574XX和BCM95750X系列设备。

NICCLI有不同的使用模式,区分了交互模式、单行模式和批处理模式。

二、支持的系统

Operating System Distribution Binary Packages Source Packages
RHEL/CentOS 8.7, 8.8, 8.8 RT, 8.9, 9.1, 9.2, 9.2 RT, and 9.3 x86_64, ARM Yes
SuSE SLES 12 SP4, 12 SP5, 15 SP3, 15 SP4, 15 SP4 (RT kernel), 15 SP5 x86_64 Yes
Ubuntu 20.04.5 LTS, and 22.04 x86_64
vSphere/ESX 7.0, 7.0 u1, 7.0 u2, 7.0 u3, 8.0, and 8.0 u1 x86, x86_64 N/A
Windows Windows 10 22H2, Windows 11 22H2 x86_64 N/A
Windows Server 2019, 2022 x86_64 N/A

三、安装NICCLI(Linux)

3.1、Linux NICCLI配置实用工具由以下组件组成:

  • Broadcom Sliff driver
  • Broadcom utility tools to configure the Ethernet network adapters

3.2、安装sliff driver

Using KPM:
rpm –ivh/Uvh kmod-sliff-<version>.rpm

Using source RPM:
rpm –ivh/Uvh sliff-<version>src.rpm

Using the deb package:
dpkg –i sliff-dkms_<version>.deb

Supported Kernel Versions
sles15.3 = 5.3.18-57-default
rhel8.6 = 4.18.0-372.9.1.el8.x86_64
sles12.5 = 4.12.14-120-default
rhel8.7 = 4.18.0-425.3.1.el8.x86_64
rhel4.18.0.372.9.1.rt7.166.rhel8u6 = 4.18.0-372.9.1.rt7.166.el8.x86_64
rhel5.14.0.70.22.1.rt21.94.rhel9u0 = 5.14.0-70.22.1.rt21.94.el9_0.x86_64
rhel9.1 = 5.14.0-162.6.1.el9_1.x86_64
sles15.3.rt = 5.3.18-14-rt
rhel5.14.0.70.22.1.rhel9u0 = 5.14.0-70.22.1.el9_0.x86_64
sles15.4.rt = 5.14.21-150400.13-rt
sles12.4 = 4.12.14-94.41-default
sles15.4 = 5.14.21-150400.22-default

3.3、安装NICCLI

Using NICCLI RPM:
sudo rpm -i niccli -<version>.rpm

Using the NICCLI deb package
sudo dpkg –i niccli-<version>.dev

四、命令对比

Bnxtnvm与NICCLI命令对比:

Commands Equivalent Command in NICCLI
Firmware Update Commands
install install
verify verify
fw_sync fw_sync
livepatch livepatch
Query Commands
version version
list nvm-list
view Not supported.
listdev listdev
saveoptions nvm -saveoptions
devid devid
device_info show
getoption nvm -getoption
pkgver pkgver
device_temperature show
moduleinfo moduleinfo
ether_serdes_eye_diagram Not supported.
pci_eye_diagram Not supported.
pcie_counters pcie -counters
get_ptp_extended ptp -get
get_sync_ethernet synce -get
get_txfir txfir -get
optionhelp help
pci_eye_scope Not supported.
rt_provision_state show -certificate
nvm_measurement show -nvmmeasurement
Configuration Commands
setoption nvm -setoption
resmgmt resmgmt
cfgtunnel cfgtunnel
vf vf
prbs_test Supported in the 2.29 version of software.
add_ntuple_filter add_ntuple_filter
free_ntuple_filter free_ntuple_filter
msix_max_vectors msixmv
tsio_function_pin tsio
duty_cycle dutycycle
dll_source dllsource
set_ptp_extended ptp -set
set_sync_ethernet synce -set
set_txfir txfir -set
reset reset
restore_factory_defaults rfd
mh_pf_alloc mh_pf_alloc
loopback loopback
vpd vpd
Debug Commands
coredump coredump
backup backup
device_health_check show -health
dscdump dscdump
Miscellaneous Commands
set_ets ets
set_map up2tc
set_pfc pfc
set_apptlv apptlv
get_qos getqos
ratelimit tcrlmt
dump listmap
buffer_pool rxbufferpool
partition_tx_ratelimit txpartitionrlmt
get_partition_tx_ratelimit txpartitionrlmt
tx_endpoint_ratelimit txeprlmt
get_tx_endpoint_ratelimits txeprlmt
rx_port_ratelimit rxportrlmt
rx_endpoint_ratelimit rxeprlmt
get_rx_ratelimits rxrlmt
get_dscp2prio dscp2prio
get_tx_port_ratelimit txportrlmt
tx_port_ratelimit txportrlmt

五、命令示例

NICCLI有不同的使用模式,区分了交互模式、单行模式和批处理模式。

5.1、交互模式

1、如果没有提供目标命令,NICCLI配置实用程序将以交互式控制台模式启动。成功连接目标器后,界面以目标器提示符开始。此模式最适合对同一个目标执行多个操作。

2、直接使用”niccli”命令,会列出系统中的所有Broadcom网卡端口,如下输出显示一共有8个端口,再输入index number(如下图显示的是1~8),就可以进入某个端口的端口模式。

root@node01:~# niccli

-------------------------------------------------- -----------------------------
Scrutiny NIC CLI v227.0.130.0 - Broadcom Inc. (c) 2023 (Bld-61.52.25.90.16.0)
-------------------------------------------------- -----------------------------

     BoardId MAC Address FwVersion PCIAddr Type Mode  
  1) BCM57508 84:16:0C:6F:0F:10 216.0.251.4 00:01:00:00 NIC PCI   
  2) BCM57508 84:16:0C:6F:0F:11 216.0.251.4 00:01:00:01 NIC PCI   
  3) BCM57416 00:62:0B:31:7F:00 226.0.145.0 00:41:00:00 NIC PCI   
  4) BCM57416 00:62:0B:31:7F:01 226.0.145.0 00:41:00:01 NIC PCI   
  5) BCM57504 00:62:0B:6E:E5:48 226.0.145.1 00:81:00:00 NIC PCI   
  6) BCM57504 00:62:0B:6E:E5:48 226.0.145.1 00:81:00:01 NIC PCI   
  7) BCM57504 00:62:0B:6E:E5:4A 226.0.145.1 00:81:00:02 NIC PCI   
  8) BCM57504 00:62:0B:6E:E5:4B 226.0.145.1 00:81:00:03 NIC PCI   

Enter the target index to connect with : 8
BCM57504>

3、输入“help”查看所有支持的命令。退出输入“quit”

BCM57504> help
list                      - Lists all the compatible devices
select                    - Select a device from the discovered list
listdev                   - Lists all the compatible devices (NIC legacy syntax)
devid                     - Query Broadcom device id's.
pkgver                    - Display firmware package version installed on the device.
nvm-list                  - Display the NVM components and its associated version details.
list-eth                  - Lists all NIC devices with ethernet interface names
version                   - Display the current version of the application
pcidev                    - Generic PCI based display operation
coredump                  - Retrieves coredump data from device.
help                      - Lists the available commands
quit                      - Quits from the application
show                      - Shows NIC specific device information
txfir                     - Network Interface Card Transmission Finite
                          - Impulse Response
msixmv                    - Display and configure the number of MSIX max
                          - vectors values for VF's per each PF
scan                      - Scan PCI devices in the topology
idlecheck                 - Check the stability of hardware blocks for given type
                          - of NIC device.
pcie                      - Show/Execute pcie operation
nvm                       - NVRAM Option Management
pfalloc                   - Configure and Query for the number of PFs per PCIe
                          - endpoint
rfd                       - Restores NVM configuration to factory defaults
tsio                      - TSIO function capability on the pin
dutycycle                 - Set duty cycle on TSIO outgoing signal
dllsource                 - Set the DLL source for PHC
vf                        - Configure and Query for a trusted VF
rxbufferpool              - Query and configure all the rx buffers. The shared option would
                          - assign all rx buffers to a shared buffer pool and would configure
                          - rx CoS queues belonging to all ports to use the shared buffer pool
rxportrlmt                - Configure the receive side port rate limit
rxrlmt                    - Query the configured receive side rate control parameters
rxeprlmt                  - Configure the receive side rate control parameters for a given endpoint
txpartitionrlmt           - Query and Configure the transmit side partition rate limit applies to traffic
                          - sent from a partition, which is one PF and all of its child VFs
txportrlmt                - Query and Configure the transmit side of port rate limit
txeprlmt                  - Query and Configure the PCIe endpoint transmit rate control
pfc                       - Configure the priority-based flow control for a given priority
apptlv                    - Configure the priority for the AppTLV
tcrlmt                    - Configure the rate limit for each traffic class
reset                     - Reset the device
synce                     - Configure the synchronous ethernet profile
dscdump                   - Retrieves dscdump for device
ptp                       - PTP extended parameters operation
                          -
Legacy NVM commands :     - Query commands
---------------------     - ---------------
device_info               - Query Broadcom device information and default hardware
                          - resources profile version.
device_temperature        - Query the device temperature in Celsius.
get_backup_power_config   - Query backup power configuration of the device.
moduleinfo                - Query the PHY module information.
nvm_measurement           - Query the active NVM configuration.
get_ptp_extended          - Query the PTP extended parameters.
getoption                 - Query current NVM configuration option settings
                          - of a device.
pcie_counters             - Display the pcie counters.
saveoptions               - Save NVM configuration options on the device
                          - to a file.
get_sync_ethernet         - Get the synchronous ethernet frequency profile
get_txfir                 - Query the TX FIR settings.
cert_provision_state      - Query the imported certificate chain on the device.
read                      - Read the NVM item data and write its contents to a file.
mh_pf_alloc               - Query the number of PFs per PCIe endpoint.
                          - This command is supported only on Thor devices.
get_tsio_function_pin     - Query TSIO function capability on the pin.
                          -
Legacy NVM commands :     - Debug commands
---------------------     - ---------------
device_health_check       - Checks the device health.
idle_check                - Check the stability of hardware blocks.
backup                    - Backup NVM contents to a file
                          -
Legacy NVM commands :     - Configuration commands
---------------------     - ---------------
reset_ap                  - Reset management processor.
setoption                 - Configure NVM configuration option settings
                          -  of a device.
msix_max_vectors          - Configure the number of MSI-X max vectors per
                          - VF for each PF.
loopback                  - Query/perform loopback config.
add_ntuple_filter         - Add ntuple flow filter.
free_ntuple_filter        - Free ntuple flow filter.
cfgtunnel                 - query/config custom tunnel port/rss.
write                     - Create or overwrite NVM data item with a file.
set_txfir                 - Configures the TX FIR settings
set_ptp_extended          - Set PTP extended parameters
mh_pf_alloc               - Configure the number of PFs per PCIe endpoint.
                          - This command is supported only on Thor devices.
restore_factory_defaults  - Restores NVM configuration to factory defaults
resmgmt                   - Query and Configure resources of the device.
                          -
Legacy NVM commands :     - FW update commands
---------------------     - ---------------
fw_sync                   - Synchronize primary & secondary FW images
verify                    - Verify FW packages & NVM
livepatch                 - Query, Activate and Deactivate the patch in live
install                   - Install/Update FW
                          -
Legacy QoS Rx commands :  - Rx Qos commands
---------------------     - ---------------
buffer_pool               - The user can query and configure the rx buffer pool.
rx_port_ratelimit         - The user can configure rx rate control that applies to all traffic in a rx CoS queue group.
rx_endpoint_ratelimit     - The user can configure endpoint rx rate control that applies to all traffic in a rx CoS queue group.
get_rx_ratelimits         - The user can query the rx rate limits.
                          -
Legacy QoS Tx commands :  - Tx Qos commands
---------------------     - ---------------
partition_tx_ratelimit    - This command is used to configure partition tx rate limit.
get_partition_tx_ratelimit - This command is used to query the partition rate limit configuration for a given partition.
get_tx_port_ratelimit     - This command is used to query the tx side of port rate limit.
tx_port_ratelimit         - This command is used to configure the tx side of port rate limit
tx_endpoint_ratelimit     - This command is used to configure PCIe endpoint tx rate limit.
get_tx_endpoint_ratelimits - This command is used to query the tx endpoint rate limits.
                          -
Legacy DCB commands :     - Data Center Bridging commands
---------------------     - ---------------
set_pfc                   - This command is used to enable PFC on a given priority
set_apptlv                - This command is used to configure the priority of the AppTLV.
ratelimit                 - This command is used to configure the rate limit for each traffic class.

BCM57504>

5.2、单行模式

1、基于每个目标命令执行NICCLI配置实用程序。在这种模式下,使用适当的参数指定硬件接口和目标命令。NICCLI配置实用工具连接到目标,执行目标命令,然后退出应用程序。该命令的返回状态为NICCLI配置实用工具的退出状态。

2、命令示例:

# Output all supported network cards
niccli --list

# View all devices including device type
niccli --listdev

# FW update
niccli -i [index number] install [FW Package]

# Verification of installed firmware
niccli -i [index number] verify

# View the currently installed FW
niccli -i [index number] pkgver

# View device info
niccli -i [index number] show

# Read temperature
niccli -i [index number] device_temperature

# Listing of all configuration options
niccli -i [index number] nvm -getoption [option name] -scope [port index]

# Configuration of all options
niccli -i [index number] nvm -setoption [option name] -scope [port index] -value [value]
As an alternative to -i [index number], you can also use -pci [PCI ID].

5.3、批处理模式

1、将命令列表写入文本文件,并在NICCLI配置实用工具中执行它们,这结合了交互式和单线模式,而不断开目标。如果任何一个命令失败,NICCLI配置实用程序将退出,并且不能继续从脚本执行其余的命令。批处理模式需要一个包含实用工具支持的命令的纯文本文件。支持的命令可以使用单线模式或交互模式列出。在任何命令失败时,实用程序退出,不再继续执行其他命令。

2、批处理文件示例,读取设备信息、温度和FW版本。

root@node01:~# cat script
device_info
device_temperature
pkgver

3、命令演示:

root@node01:~# niccli -i 1 --batch script

-------------------------------------------------- -----------------------------
Scrutiny NIC CLI v227.0.130.0 - Broadcom Inc. (c) 2023 (Bld-61.52.25.90.16.0)
-------------------------------------------------- -----------------------------

Executing command : 'device_info'
Interface Name: enp1s0f0np0
MAC Address: 84:16:0C:6F:0F:10
Base MAC Address: 84:16:0C:6F:0F:10
Serial Number: P21002218000CWFV
Part Number: BCM957508-P2100G
PCI Address: 0000:01:00:00
Chip Number: BCM57508
Chip Name: THOR
Description : Broadcom NetXtreme-E Dual-port 100Gb Ethernet PCIe Adapter
Active Package Name: 216.0.293.8
Firmware Name: PRIMATE_FW
Firmware version: 216.0.251.4
RoCE firmware version: 216.0.251.0
HWRM Interface Spec: 1.10.1
Kong mailbox channel : Not Applicable
Trusted VFs: Supported
Active Package Version: 216.0.293.8
Package Version on NVM: 216.0.293.8
PCI Device ID: 0x1750
PCI Vendor ID: 0x14E4
PCI Revision ID: 0x11
PCI Component ID: 0x1750
PCI Subsys Device ID: 0x2100
PCI Subsys Vendor ID: 0x14E4
Active NVM config version: 0.0.14
NVM config version: 0.0.14
Reboot Required: No
Firmware reset counter: 0
Error Recovery Counter: Not Available
Crash Dump Timestamp: Not Available
Secure Boot: Enabled
Secure Firmware Update : Enabled
FW Image Status: Operational
Crash Dump Available in DDR: No

Executing command : 'device_temperature'
Device Temperature: 41 Celsius
PHY Temperature: 44 Celsius
Optical Module Temperature: 0 Celsius

Executing command : 'pkgver'
Package information:
     Active Package Version: 216.0.293.8
     Package Version on NVM: 216.0.293.8
     Primary SBI Version: 0.0.1.80
     Secondary SBI Version: 0.0.1.80
     Primary SRT version: 216.0.251.4
     Secondary SRT version: 216.0.251.4
     Primary SRT Version: Not Available
     Secondary SRT Version: Not Available

文章作者: kclouder
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 kclouder !
  目录