xref: /dpdk/doc/guides/platform/bluefield.rst (revision 02d36ef6a9528e0f4a3403956e66bcea5fadbf8c)
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
23
24Common Offload HW Drivers
25-------------------------
26
271. **NIC Driver**
28
29   See :doc:`../nics/mlx5` for NVIDIA mlx5 NIC driver information.
30
312. **Cryptodev Driver**
32
33   This is based on the crypto extension support of armv8. See
34   :doc:`../cryptodevs/armv8` for armv8 crypto driver information.
35
36.. note::
37
38   BlueField has a variant having no armv8 crypto extension support.
39
40
41Steps To Setup Platform
42-----------------------
43
44Toolchains, OS and drivers can be downloaded and installed individually
45from the web, but it is recommended to follow instructions at:
46
47- `NVIDIA BlueField Software Website <https://docs.nvidia.com/networking/category/dpuos>`_
48
49
50Compile DPDK
51------------
52
53DPDK can be compiled either natively on BlueField platforms or cross-compiled on
54an x86 based platform.
55
56Native Compilation
57~~~~~~~~~~~~~~~~~~
58
59Refer to :doc:`../nics/mlx5` for prerequisites. Either NVIDIA MLNX_OFED/EN or
60rdma-core library with corresponding kernel drivers is required.
61
62.. code-block:: console
63
64        meson setup build
65        ninja -C build
66
67Cross Compilation
68~~~~~~~~~~~~~~~~~
69
70Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` to install the cross
71toolchain for ARM64. Base on that, additional header files and libraries are
72required:
73
74   - libibverbs
75   - libmlx5
76   - libnl-3
77   - libnl-route-3
78
79Such header files and libraries can be cross-compiled and installed
80in the cross toolchain environment.
81They can also be simply copied from the filesystem of a working BlueField platform.
82The following script can be run on a BlueField platform in order to create
83a supplementary tarball for the cross toolchain.
84
85.. code-block:: console
86
87        mkdir -p aarch64-linux-gnu/libc
88        pushd $PWD
89        cd aarch64-linux-gnu/libc
90
91        # Copy libraries
92        mkdir -p lib64
93        cp -a /lib64/libibverbs* lib64/
94        cp -a /lib64/libmlx5* lib64/
95        cp -a /lib64/libnl-3* lib64/
96        cp -a /lib64/libnl-route-3* lib64/
97
98        # Copy header files
99        mkdir -p usr/include/infiniband
100        cp -a /usr/include/infiniband/ib_user_ioctl_verbs.h usr/include/infiniband/
101        cp -a /usr/include/infiniband/mlx5*.h usr/include/infiniband/
102        cp -a /usr/include/infiniband/tm_types.h usr/include/infiniband/
103        cp -a /usr/include/infiniband/verbs*.h usr/include/infiniband/
104
105        # Create supplementary tarball
106        popd
107        tar cf aarch64-linux-gnu-mlx.tar aarch64-linux-gnu/
108
109Then, untar the tarball at the cross toolchain directory on the x86 host.
110
111.. code-block:: console
112
113        cd $(dirname $(which aarch64-linux-gnu-gcc))/..
114        tar xf aarch64-linux-gnu-mlx.tar
115
116.. code-block:: console
117
118        meson setup build --cross-file config/arm/arm64_bluefield_linux_gcc
119        ninja -C build
120