Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

BlueField's Ethernet BlueField2 SmartNIC solutions combine Arm® processing power with advanced network offloads to accelerate a multitude of security, networking and storage applications.
Based on the BlueField BlueField2 system-on-chip (SoC) programmable network engine, BlueField BlueField2 SmartNICs integrate Mellanox ConnectX®-6 Dx network controller with Arm multicore processors and cryptology options to deliver an innovative and high-performance programmable platform. Through this article, you will be able to quickly set up a simple test lab which will allow you to experiment and explore BlueField BlueField2 SmartNIC capabilities. The setup includes a bare metal server hosting BlueField2 25GbE SmartNIC connected back-to-back to another bare metal server with ConnectX-6 Dx NIC.

License

N/A

How to use this document

...

The following diagram shows the physical configuration between the BlueField BlueField2 SmartNIC and the ConnectX-6 Dx NIC. 

Pre-Installation Requirements

...

2x86 servers running CentOS 8.2

 Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz/ 20 cores / 2 numa / 64G memory

Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz/ 12 cores/ 2 numa / 32G memory

1ConnectX-6 Dx NIC (FW: 22.29.1016) -
1BlueField2 25GbE SmartNIC with Arm processor (FW: 24.29.1016) ARM A72  8 cores / single numa / 16G memory/ 25G bandwidth
 125GB/s SFP28 networking cable -
 1QSA28 Adapter (100GB-to-25GB Adapter)Module -
 1UART-to-USB cableFor SmartNIC USB console access 
 1Mini USB Type B cableFor SmartNIC USB Console Access
 1bfb image to be loaded on the BlueField BlueField2 SmartNIC Arm. Image contains:
  • CentOS 7.6 over Arm architecture
  • MLNX_OFED_LINUX-5.2-1.0.4 (compiled with DPDK and BlueField flags)
  • DPDK libraries version 20.11
  • Pre-configured network settings for easy SmartNIC management
  1. Insert ConnectX-6 Dx NIC into Server A
  2. Insert BlueField BlueField2 SmartNIC into Server B
  3. Connect the SmartNIC UART cable from SmartNIC to its hosting Server B USB port #1
  4. Connect Mini USB cable from SmartNIC to its hosting Server B USB port #2
  5. Insert QSA28 Adapter Module into Server 100GBB 25GB port
  6. Connect one of the SmartNIC ports to the ConnectX-6 Dx using 25GB cable
  7. Connect both servers to a management LAN

...

  1. Use automatic FM update during MLNX_OFED installation ONLY if the current BlueField BlueField2 FW version is 24.29.1016 or above. In case its older, manually burn the FW after MLNX_OFED installation.
  2. In case you plan to run DPDK on the host itself, install MLNX_OFED with "--dpdk --upstream-libs" flags
  3. The "BlueField" flag is not required in some of the MLNX_OFED versions and OS releases

OVS-DPDK

OVS-DPDK

  1. In R3, In R3, We've open-sourced a fork of DPDK based Open vSwitch, which supports the VXLAN decap/encap full offload: https://github.com/bytedance/ovs-dpdk, and In R4, we used the Mellanox version which is in the process of open source
  2. The code is fully compatible with upstream Open vSwitch, you can follow the same procedures to build them from the source. See the link: http://docs.openvswitch.org/en/latest/intro/install/
  3. Or you can use the ansible scripts in the Akaino Gerrit to install both BlueField2 Card and OVS-DPDK. Currently, the scripts are not available, as the scripts work by relying on many company's internal services. We are refactoring the code that you can use it in your own SmartNIC setups.

...

tar -xzvf MLNX_OFED_LINUX-5.2-1.0.4.0-rhel7.6-x86_64.tgz
cd MLNX_OFED_LINUX-5.2-1.0.4.0-rhel7.6-x86_64
./mlnxofedinstall --withadd-nvmf --bluefield --without-fw-updatekernel-support


      Note

  1. Use an automatic FM update during MLNX_OFED installation ONLY if the current BlueField2 FW version is 24.29.1016 or above. In case its older, manually burn the FW after MLNX_OFED installation.
  2. In case you plan to run DPDK on the host itself, install MLNX_OFED with "--dpdk --upstream-libs" flags
  3. The "BlueField" flag is not required in some of the MLNX_OFED versions and OS releases


  • Enable SR-IOV on FW (Optional):

mlxconfig -y -d /dev/mst/mt41682mt41686_pciconf0 s SRIOV_EN=1
mlxconfig -y -d /dev/mst/mt41682mt41686_pciconf0 s NUM_OF_VFS=8

  • Uncomment the following line in /etc/modprobe.d/rshim.conf to set the default RShim access method to the SmartNIC:

...

 options rshim backend_driver=rshim_usb


  • Download and install RShim driver to communicate with BlueField2 SmartNIC, including packages required.

yum install pciutils-devel libusbx-devel fuse-devel


rpm -Uvh rshim-<version-number>.x86_64.rpm -force

       Note: before start the driver, guarantee that old version of kernel modules are unloaded if there has.

rmmod rshim_net
rmmod rshim_pcie
rmmod rshim_usb
rmmod rshim

systemctl start rshim


  • Create a

       Note

  1. When this line is commented, the first available driver will be used.
  2. When the mini USB cable is not used, the driver should be rshim_pcie
  • Create a file named ifcfg-tmfifo_net0 under /etc/sysconfig/network-scripts/ directory, with the following content:

...

  • ifcfg-tmfifo_net0 is the network interface used for IP communication between the x86 host and the SmartNIC with rshim _net driver.
  • Enable ip forwarding and set a NAT rule to allow the SmartNIC OS to communicate with the outer world via the host management interface:

...

  • Reboot the server. Once the server is up again, run some configuration sanity tests:
  • To verify BlueField BlueField2 FW version:

mlxfwmanager --query


  •  To verify RShim modules are loadeddriver is working:

lsmod | grep -i systemctl status rshim


  • To identify the backend active RShim driver:

...

iptables -L -n -t nat



cat /home/CentOS7.6-5.4.60-mlnx.51.ge913ebd-MLNX_OFED-5.2-1.0.4.0-1-aarch64.bfb > /dev/rshim0/boot

...

  Note: CentOS based bfb is not officially supported.


Use one of the console access methods described in the "SmartNIC Management Methods" section below to follow the image installation process.

...

This is not a power cycle of the SmartNIC.


 How-to load BlueField SmartNIC BlueField2 SmartNIC OS image from the hosting server:

...

minicom -D /dev/ttyUSB0

  

SmartNIC Modes

BlueField BlueField2 SmartNIC can operate in two modes:

...

In this mode, both the x86 hosting server and the SmartNIC Arm OS act as separated entities; Both can use and communicate with each other or the network via the ConnectX-5 6 Dx module of the SmartNIC.

EMBEDDED

...

/opt/mellanox/iproute2/sbin/rdma link

 
On x86 host: the output should list two network devices.should list two network devices.

link mlx5_0/1: state ACTIVE physical_state LINK_UP netdev ens1f0
link mlx5_1/1: state DOWN physical_state DISABLED netdev ens1f1

 
On Arm: following devices should be listed:

link mlx5_0/1 state ACTIVE physical_state LINK_UP netdev pf0hpf
link mlx5_0/2 state ACTIVE physical_state LINK_UP netdev pf0sf0
link

1/1:

mlx5_0/

1:

19 state ACTIVE physical_state LINK_UP netdev

ens1f0
2/1:

p0
link mlx5_1/1

:

state

DOWN

ACTIVE physical_state

DISABLED

LINK_UP netdev

ens1f1

 
On Arm: the output should list four representors:

1/1: mlx5_0/1:

pf1hpf
link mlx5_1/2 state ACTIVE physical_state LINK_UP netdev

rep0-ffff
2/1:

pf1sf0
link mlx5_1/

1:

19 state

ACTIVE

DOWN physical_state

LINK_UP netdev rep0-0
3/1:

DISABLED netdev p1
link mlx5_2/1

:

state

DOWN

ACTIVE physical_state

DISABLED netdev rep1-ffff
4/1:

LINK_UP netdev p0m0
link mlx5_3/1

:

state

DOWN

ACTIVE physical_state

DISABLED netdev rep1-0

  

LINK_UP netdev p1m0


Issue the following commands on the Arm to see the correlation between the PCI device and its representors:  

mst start
mst status -v
 
 
PCI devices:
------------
DEVICE_TYPE MST PCI RDMA NET NUMA
BlueField2(rev:0) NA 03:00.1 mlx5_1 net-p1 -1
BlueField2(rev:0) NA 03:00.0 mlx5_0 net-p0 -1

...

Note
The pf0hpf / pf1hpf are the PF representors facing the x86 host.

...