1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright 2019 Mellanox Technologies, Ltd 3 4NVIDIA BlueField Board Support Package 5====================================== 6 7.. note:: 8 9 NVIDIA acquired Mellanox Technologies in 2020. 10 The DPDK documentation and code might still include instances 11 of or references to Mellanox trademarks (like BlueField and ConnectX) 12 that are now NVIDIA trademarks. 13 14This document has information about steps to setup NVIDIA BlueField platform 15and common offload HW drivers of **NVIDIA BlueField** family SoC. 16 17 18Supported BlueField Platforms 19----------------------------- 20 21- `BlueField-2 <https://docs.nvidia.com/networking/display/BlueField2DPUENUG/Introduction>`_ 22- `BlueField-3 <https://docs.nvidia.com/networking/display/BlueField3DPU/Introduction>`_ 23 24 25Common Offload HW Drivers 26------------------------- 27 28#. **NIC Driver** 29 30 See :doc:`../nics/mlx5` for NVIDIA mlx5 NIC driver information. 31 32#. **Cryptodev Driver** 33 34 This is based on the crypto extension support of armv8. See 35 :doc:`../cryptodevs/armv8` for armv8 crypto driver information. 36 37.. note:: 38 39 BlueField has a variant having no armv8 crypto extension support. 40 41 42Steps To Setup Platform 43----------------------- 44 45Toolchains, OS and drivers can be downloaded and installed individually 46from the web, but it is recommended to follow instructions at: 47 48- `NVIDIA BlueField Software Website <https://docs.nvidia.com/networking/category/dpuos>`_ 49 50 51Compile DPDK 52------------ 53 54DPDK can be compiled either natively on BlueField platforms or cross-compiled on 55an x86 based platform. 56 57Native Compilation 58~~~~~~~~~~~~~~~~~~ 59 60Refer to :doc:`../nics/mlx5` for prerequisites. Either NVIDIA MLNX_OFED/EN or 61rdma-core library with corresponding kernel drivers is required. 62 63.. code-block:: console 64 65 meson setup build 66 ninja -C build 67 68Cross Compilation 69~~~~~~~~~~~~~~~~~ 70 71Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` to install the cross 72toolchain for ARM64. Base on that, additional header files and libraries are 73required: 74 75 - libibverbs 76 - libmlx5 77 - libnl-3 78 - libnl-route-3 79 80Such header files and libraries can be cross-compiled and installed 81in the cross toolchain environment. 82They can also be simply copied from the filesystem of a working BlueField platform. 83The following script can be run on a BlueField platform in order to create 84a supplementary tarball for the cross toolchain. 85 86.. code-block:: console 87 88 mkdir -p aarch64-linux-gnu/libc 89 pushd $PWD 90 cd aarch64-linux-gnu/libc 91 92 # Copy libraries 93 mkdir -p lib64 94 cp -a /lib64/libibverbs* lib64/ 95 cp -a /lib64/libmlx5* lib64/ 96 cp -a /lib64/libnl-3* lib64/ 97 cp -a /lib64/libnl-route-3* lib64/ 98 99 # Copy header files 100 mkdir -p usr/include/infiniband 101 cp -a /usr/include/infiniband/ib_user_ioctl_verbs.h usr/include/infiniband/ 102 cp -a /usr/include/infiniband/mlx5*.h usr/include/infiniband/ 103 cp -a /usr/include/infiniband/tm_types.h usr/include/infiniband/ 104 cp -a /usr/include/infiniband/verbs*.h usr/include/infiniband/ 105 106 # Create supplementary tarball 107 popd 108 tar cf aarch64-linux-gnu-mlx.tar aarch64-linux-gnu/ 109 110Then, untar the tarball at the cross toolchain directory on the x86 host. 111 112.. code-block:: console 113 114 cd $(dirname $(which aarch64-linux-gnu-gcc))/.. 115 tar xf aarch64-linux-gnu-mlx.tar 116 117.. code-block:: console 118 119 meson setup build --cross-file config/arm/arm64_bluefield_linux_gcc 120 ninja -C build 121