image image image image image image



On This Page

Created on Jun 30, 2019

Introduction

BlueField's Ethernet DPU solutions combine Arm® processing power with advanced network offloads to accelerate a multitude of security, networking and storage applications.
Based on the BlueField system-on-chip (SoC) programmable network engine, BlueField DPUs integrate NVIDIA ConnectX network controller with Arm multicore processors and cryptology options to deliver an innovative and high-performance programmable platform.

Through this QSG (Quick Start Guide) article you will be able to quickly set up a simple test lab which will allow you to experiment and explore BlueField DPU capabilities. The setup includes a bare metal server hosting BlueField 25GbE DPU connected back-to-back to another bare metal server with ConnectX-5 NIC.

Equipment

Qty.Item Comments
2x86 servers running CentOS 7.5 -
1ConnectX-5 NIC (FW: 16.24.0328 and up) -
1BlueField 25GbE DPU with Arm processor (FW: 18.24.1000 and up) -
 125GB/s SFP28 networking cable -
 1QSA28 Adapter (100GB-to-25GB Adapter) -
 1UART-to-USB cableFor DPU USB console access 
 1Mini USB Type B cableFor DPU USB Console Access
 1bfb image to be loaded on the BlueField DPU Arm. Image contains:
  • CentOS 7.5 over Arm architecture
  • MLNX_OFED_LINUX-4.4-2.5.11.0 (compiled with DPDK and BlueField flags)
  • DPDK libraries version 18.11
  • Pre-configured network settings for easy DPU management


Physical Configuration Diagram

The following diagram shows the physical configuration between the BlueField DPU and the ConnectX-5 NIC. 

Physical Configuration Instructions


  1. Insert ConnectX-5 NIC into Server A
  2. Insert BlueField DPU into Server B
  3. Connect the DPU UART cable from DPU to its hosting Server B USB port #1
  4. Connect Mini USB cable from DPU to its hosting Server B USB port #2
  5. Insert QSA28 Adapter into Server B 100GB port
  6. Connect one of the DPU ports to the ConnectX-5 using 25GB cable
  7. Connect both servers to a management LAN


DPU Server Preparations

  • Install useful packages:

    yum install -y screen minicom net-tools tcpdump usbutils net-utils sshpass iptables-services fio epel-release iperf wget git unzip perl pciutils lsof tcl libxml2-python tk unbound gtk2 atk cairo gcc-gfortran tcsh nvme-cli
    

      

  • Install MLNX_OFED with the mentioned flags below.

    tar -xzvf MLNX_OFED_LINUX-4.4-2.5.11.0-rhel7.5-x86_64.tgz
    cd MLNX_OFED_LINUX-4.4-2.5.11.0-rhel7.5-x86_64
    ./mlnxofedinstall --with-nvmf --bluefield --without-fw-update

      

Note

  • Use automatic FM update during MLNX_OFED installation ONLY if the current BlueField FW version is 18.24.1000 (GA) or above. In case its older, manually burn the FW after MLNX_OFED installation.
  • In case you plan to run DPDK on the host itself, install MLNX_OFED with "--dpdk --upstream-libs" flags
  • 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/mt41682_pciconf0 s SRIOV_EN=1
    mlxconfig -y -d /dev/mst/mt41682_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 DPU:

     options rshim backend_driver=rshim_usb

      

Note

  • When this line is commented, the first available driver will be used.
  • 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:

    NAME="tmfifo_net0"
    HWADDR="00:1a:ca:ff:ff:02"
    ONBOOT=yes
    NETBOOT=yes
    IPV6INIT=yes
    BOOTPROTO=static
    TYPE=Ethernet
    IPADDR=192.168.100.1
    NETMASK=255.255.255.0

      

ifcfg-tmfifo_net0 is the network interface used for IP communication between the x86 host and the DPU with rshim_net driver.


  • Enable ip forwarding and set a NAT rule to allow the DPU OS to communicate with the outer world via the host management interface:

    sysctl -w net.ipv4.ip_forward=1
    systemctl enable iptables
    systemctl start iptables
    iptables -F
    iptables -t nat -A POSTROUTING -o <host_mgmt_interfac> -j MASQUERADE
    service iptables save
  • Disable Firewall and Network Manager services

    systemctl disable firewalld.service
    systemctl disable NetworkManager
  • Reboot the server. Once server is up again, run some configuration sanity tests:
    • To verify BlueField FW version:

      mlxfwmanager --query
    •  To verify RShim modules are loaded:

      lsmod | grep -i rshim


    • To identify the backend active RShim driver:

       cat /dev/rshim0/misc
    • To verify the NAT rule for DPU communication with the outer world:

      iptables -L -n -t nat
  • Contact NVIDIA Support to download the BlueField Quick Start bfb image

  • Place the bfb image on the host and load it on the BlueField DPU using the following command:

     cat /home/CentOS7.5ALT-aarch64-QuickStart.bfb > /dev/rshim0/boot

      

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

When bfb image installation process is completed, connect to the DPU with the console or SSH, as described below, and test connectivity from the SmarNIC OS to the outer world.


DPU Management Methods 

 To manage the DPU from the hosting server, use one of the following methods.

Access Credentials: root\centos
  1. Console over USB-Serial / Serial Port properties: Rate 115200, HW Flow Control OFF.

    minicom -D /dev/ttyUSB0
    
  2. Console over USB (rshim_usb) / Serial Port properties: Rate 115200, HW Flow Control OFF

    minicom -D /dev/rshim0/console
    
  3. SSH (rshim_net)

    ssh root@192.168.100.2

      

Note

DPU OS is configured to obtain internet access via its hosting server.

  

Basic DPU Management Operations

How-to soft reset the DPU via host server:

  • Issue the following command on the server:

     echo "SW_RESET 1" > /dev/rshim0/misc
  • Follow the boot process using console access:

    minicom -D /dev/ttyUSB0 
    

      

Note

This is not a power cycle of the DPU.


  How-to load BlueField DPU OS image from hosting server:

  • Place bfb image on the server
  • Issue the following command on the server:

     cat <image>.bfb > /dev/rshim0/boot


  • Follow the installation and boot process using the console access:

    minicom -D /dev/ttyUSB0

      

DPU Modes

BlueField DPU can operate in two modes:

  • SEPERATED_HOST (default mode)

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

  • EMBEDDED

In this mode, the x86 hosting server communicates with the outer world only through the DPU Arm.


Note

In order to identify the DPU current mode, issue the following commands on the x86 hosting server:

 x86_host#mst start 
 x86_host#mlxconfig -d /dev/mst/mt41682_pciconf0 q | grep -i model


Switching to EMBEDDED Mode from SEPERATED_HOST Mode

On the x86 host:

  • Enable EMBEDDED mode:

    x86_host #mst start 
    x86_host #mlxconfig -d /dev/mst/mt41682_pciconf0 s INTERNAL_CPU_MODEL=1
  •  Reboot.


  • Verify:

    x86_host#mst start 
    x86_host#mlxconfig -d /dev/mst/mt41682_pciconf0 q | grep -i model

On the Arm:

  • Issue the following commands to enable ECPF parameters (applied per port):

    Note

    The ECPF parameters will be available for setting only after completing the previous steps.

      

    Snic#mst start
    Snic#mst status -v
    Snic#mlxconfig -d /dev/mst/mt41682_pciconf0 s ECPF_ESWITCH_MANAGER=1 ECPF_PAGE_SUPPLIER=1
    Snic#mlxconfig -d /dev/mst/mt41682_pciconf0.1 s ECPF_ESWITCH_MANAGER=1 ECPF_PAGE_SUPPLIER=1

      

  • Reboot the x86 host.
  • Verify configuration:
    • Once the procedure is completed, issue the following command on both the x86 host and the Arm:

      /opt/mellanox/iproute2/sbin/rdma link 

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

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

       
      On Arm: the output should list four representors:

      1/1: mlx5_0/1: state ACTIVE physical_state LINK_UP netdev rep0-ffff 
      2/1: mlx5_1/1: state ACTIVE physical_state LINK_UP netdev rep0-0 
      3/1: mlx5_2/1: state DOWN physical_state DISABLED netdev rep1-ffff 
      4/1: mlx5_3/1: state DOWN physical_state DISABLED netdev rep1-0 

        

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

    mst start
    mst status -v
    
    
    PCI devices:
    ------------
    DEVICE_TYPE MST PCI RDMA NET NUMA 
    BlueField(rev:0) NA 03:00.1 mlx5_3,mlx5_2 net-eth2,net-rep1-ffff -1 
    BlueField(rev:0) NA 03:00.0 mlx5_1,mlx5_0 net-rep0-ffff,net-eth1 -1 

Note

The rep0-0 / rep1-0 are the representors facing the x86 host and the rep0-ffff / rep1-ffff are the representors facing the network.



Switching to SEPERATED_HOST Mode from EMBEDDED Mode

On the x86 host:

  • Enable SEPERATED_HOST mode:

    x86_host #mst start 
    x86_host #mlxconfig -d /dev/mst/mt41682_pciconf0 s INTERNAL_CPU_MODEL=0
  • Reboot.
  • Verify:

    x86_host#mst start 
    x86_host#mlxconfig -d /dev/mst/mt41682_pciconf0 q | grep -i model

Testing Traffic in EMBEDDED Mode using OVS Offload

In Embedded mode, traffic from the x86 server hosting the DPU to the remote x86 server hosting the ConnectX-5 is going via the DPU Arm. OVS with offload capabilities is used to forward the traffic.

Follow the steps below to test traffic from x86 DPU hosting server, via Arm with OVS offload, to the remote ConnectX-5 server:

  • On the Arm OS create OVS bridge with the 2 representors of the used port and Offload capabilities: 

    ovs-vsctl add-br bf
    ovs-vsctl add-port bf rep0-ffff
    ovs-vsctl add-port bf rep0-0
    ifconfig rep0-ffff up
    ifconfig rep0-0 up
    ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
    systemctl restart openvswitch
    ovs-vsctl show
    
    
  • Set IP addresses on interface ens1f0 of the x86 host and on the ConnectX-5 host.
  • Test ping between x86 host and ConnectX-5 host (it will flow via the Arm OVS). To verify that traffic from Arm OVS is Offloaded to the HW, you can either:
    • Run tcpdump on the representors - only the first ICMP packets will be captured"

      tcpdump -en -i rep0-0
    • Dump the OVS offloaded flows:

      ovs-dpctl dump-flows type=offloaded --name
    • Dump the HW TC flow rules of the representors and look for the "in_hw" flag:

      tc -s filter show dev rep0-0 parent ffff:

        

  • On the ConnectX-5 external host, start iperf server:

    iperf -s
  • On the x86 host start iperf client:

    iperf -c 172.16.0.2 -P12
    
    

Authors

Itai Levy

Over the past few years, Itai Levy has worked as a Solutions Architect and member of the NVIDIA Networking “Solutions Labs” team. Itai designs and executes cutting-edge solutions around Cloud Computing, SDN, SDS and Security. His main areas of expertise include NVIDIA BlueField Data Processing Unit (DPU) solutions and accelerated OpenStack/K8s platforms.



Notice

This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product. Neither NVIDIA Corporation nor any of its direct or indirect subsidiaries and affiliates (collectively: “NVIDIA”) make any representations or warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assumes no responsibility for any errors contained herein. NVIDIA shall have no liability for the consequences or use of such information or for any infringement of patents or other rights of third parties that may result from its use. This document is not a commitment to develop, release, or deliver any Material (defined below), code, or functionality.
NVIDIA reserves the right to make corrections, modifications, enhancements, improvements, and any other changes to this document, at any time without notice.
Customer should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
NVIDIA products are sold subject to the NVIDIA standard terms and conditions of sale supplied at the time of order acknowledgement, unless otherwise agreed in an individual sales agreement signed by authorized representatives of NVIDIA and customer (“Terms of Sale”). NVIDIA hereby expressly objects to applying any customer general terms and conditions with regards to the purchase of the NVIDIA product referenced in this document. No contractual obligations are formed either directly or indirectly by this document.
NVIDIA products are not designed, authorized, or warranted to be suitable for use in medical, military, aircraft, space, or life support equipment, nor in applications where failure or malfunction of the NVIDIA product can reasonably be expected to result in personal injury, death, or property or environmental damage. NVIDIA accepts no liability for inclusion and/or use of NVIDIA products in such equipment or applications and therefore such inclusion and/or use is at customer’s own risk.
NVIDIA makes no representation or warranty that products based on this document will be suitable for any specified use. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to evaluate and determine the applicability of any information contained in this document, ensure the product is suitable and fit for the application planned by customer, and perform the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this document. NVIDIA accepts no liability related to any default, damage, costs, or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this document or (ii) customer product designs.
No license, either expressed or implied, is granted under any NVIDIA patent right, copyright, or other NVIDIA intellectual property right under this document. Information published by NVIDIA regarding third-party products or services does not constitute a license from NVIDIA to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property rights of the third party, or a license from NVIDIA under the patents or other intellectual property rights of NVIDIA.
Reproduction of information in this document is permissible only if approved in advance by NVIDIA in writing, reproduced without alteration and in full compliance with all applicable export laws and regulations, and accompanied by all associated conditions, limitations, and notices.
THIS DOCUMENT AND ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, “MATERIALS”) ARE BEING PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL NVIDIA BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms of Sale for the product.

Trademarks
NVIDIA, the NVIDIA logo, and Mellanox are trademarks and/or registered trademarks of NVIDIA Corporation and/or Mellanox Technologies Ltd. in the U.S. and in other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

Copyright
© 2022 NVIDIA Corporation & affiliates. All Rights Reserved.