gso: fix mbuf freeing responsibility
[dpdk.git] / doc / guides / platform / octeontx.rst
index 9f75d2a..42ddb17 100644 (file)
@@ -15,11 +15,15 @@ More information about SoC can be found at `Cavium, Inc Official Website
 Common Offload HW Block Drivers
 -------------------------------
 
 Common Offload HW Block Drivers
 -------------------------------
 
-1. **Eventdev Driver**
+1. **Crypto Driver**
+   See :doc:`../cryptodevs/octeontx` for octeontx crypto driver
+   information.
+
+2. **Eventdev Driver**
    See :doc:`../eventdevs/octeontx` for octeontx ssovf eventdev driver
    information.
 
    See :doc:`../eventdevs/octeontx` for octeontx ssovf eventdev driver
    information.
 
-2. **Mempool Driver**
+3. **Mempool Driver**
    See :doc:`../mempool/octeontx` for octeontx fpavf mempool driver
    information.
 
    See :doc:`../mempool/octeontx` for octeontx fpavf mempool driver
    information.
 
@@ -35,6 +39,12 @@ OCTEON TX compatible board:
    Platform drivers) are available on Github at `octeontx-kmod <https://github.com/caviumnetworks/octeontx-kmod>`_
    along with build, install and dpdk usage instructions.
 
    Platform drivers) are available on Github at `octeontx-kmod <https://github.com/caviumnetworks/octeontx-kmod>`_
    along with build, install and dpdk usage instructions.
 
+.. note::
+
+   The PF driver and the required microcode for the crypto offload block will be
+   available with OCTEON TX SDK only. So for using crypto offload, follow the steps
+   mentioned in :ref:`setup_platform_using_OCTEON_TX_SDK`.
+
 2. **ARM64 Tool Chain**
 
    For example, the *aarch64* Linaro Toolchain, which can be obtained from
 2. **ARM64 Tool Chain**
 
    For example, the *aarch64* Linaro Toolchain, which can be obtained from
@@ -48,8 +58,91 @@ OCTEON TX compatible board:
 
    As an alternative method, Platform drivers can also be executed using images provided
    as part of SDK from Cavium. The SDK includes all the above prerequisites necessary
 
    As an alternative method, Platform drivers can also be executed using images provided
    as part of SDK from Cavium. The SDK includes all the above prerequisites necessary
-   to bring up a OCTEON TX board.
-
-   SDK and related information can be obtained from: `Cavium support site <https://support.cavium.com/>`_.
+   to bring up a OCTEON TX board. Please refer :ref:`setup_platform_using_OCTEON_TX_SDK`.
 
 - Follow the DPDK :doc:`../linux_gsg/index` to setup the basic DPDK environment.
 
 - Follow the DPDK :doc:`../linux_gsg/index` to setup the basic DPDK environment.
+
+.. _setup_platform_using_OCTEON_TX_SDK:
+
+Setup Platform Using OCTEON TX SDK
+----------------------------------
+
+The OCTEON TX platform drivers can be compiled either natively on
+**OCTEON TX** :sup:`®` board or cross-compiled on an x86 based platform.
+
+The **OCTEON TX** :sup:`®` board must be running the linux kernel based on
+OCTEON TX SDK 6.2.0 patch 3. In this, the PF drivers for all hardware
+offload blocks are already built in.
+
+Native Compilation
+~~~~~~~~~~~~~~~~~~
+
+If the kernel and modules are cross-compiled and copied to the target board,
+some intermediate binaries required for native build would be missing on the
+target board. To make sure all the required binaries are available in the
+native architecture, the linux sources need to be compiled once natively.
+
+.. code-block:: console
+
+        cd /lib/modules/$(uname -r)/source
+        make menuconfig
+        make
+
+The above steps would rebuild the modules and the required intermediate binaries.
+Once the target is ready for native compilation, the OCTEON TX platform
+drivers can be compiled with the following steps,
+
+.. code-block:: console
+
+        meson build -Dexamples=<application>
+        ninja -C build
+
+The example applications can be compiled using the following:
+
+.. code-block:: console
+
+        meson build -Dexamples=<application>
+        ninja -C build
+
+Cross Compilation
+~~~~~~~~~~~~~~~~~
+
+The DPDK applications can be cross-compiled on any x86 based platform. The
+OCTEON TX SDK need to be installed on the build system. The SDK package will
+provide the required toolchain etc.
+
+Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` for generic arm64 details.
+
+The following steps can be used to perform cross-compilation with OCTEON TX
+SDK 6.2.0 patch 3:
+
+.. code-block:: console
+
+        cd <sdk_install_dir>
+        source env-setup
+
+The above steps will prepare build system with required toolchain.
+Now this build system can be used to build applications for **OCTEON TX** :sup:`®` platforms.
+
+.. code-block:: console
+
+        cd <dpdk directory>
+        meson build --cross-file config/arm/arm64_thunderx_linux_gcc
+        ninja -C build
+
+The example applications can be compiled using the following:
+
+.. code-block:: console
+
+        cd <dpdk directory>
+        meson build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application>
+        ninja -C build
+
+.. note::
+
+   By default, meson cross compilation uses ``aarch64-linux-gnu-gcc`` toolchain,
+   if OCTEON TX SDK 6.2.0 patch 3 is available then it can be used by
+   overriding the c, cpp, ar, strip ``binaries`` attributes to respective thunderx
+   toolchain binaries in ``config/arm/arm64_thunderx_linux_gcc`` file.
+
+SDK and related information can be obtained from: `Cavium support site <https://support.cavium.com/>`_.