SoC Management Interface (RShim)
The SoC management interface—formerly known as RShim—enables an external agent such as the host CPU or BMC to operate and monitor the NVIDIA® BlueField® platform (DPU or SuperNIC). This interface supports provisioning BlueField, resetting Arm cores, and retrieving logs.
For instructions for Windows support, please refer to page "Windows Support".
For installation and upgrade instructions, see "Updating Repo Package on Host Side".
Configuration File
The configuration file for the SoC management interface is located at /etc/rshim.conf
and includes the parameters shown in the table below:
Parameter | Default | Description |
| 150 | Timeout value in seconds when pushing BFB while Arm side is not reading the boot stream. Timeout in seconds when pushing BFB while the Arm side is not reading the boot stream. |
| 0 | If set to 1, the RShim driver ignores all RShim writes and returns 0 for reads. Useful during |
| 10 | Delay in seconds added after a chip reset and before pushing the boot stream when using RShim over PCIe. |
| 10 | Interrupt polling interval (in seconds) when using RShim over direct memory mapping. |
| 1 | Set to 0 to disable RShim memory mapping via VFIO. |
| 1 | Set to 0 to disable RShim memory mapping via UIO. |
RShim configuration is optional. The default parameters support out-of-the-box deployment scenarios, including setups with multiple BlueField devices on a single host.
To control which RShim index maps to which device, edit the configuration file as follows:
# Uncomment the 'rshim<N>'
line to define the mapping.
#
# Format:
# rshim<N> pci-device
rshim0 pcie-0000
:21
:00.2
rshim1 pcie-0000
:81
:00.2
# Ignored devices
# Uncomment the 'none'
line to exclude devices.
#
#none usb-1
-1.4
#none pcie-lf-0000
:84
:00.0
After making any changes to the configuration, restart the SoC management interface with:
systemctl restart rshim
On the host OS, BlueField registers a “DMA controller” used for management over PCIe. You can verify its presence with the following command:
# lspci -d 15b3: | grep 'SoC Management Interface'
Example output:
27:00.2 DMA controller: Mellanox Technologies MT42822 BlueField-2 SoC Management Interface (rev 01)
A special driver—currently named RShim—must be installed and running on the host to expose the SoC management interface. This driver is automatically installed as part of the DOCA package.
For installation details, refer to the section Install RShim on Host.
When RShim is operating correctly, the host creates:
A sysfs device node:
/dev/rshim0/*
A virtual Ethernet interface:
tmfifo_net0
To check the driver status:
systemctl status rshim
Example output:
# systemctl status rshim
● rshim.service - rshim driver for BlueField SoC
Loaded: loaded (/lib/systemd/system/rshim.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2022-05-31 14:57:07 IDT; 1 day 1h ago
Docs: man:rshim(8)
Process: 90322 ExecStart=/usr/sbin/rshim $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 90323 (rshim)
Tasks: 11 (limit: 76853)
Memory: 3.3M
CGroup: /system.slice/rshim.service
└─90323 /usr/sbin/rshim
Log entries confirm device initialization:
rshim[90323]: Probing pcie-0000:a3:00.2(vfio)
rshim[90323]: Create rshim pcie-0000:a3:00.2
rshim[90323]: rshim pcie-0000:a3:00.2 enable
rshim[90323]: rshim0 attached
Virtual Ethernet Interface
The RShim driver exposes a virtual Ethernet device, tmfifo_net0
, which acts as a peer-to-peer tunnel between the host and BlueField OS. On the BlueField side, BFB images configure a static IP address of 192.168.100.2/30
. The host side must be configured manually.
To configure the host IP:
ip addr add dev tmfifo_net0 192.168.100.1/30
For persistent configuration, see "Assign a static IP to tmfifo_net0" under "Updating Repo Package on Host Side".
At this point, to log into the BlueField OS from the host, run the following for example:
ssh ubuntu@192.168.100.2
SoC Management Interface Driver Support for Multiple BlueFields
If multiple BlueField devices are installed on the same host, each will have:
A unique RShim interface at
/dev/rshim<N>
A corresponding virtual Ethernet device:
tmfifo_net<N>
<N>
corresponds to the device index (starting from 0).
There are two ways to manage multiple tmfifo_net<N>
interfaces:
Bridge mode
Add all
tmfifo_net<N>
interfaces to a bridge.Assign a single IP to the bridge.
Each BlueField is configured with a unique IP in the bridge's subnet.
Point-to-point mode:
Assign a unique subnet IP to each
tmfifo_net<N>
interface.Each BlueField is assigned a corresponding IP in that subnet.
Each tmfifo_net<N>
interface on the host must have a unique MAC address. To configure it manually:
ifconfig tmfifo_net0 192.168.100.1/24 hw ether 02:02:02:02:02:02
It can also be configured persistently using a custom udev rule.
Similarly, each BlueField-side tmfifo_net
interface must be configured with:
A unique MAC address
A distinct IP (default is
192.168.100.2
on all devices)
These must be set manually or via BlueField customization scripts during installation.
Multi-board Management Example
This example deals with two BlueField devices installed on the same server (the process is similar for more devices). The example assumes that the RShim package has been installed on the host server.
Configuring Management Interface on Host
This example is relevant for CentOS/RHEL operating systems only.
Create a
bf_tmfifo
interface under/etc/sysconfig/network-scripts
. Run:vim /etc/sysconfig/network-scripts/ifcfg-br_tmfifo
Inside
ifcfg-br_tmfifo
, insert the following content:DEVICE="br_tmfifo" BOOTPROTO="static" IPADDR="192.168.100.1" NETMASK="255.255.255.0" ONBOOT="yes" TYPE="Bridge"
Create a configuration file for the first BlueField,
tmfifo_net0
. Run:vim /etc/sysconfig/network-scripts/ifcfg-tmfifo_net0
Inside
ifcfg-tmfifo_net0
, insert the following content:DEVICE=tmfifo_net0 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no BRIDGE=br_tmfifo
Create a configuration file for the second BlueField,
tmfifo_net1
. Run:DEVICE=tmfifo_net1 BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no BRIDGE=br_tmfifo
Create the rules for the
tmfifo_net
interfaces. Run:vim /etc/udev/rules.d/91-tmfifo_net.rules
Restart the network for the changes to take effect. Run:
# /etc/init.d/network restart Restarting network (via systemctl): [ OK ]
Configuring BlueField Side
BlueField devices arrive with the following factory default configurations for tmfifo_net0.
Address | Value |
MAC |
|
IP |
|
Therefore, if you are working with more than one BlueField, you must change the default MAC and IP addresses.
Updating RShim Network MAC Address
This procedure is relevant for Ubuntu/Debian (sudo
needed), and CentOS BFBs. The procedure only affects the tmfifo_net0
on the Arm side.
Use a Linux console application (e.g. screen or minicom) to log into each BlueField. For example:
# sudo screen /dev/rshim<0|1>/console 115200
Create a configuration file for
tmfifo_net0
MAC address. Run:# sudo vi /etc/bf.cfg
Inside
bf.cfg
, insert the new MAC:NET_RSHIM_MAC=00:1a:ca:ff:ff:03
Apply the new MAC address. Run:
sudo bfcfg
Repeat this procedure for the second BlueField (using a different MAC address).
InfoArm must be rebooted for this configuration to take effect. It is recommended to update the IP address before you do that to avoid unnecessary reboots.
For
comprehensive list of the supported parameters to customize
bf.cfg
during BFB installation, refer to
section "bf.cfg Parameters".
Updating IP Address
For Ubuntu:
Access the file
50-cloud-init.yaml
and modify the tmfifo_net0 IP address:sudo vim /etc/netplan/50-cloud-init.yaml tmfifo_net0: addresses: - 192.168.100.2/30 ===>>> 192.168.100.3/30
Reboot the Arm. Run:
sudo reboot
Repeat this procedure for the second BlueField (using a different IP address).
InfoArm must be rebooted for this configuration to take effect. It is recommended to update the MAC address before you do that to avoid unnecessary reboots.
For CentOS:
Access the file
ifcfg-tmfifo_net0
. Run:# vim /etc/sysconfig/network-scripts/ifcfg-tmfifo_net0
Modify the value for
IPADDR
:IPADDR=192.168.100.3
Reboot the Arm. Run:
reboot
Or perform
netplan apply
.Repeat this procedure for the second BlueField (using a different IP address).
InfoArm must be rebooted for this configuration to take effect. It is recommended to update the MAC address before you do that to avoid unnecessary reboots.
Permanently Changing Arm-side MAC Address
It is assumed that the commands in this section are executed with root (or sudo
) permission.
The default MAC address is 00:1a:ca:ff:ff:01
. It can be changed using ifconfig
or by updating the UEFI variable as follows:
Log into Linux from the Arm console.
Run:
$ "ls /sys/firmware/efi/efivars".
If not mounted, run:
$ mount -t efivarfs none /sys/firmware/efi/efivars $ chattr -i /sys/firmware/efi/efivars/RshimMacAddr-8be4df61-93ca-11d2-aa0d-00e098032b8c $ printf "\x07\x00\x00\x00\x00\x1a\xca\xff\xff\x03" > \ /sys/firmware/efi/efivars/RshimMacAddr-8be4df61-93ca-11d2-aa0d-00e098032b8c
The printf
command sets the MAC address to 00:1a:ca:ff:ff:03
(the last six bytes of the printf
value). Either reboot the device or reload the tmfifo driver for the change to take effect.
The MAC address can also be updated from the server host side while the Arm-side Linux is running:
Enable the configuration. Run:
# echo "DISPLAY_LEVEL 1" > /dev/rshim0/misc
Display the current setting. Run:
# cat /dev/rshim0/misc DISPLAY_LEVEL 1 (0:basic, 1:advanced, 2:log) BOOT_MODE 1 (0:rshim, 1:emmc, 2:emmc-boot-swap) BOOT_TIMEOUT 300 (seconds) DROP_MODE 0 (0:normal, 1:drop) SW_RESET 0 (1: reset) DEV_NAME pcie-0000:04:00.2 DEV_INFO BlueField-2(Rev 1) PEER_MAC 00:1a:ca:ff:ff:01 (rw) PXE_ID 0x00000000 (rw) VLAN_ID 0 0 (rw)
Modify the MAC address. Run:
$ echo "PEER_MAC xx:xx:xx:xx:xx:xx" > /dev/rshim0/misc
For more information and an example of the script that covers the installation and configuration of multiple BlueField devices, refer to section "Installing Full DOCA Image on Multiple BlueField Platforms" of the NVIDIA DOCA Installation Guide.
Function | Command | Comments | |
1 | Push BFB |
| Using |
2 | Open console |
| The Use Linux's screen or minicom console applications to access the BlueField console. |
3 | Configure a virtual network interface |
| The The default IP address for the BlueField is 192.168.100.2/30. The IP used in the command (192.168.100.1/30) is for example purposes only. |
4 | Log into the DPU |
| The |
5 | PXE boot over RShim | N/A | Please refer to section "Deploying BlueField Software Using BFB with PXE" for more information. |
6 | Check Arm/Rshim status |
| Example output:
For details for each individual output, see section "RShim Misc Interface". |
7 | Configure Arm/RShim |
| See section "RShim Misc Interface". Issue Arm software reset:
|
8 | Expose log messages | N/A | For more information, please refer to section "Logging". |
9 | Update RShim PCIe device name dynamically |
| This command triggers a PCIe bus rescan and updates the associated RShim device name accordingly. A common use case is when multiple BlueField cards are installed in the server, and PF2 has just been hidden on one of them. As a result, the PCIe function may shift from |
RShim Misc Interface
Field | Description | Values | Writable? | Shown in Display Level | Device |
| Verbosity of the RShim misc output |
| Yes | All | BlueField-2/BlueField-3 |
| Check whether BlueField DPU is booting in DPU mode or NIC mode |
| No | All | BlueField-3 |
| Boot location of BlueField Arm software |
| Yes | All | BlueField-2/BlueField-3 |
| Defines the timeout (in seconds) for writing a BFB file to the RShim | 300 seconds (default) | Yes | All | BlueField-2/BlueField-3 |
| Specifies the timeout (in seconds) for writing to the | 40 seconds (default) | Yes | All | BlueField-2/BlueField-3 |
| Indicates whether the RShim driver is operating in "drop" mode. In this mode, the driver relinquishes control of the RShim hardware and disables most RShim functionalities. This is typically used in scenarios where another entity temporarily assumes ownership of the RShim interface. |
| Yes | All | BlueField-2/BlueField-3 |
| This is a write-only field that provides a way to reset DPU Arm. Example:
| Always shown as 0. | Yes Accepted values: 1 | All | BlueField-2/BlueField-3 |
| RShim driver/backend name | Example: | No | All | BlueField-2/BlueField-3 |
| BlueField version and revision | Example: | No | All | BlueField-2/BlueField-3 |
| BlueField OPN string | Example: | No | All | BlueField-3 |
| Time since BlueField boots up | Example: | No | All | BlueField-3 |
| Whether RShim is in secure NIC mode (also called "locked" mode) to prevent host RShim access |
| No | All | BlueField-3 |
| Indicates whether a FORCE command is pending. This command is used to request ownership transfer of the RShim interface from the other backend—PCIe (host) or USB (BMC). |
| Yes | All | BlueField-2/BlueField-3 |
(RShim log messages) | No | 2 | BlueField-2/BlueField-3 |
The bf.cfg
file contains configuration that can be pushed to customize the installation of the BFB. See "Customizing BlueField Software Deployment" for more information.
The RShim interface may be owned by the BlueField BMC or the host (Windows or Linux). In situations where users do not have access to the host, they would want to transfer RShim ownership to the BMC.
Assuming that /dev/rshim0
is the BlueField requesting ownership over the RShim interface, ownership may be transferred to the BlueField BMC by running the following command from the BMC console:
Confirm RShim is not attached to BMC:
root@dpu-bmc:~# systemctl status rshim
This show messages like
another backend already attached
orrshim0 entering drop mode
.InfoIf RShim is already attached or RShim is not in drop mode, the ownership transfer command (
-F
) will fail.Create a directory for the RShim systemd override file if it does not already exist:
root@dpu-bmc:~# mkdir -p /etc/systemd/system/rshim.service.d
Create the override file:
root
@dpu
-bmc:~# cat > /etc/systemd/system/rshim.service.d/override.conf [Service] Environment="OPTIONS=-F"
Press Ctrl-D to save the file.
Reload the systemd manager configuration and restart RShim service.
root@dpu-bmc:~# systemctl daemon-reload root@dpu-bmc:~# systemctl restart rshim root@dpu-bmc:~# systemctl status rshim … … Dec 10 20:58:57 dpu-bmc rshim[20561]: rshim0 received ownership transfer ack Dec 10 20:59:00 dpu-bmc rshim[20561]: rshim0 regained ownership successfully
RShim ownership is transferred to BMC.
Clean up the systemd override file:
root@dpu-bmc:~# rm /etc/systemd/system/rshim.service.d/override.conf root@dpu-bmc:~# systemctl daemon-reload
Controlling SoC management interface could also be done from the platform BMC using NC-SI OEM command over I2C.
RShim interface could be enabled, disabled, or locked:
Enabled – RShim over PCIe is supported and ready to use
Locked – RShim over PCIe is supported, but cannot currently be used. It may be re-activated using the enable command, without the need to perform reset
Disabled – RShim over PCIe is not supported. You must re-enable it and power cycle the host.
Set Host PCIe RShim Access to BlueField DPU CPU (Command=0x12, Parameter=0x19)
This package command allows a trusted platform BMC to configure the non-volatile enablement state of external Host PCIe RShim access to the BlueField DPU's embedded CPU.
A BlueField DPU reboot is required for this setting to take effect.
Set Host PCIe RShim Access to BlueField DPU CPU Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
20:23 | Command rev=0x00 | MLNX Cmd ID=0x12 | Parameter=0x19 | Reserved |
24:27 | Reserved | Host_Access_State | ||
28:31 | Checksum 31:0 |
Set Host PCIe RShim Access to BlueField DPU CPU Command Parameters
Field | Bytes | Offset in NC-SI Command | Description |
Host_Access_State | 1 | 27 | Embedded CPU OS state
|
Set Host PCIe RShim access to BlueField DPU CPU Response
The BlueField DPU always receives and responds to this command when the Package ID matches.
If the command is issued by an untrusted platform BMC, it fails with reason code 0x7FFF
(Unsupported command).
Set Host RShim Access to BlueField DPU CPU Response Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | Response Code | Reason Code | ||
20:23 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
24:27 | Command rev=0x00 | MLNX Cmd ID=0x12 | Parameter=0x19 | Reserved |
28:31 | Reserved | Host_Access_State | ||
32:35 | Checksum 31:0 |
Set Dynamic Host PCIe RShim access to BlueField DPU CPU (Command=0x12, Parameter=0x1B)
This package command allows a trusted platform BMC to configure the runtime (volatile) enablement state of Host PCIe RShim access to the BlueField DPU CPU—without requiring a DPU reset.
This command is only valid when the non-volatile setting is Enabled
or Locked
(see section "Set Host PCIe RShim Access").
The setting applied by this command is volatile and will be overridden upon reset by the non-volatile configuration.
Set Dynamic Host PCIe RShim Access to BlueField DPU CPU Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
20:23 | Command rev=0x00 | MLNX Cmd ID=0x12 | Parameter=0x1B | Reserved |
24:27 | Reserved | Host_RT_Access_State | ||
28:31 | Checksum 31:0 |
Set Dynamic Host PCIe RShim Access to BlueField DPU CPU Command Parameters
Field | Bytes | Offset in NC-SI Command | Description |
Host_RT_Access_State | 1 | 27 | Embedded CPU OS state
|
Set Dynamic Host RShim Access to BlueField DPU CPU Response
The BlueField DPU processes this command only when:
The Package ID matches
The non-volatile setting is
Enabled
orLocked
If the non-volatile setting is Disabled
, the command fails with reason code 0x0002
(Command unavailable).
If issued by an untrusted platform BMC, the command fails with reason code 0x7FFF
(Unsupported command).
This command supports toggling between Enabled
and Locked
states without requiring a DPU reboot.
Set Dynamic Host RShim Access to BlueField DPU CPU Response Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | Response Code | Reason Code | ||
20:23 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
24:27 | Command rev=0x00 | MLNX Cmd ID=0x12 | Parameter=0x1B | Reserved |
28:31 | Reserved | Host_RT_Access_State | ||
32:35 | Checksum 31:0 |
Get Host PCIe RShim access to BlueField DPU CPU (Command=0x13, Parameter=0x19)
This package command allows the platform BMC to query the BlueField DPU for the current enablement state of Host PCIe RShim access to the embedded CPU.
Get Host PCIe RShim Access to BlueField DPU CPU Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
20:23 | Command rev=0x00 | MLNX Cmd ID=0x13 | Parameter=0x19 | Reserved |
24:27 | Checksum 31:0 |
Get Host PCIe RShim access to BlueField DPU CPU Response
The BlueField DPU always receives and responds to this command when the Package ID matches.
Get Host PCIe RShim Access to BlueField DPU CPU Response
Field | Size | Offset in NC-SI Command | Description |
Host_Access_State | 1 byte | 31 | Embedded CPU OS state
|
Get Host PCIe RShim Access to BlueField DPU CPU Response Format
Bytes/Bits | 31:24 | 23:16 | 15:8 | 7:0 |
0:15 | NC-SI Header (OEM Command) | |||
16:19 | Response Code | Reason Code | ||
20:23 | NVIDIA Manufacture ID (IANA) = 0x8119 | |||
24:27 | Command rev=0x00 | MLNX Cmd ID=0x13 | Parameter=0x19 | Reserved |
28:31 | Reserved | Host_Access_State | ||
32:35 | Checksum 31:0 |