894db2c2a4766b1a450e11190074108cd78e0852
[dpdk.git] / doc / guides / platform / bluefield.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright 2019 Mellanox Technologies, Ltd
3
4 Mellanox BlueField Board Support Package
5 ========================================
6
7 This document has information about steps to setup Mellanox BlueField platform
8 and common offload HW drivers of **Mellanox BlueField** family SoC.
9
10
11 Supported BlueField family SoCs
12 -------------------------------
13
14 - `BlueField <http://www.mellanox.com/page/products_dyn?product_family=256&mtag=soc_overview>`_
15
16
17 Supported BlueField Platforms
18 -----------------------------
19
20 - `BlueField SmartNIC <http://www.mellanox.com/page/products_dyn?product_family=275&mtag=bluefield_smart_nic>`_
21 - `BlueField Reference Platforms <http://www.mellanox.com/page/products_dyn?product_family=286&mtag=bluefield_platforms>`_
22 - `BlueField Controller Card <http://www.mellanox.com/page/products_dyn?product_family=288&mtag=bluefield_controller_card>`_
23
24
25 Common Offload HW Drivers
26 -------------------------
27
28 1. **NIC Driver**
29
30    See :doc:`../nics/mlx5` for Mellanox mlx5 NIC driver information.
31
32 2. **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
42 Steps To Setup Platform
43 -----------------------
44
45 Toolchains, OS and drivers can be downloaded and installed individually from the
46 Web. But it is recommended to follow instructions at
47 `Mellanox BlueField Software Website
48 <http://www.mellanox.com/page/products_dyn?product_family=279&mtag=bluefield_software>`_.
49
50
51 Compile DPDK
52 ------------
53
54 DPDK can be compiled either natively on BlueField platforms or cross-compiled on
55 an x86 based platform.
56
57 Native Compilation
58 ~~~~~~~~~~~~~~~~~~
59
60 Refer to :doc:`../nics/mlx5` for prerequisites. Either Mellanox OFED/EN or
61 rdma-core library with corresponding kernel drivers is required.
62
63 make build
64 ^^^^^^^^^^
65
66 .. code-block:: console
67
68         make config T=arm64-bluefield-linux-gcc
69         make -j
70
71 meson build
72 ^^^^^^^^^^^
73
74 .. code-block:: console
75
76         meson build
77         ninja -C build
78
79 Cross Compilation
80 ~~~~~~~~~~~~~~~~~
81
82 Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` to install the cross
83 toolchain for ARM64. Base on that, additional header files and libraries are
84 required:
85
86    - libibverbs
87    - libmnl
88    - libmlx5
89    - libnl-3
90    - libnl-route-3
91
92 Such header files and libraries can be cross-compiled and installed on to the
93 cross toolchain directory like depicted in
94 :ref:`arm_cross_build_getting_the_prerequisite_library`, but those can also be
95 simply copied from the filesystem of a working BlueField platform. The following
96 script can be run on a BlueField platform in order to create a supplementary
97 tarball for the cross toolchain.
98
99 .. code-block:: console
100
101         mkdir -p aarch64-linux-gnu/libc
102         pushd $PWD
103         cd aarch64-linux-gnu/libc
104
105         # Copy libraries
106         mkdir -p lib64
107         cp -a /lib64/libibverbs* lib64/
108         cp -a /lib64/libmnl* lib64/
109         cp -a /lib64/libmlx5* lib64/
110         cp -a /lib64/libnl-3* lib64/
111         cp -a /lib64/libnl-route-3* lib64/
112
113         # Copy header files
114         mkdir -p usr/include/infiniband
115         mkdir -p usr/include/libmnl
116         cp -a /usr/include/infiniband/ib_user_ioctl_verbs.h usr/include/infiniband/
117         cp -a /usr/include/infiniband/mlx5*.h usr/include/infiniband/
118         cp -a /usr/include/infiniband/tm_types.h usr/include/infiniband/
119         cp -a /usr/include/infiniband/verbs*.h usr/include/infiniband/
120         cp -a /usr/include/libmnl/libmnl.h usr/include/libmnl/
121
122         # Create supplementary tarball
123         popd
124         tar cf aarch64-linux-gnu-mlx.tar aarch64-linux-gnu/
125
126 Then, untar the tarball at the cross toolchain directory on the x86 host.
127
128 .. code-block:: console
129
130         cd $(dirname $(which aarch64-linux-gnu-gcc))/..
131         tar xf aarch64-linux-gnu-mlx.tar
132
133 make build
134 ^^^^^^^^^^
135
136 .. code-block:: console
137
138         make config T=arm64-bluefield-linux-gcc
139         make -j CROSS=aarch64-linux-gnu- CONFIG_RTE_KNI_KMOD=n CONFIG_RTE_EAL_IGB_UIO=n
140
141 meson build
142 ^^^^^^^^^^^
143
144 .. code-block:: console
145
146         meson build --cross-file config/arm/arm64_bluefield_linux_gcc
147         ninja -C build