1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright 2017,2020 NXP
8 The DPAA NIC PMD (**librte_pmd_dpaa**) provides poll mode driver
9 support for the inbuilt NIC found in the **NXP DPAA** SoC family.
11 More information can be found at `NXP Official Website
12 <http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/qoriq-arm-processors:QORIQ-ARM>`_.
14 NXP DPAA (Data Path Acceleration Architecture - Gen 1)
15 ------------------------------------------------------
17 This section provides an overview of the NXP DPAA architecture
18 and how it is integrated into the DPDK.
23 - DPAA driver architecture overview
24 - FMAN configuration tools and library
31 Reference: `FSL DPAA Architecture <http://www.nxp.com/assets/documents/data/en/white-papers/QORIQDPAAWP.pdf>`_.
33 The QorIQ Data Path Acceleration Architecture (DPAA) is a set of hardware
34 components on specific QorIQ series multicore processors. This architecture
35 provides the infrastructure to support simplified sharing of networking
36 interfaces and accelerators by multiple CPU cores, and the accelerators
42 - Network and packet I/O
43 - Hardware offload accelerators
44 - Infrastructure required to facilitate flow of packets between the components above
46 Infrastructure components are:
48 - The Queue Manager (QMan) is a hardware accelerator that manages frame queues.
49 It allows CPUs and other accelerators connected to the SoC datapath to
50 enqueue and dequeue ethernet frames, thus providing the infrastructure for
51 data exchange among CPUs and datapath accelerators.
52 - The Buffer Manager (BMan) is a hardware buffer pool management block that
53 allows software and accelerators on the datapath to acquire and release
54 buffers in order to build frames.
56 Hardware accelerators are:
58 - SEC - Cryptographic accelerator
59 - PME - Pattern matching engine
61 The Network and packet I/O component:
63 - The Frame Manager (FMan) is a key component in the DPAA and makes use of the
64 DPAA infrastructure (QMan and BMan). FMan is responsible for packet
65 distribution and policing. Each frame can be parsed, classified and results
66 may be attached to the frame. This meta data can be used to select
67 particular QMan queue, which the packet is forwarded to.
70 DPAA DPDK - Poll Mode Driver Overview
71 -------------------------------------
73 This section provides an overview of the drivers for DPAA:
75 * Bus driver and associated "DPAA infrastructure" drivers
76 * Functional object drivers (such as Ethernet).
78 Brief description of each driver is provided in layout below as well as
79 in the following sections.
81 .. code-block:: console
88 +-----+------+ +---------------+
89 : Ethernet :.......| DPDK DPAA |
90 . . . . . . . . . : (FMAN) : | Mempool driver|
91 . +---+---+----+ | (BMAN) |
92 . ^ | +-----+---------+
97 . . . . . . . . . . .: Portal drv : .
102 +----+------+-------+ +-----+------+ .
103 | DPDK DPAA Bus | | .
104 | driver |....................|.....................
106 +-------------------+ |
108 ========================== HARDWARE =====|========================
110 =========================================|========================
112 In the above representation, solid lines represent components which interface
113 with DPDK RTE Framework and dotted lines represent DPAA internal components.
118 The DPAA bus driver is a ``rte_bus`` driver which scans the platform like bus.
119 Key functions include:
121 - Scanning and parsing the various objects and adding them to their respective
123 - Performing probe for available drivers against each scanned device
124 - Creating necessary ethernet instance before passing control to the PMD
126 DPAA NIC Driver (PMD)
127 ~~~~~~~~~~~~~~~~~~~~~
129 DPAA PMD is traditional DPDK PMD which provides necessary interface between
130 RTE framework and DPAA internal components/drivers.
132 - Once devices have been identified by DPAA Bus, each device is associated
134 - PMD is responsible for implementing necessary glue layer between RTE APIs
135 and lower level QMan and FMan blocks.
136 The Ethernet driver is bound to a FMAN port and implements the interfaces
137 needed to connect the DPAA network interface to the network stack.
138 Each FMAN Port corresponds to a DPDK network interface.
144 Features of the DPAA PMD are:
146 - Multiple queues for TX and RX
147 - Receive Side Scaling (RSS)
148 - Packet type information
155 DPAA has a hardware offloaded buffer pool manager, called BMan, or Buffer
158 - Using standard Mempools operations RTE API, the mempool driver interfaces
159 with RTE to service each mempool creation, deletion, buffer allocation and
160 deallocation requests.
161 - Each FMAN instance has a BMan pool attached to it during initialization.
162 Each Tx frame can be automatically released by hardware, if allocated from
166 Whitelisting & Blacklisting
167 ---------------------------
169 For blacklisting a DPAA device, following commands can be used.
171 .. code-block:: console
173 <dpdk app> <EAL args> -b "dpaa_bus:fmX-macY" -- ...
174 e.g. "dpaa_bus:fm1-mac4"
185 See :doc:`../platform/dpaa` for setup information
188 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>`
189 to setup the basic DPDK environment.
193 Some part of dpaa bus code (qbman and fman - library) routines are
194 dual licensed (BSD & GPLv2), however they are used as BSD in DPDK in userspace.
196 Pre-Installation Configuration
197 ------------------------------
202 The following options can be modified in the ``config`` file.
203 Please note that enabling debugging options may affect system performance.
205 - ``CONFIG_RTE_LIBRTE_DPAA_BUS`` (default ``y``)
207 Toggle compilation of the ``librte_bus_dpaa`` driver.
209 - ``CONFIG_RTE_LIBRTE_DPAA_PMD`` (default ``y``)
211 Toggle compilation of the ``librte_pmd_dpaa`` driver.
213 - ``CONFIG_RTE_LIBRTE_DPAA_DEBUG_DRIVER`` (default ``n``)
215 Toggles display of bus configurations and enables a debugging queue
216 to fetch error (Rx/Tx) packets to driver. By default, packets with errors
217 (like wrong checksum) are dropped by the hardware.
219 - ``CONFIG_RTE_LIBRTE_DPAA_HWDEBUG`` (default ``n``)
221 Enables debugging of the Queue and Buffer Manager layer which interacts
222 with the DPAA hardware.
225 Environment Variables
226 ~~~~~~~~~~~~~~~~~~~~~
228 DPAA drivers uses the following environment variables to configure its
229 state during application initialization:
231 - ``DPAA_NUM_RX_QUEUES`` (default 1)
233 This defines the number of Rx queues configured for an application, per
234 port. Hardware would distribute across these many number of queues on Rx
236 In case the application is configured to use lesser number of queues than
237 configured above, it might result in packet loss (because of distribution).
239 - ``DPAA_PUSH_QUEUES_NUMBER`` (default 4)
241 This defines the number of High performance queues to be used for ethdev Rx.
242 These queues use one private HW portal per queue configured, so they are
243 limited in the system. The first configured ethdev queues will be
244 automatically be assigned from the these high perf PUSH queues. Any queue
245 configuration beyond that will be standard Rx queues. The application can
246 choose to change their number if HW portals are limited.
247 The valid values are from '0' to '4'. The values shall be set to '0' if the
248 application want to use eventdev with DPAA device.
249 Currently these queues are not used for LS1023/LS1043 platform by default.
252 Driver compilation and testing
253 ------------------------------
255 Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
260 Follow instructions available in the document
261 :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
266 .. code-block:: console
268 ./arm64-dpaa-linux-gcc/testpmd -c 0xff -n 1 \
269 -- -i --portmask=0x3 --nb-cores=1 --no-flush-rx
272 EAL: Registered [pci] bus.
273 EAL: Registered [dpaa] bus.
274 EAL: Detected 4 lcore(s)
276 EAL: dpaa: Bus scan completed
278 Configuring Port 0 (socket 0)
279 Port 0: 00:00:00:00:00:01
280 Configuring Port 1 (socket 0)
281 Port 1: 00:00:00:00:00:02
283 Checking link statuses...
284 Port 0 Link Up - speed 10000 Mbps - full-duplex
285 Port 1 Link Up - speed 10000 Mbps - full-duplex
292 Frame Manager is also responsible for parser, classify and distribute
293 functionality in the DPAA.
296 Packet parsing at wire speed. It supports standard protocols parsing and
297 identification by HW (VLAN/IP/UDP/TCP/SCTP/PPPoE/PPP/MPLS/GRE/IPSec).
298 It supports non-standard UDF header parsing for custom protocols.
299 Classification / Distribution: Coarse classification based on Key generation
300 Hash and exact match lookup
302 FMC - FMAN Configuration Tool
303 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304 This tool is available in User Space. The tool is used to configure FMAN
305 Physical (MAC) or Ephemeral (OH)ports for Parse/Classify/distribute.
306 The PCDs can be hash based where a set of fields are key input for hash
307 generation within FMAN keygen. The hash value is used to generate a FQID for
308 frame. There is a provision to setup exact match lookup too where field
309 values within a packet drives corresponding FQID.
310 Currently it works on XML file inputs.
313 1.For Dynamic Configuration change, currently no support is available.
314 E.g. enable/disable a port, a operator (set of VLANs and associate rules).
316 2.During FMC configuration, port for which policy is being configured is
317 brought down and the policy is flushed on port before new policy is updated
318 for the port. Support is required to add/append/delete etc.
320 3.FMC, being a separate user-space application, needs to be invoked from
324 The details can be found in FMC Doc at:
325 `Frame Mnager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.
329 The Frame Manager library provides an API on top of the Frame Manager driver
330 ioctl calls, that provides a user space application with a simple way to
331 configure driver parameters and PCD (parse - classify - distribute) rules.
333 This is an alternate to the FMC based configuration. This library provides
334 direct ioctl based interfaces for FMAN configuration as used by the FMC tool
335 as well. This helps in overcoming the main limitaiton of FMC - i.e. lack
336 of dynamic configuration.
338 The location for the fmd driver as used by FMLIB and FMC is as follows:
340 <https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/drivers/net/ethernet/freescale/sdk_fman?h=linux-4.19-rt>`_.
342 VSP (Virtual Storage Profile)
343 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344 The storage profiled are means to provide virtualized interface. A ranges of
345 storage profiles cab be associated to Ethernet ports.
346 They are selected during classification. Specify how the frame should be
347 written to memory and which buffer pool to select for packet storange in
348 queues. Start and End margin of buffer can also be configured.
356 DPAA drivers for DPDK can only work on NXP SoCs as listed in the
357 ``Supported DPAA SoCs``.
359 Maximum packet length
360 ~~~~~~~~~~~~~~~~~~~~~
362 The DPAA SoC family support a maximum of a 10240 jumbo frame. The value
363 is fixed and cannot be changed. So, even when the ``rxmode.max_rx_pkt_len``
364 member of ``struct rte_eth_conf`` is set to a value lower than 10240, frames
365 up to 10240 bytes can still reach the host interface.
370 Current version of DPAA driver doesn't support multi-process applications
371 where I/O is performed using secondary processes. This feature would be
372 implemented in subsequent versions.