a64e72fdd697aa3562e3a7aad21271bb4287f7cf
[dpdk.git] / doc / guides / nics / enetfec.rst
1 .. SPDX-License-Identifier: BSD-3-Clause
2    Copyright 2021 NXP
3
4 ENETFEC Poll Mode Driver
5 ========================
6
7 The ENETFEC NIC PMD (**librte_net_enetfec**) provides poll mode driver
8 support for the inbuilt NIC found in the ** NXP i.MX 8M Mini** SoC.
9
10 More information can be found at NXP Official Website
11 <https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-processors/i-mx-8m-mini-arm-cortex-a53-cortex-m4-audio-voice-video:i.MX8MMINI>
12
13 This section provides an overview of the NXP ENETFEC
14 and how it is integrated into the DPDK.
15 Driver is taken as **experimental**
16 as driver depends on a Linux kernel module 'enetfec-uio',
17 which is not upstreamed yet.
18
19 Contents summary
20
21 - ENETFEC overview
22 - ENETFEC features
23 - Supported ENETFEC SoCs
24 - Prerequisites
25 - Driver compilation and testing
26 - Limitations
27
28 ENETFEC Overview
29 ----------------
30
31 The i.MX 8M Mini Media Applications Processor is built
32 to achieve both high performance and low power consumption.
33 ENETFEC PMD is a hardware programmable packet forwarding engine
34 to provide high performance Ethernet interface.
35 It has only 1 GB Ethernet interface with RJ45 connector.
36
37 The diagram below shows a system level overview of ENETFEC:
38
39   .. code-block:: console
40
41    =====================================================
42    Userspace
43         +-----------------------------------------+
44         |             ENETFEC Driver              |
45         |        +-------------------------+      |
46         |        | virtual ethernet device |      |
47         +-----------------------------------------+
48                           ^   |
49                           |   |
50                           |   |
51                      RXQ  |   | TXQ
52                           |   |
53                           |   v
54    =====================================================
55    Kernel Space
56                        +---------+
57                        | fec-uio |
58    ====================+=========+======================
59    Hardware
60         +-----------------------------------------+
61         |           i.MX 8M MINI EVK              |
62         |               +-----+                   |
63         |               | MAC |                   |
64         +---------------+-----+-------------------+
65                         | PHY |
66                         +-----+
67
68 ENETFEC Ethernet driver is traditional DPDK PMD driver running in userspace.
69 'fec-uio' is the kernel driver.
70 The MAC and PHY are the hardware blocks.
71 ENETFEC PMD uses standard UIO interface to access kernel
72 for PHY initialisation and for mapping the allocated memory
73 of register & buffer descriptor with DPDK
74 which gives access to non-cacheable memory for buffer descriptor.
75 net_enetfec is logical Ethernet interface, created by ENETFEC driver.
76
77 - ENETFEC driver registers the device in virtual device driver.
78 - RTE framework scans and will invoke the probe function of ENETFEC driver.
79 - The probe function will set the basic device registers and also setups BD rings.
80 - On packet Rx the respective BD Ring status bit is set which is then used for
81   packet processing.
82 - Then Tx is done first followed by Rx via logical interfaces.
83
84 ENETFEC Features
85 ----------------
86
87 - Basic stats
88 - Promiscuous
89 - VLAN offload
90 - L3/L4 checksum offload
91 - Linux
92 - ARMv8
93
94 Supported ENETFEC SoCs
95 ----------------------
96
97 - i.MX 8M Mini
98
99 Prerequisites
100 -------------
101
102 There are three main pre-requisites for executing ENETFEC PMD on a i.MX 8M Mini
103 compatible board:
104
105 1. **ARM 64 Tool Chain**
106
107    For example, the `*aarch64* Linaro Toolchain
108    <https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz>`_.
109
110 2. **Linux Kernel**
111
112    It can be obtained from `NXP's Github hosting
113    <https://source.codeaurora.org/external/qoriq/qoriq-components/linux>`_.
114
115 .. note::
116
117    Branch is 'lf-5.10.y'
118
119 3. **Rootfile system**
120
121    Any *aarch64* supporting filesystem can be used.
122    For example, Ubuntu 18.04 LTS (Bionic) or 20.04 LTS(Focal) userland
123    which can be obtained from `here
124    <http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-arm64.tar.gz>`_.
125
126 4. The Ethernet device will be registered as virtual device,
127    so ENETFEC has dependency on **rte_bus_vdev** library
128    and it is mandatory to use `--vdev` with value `net_enetfec`
129    to run DPDK application.
130
131 Driver compilation and testing
132 ------------------------------
133
134 Follow instructions available in the document :doc:`build_and_test`
135 to launch **dpdk-testpmd**.
136
137 Limitations
138 -----------
139
140 - Multi queue is not supported.