net/enetfec: introduce driver
[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 - Linux
88 - ARMv8
89
90 Supported ENETFEC SoCs
91 ----------------------
92
93 - i.MX 8M Mini
94
95 Prerequisites
96 -------------
97
98 There are three main pre-requisites for executing ENETFEC PMD on a i.MX 8M Mini
99 compatible board:
100
101 1. **ARM 64 Tool Chain**
102
103    For example, the `*aarch64* Linaro Toolchain
104    <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>`_.
105
106 2. **Linux Kernel**
107
108    It can be obtained from `NXP's Github hosting
109    <https://source.codeaurora.org/external/qoriq/qoriq-components/linux>`_.
110
111 .. note::
112
113    Branch is 'lf-5.10.y'
114
115 3. **Rootfile system**
116
117    Any *aarch64* supporting filesystem can be used.
118    For example, Ubuntu 18.04 LTS (Bionic) or 20.04 LTS(Focal) userland
119    which can be obtained from `here
120    <http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.1-base-arm64.tar.gz>`_.
121
122 4. The Ethernet device will be registered as virtual device,
123    so ENETFEC has dependency on **rte_bus_vdev** library
124    and it is mandatory to use `--vdev` with value `net_enetfec`
125    to run DPDK application.
126
127 Driver compilation and testing
128 ------------------------------
129
130 Follow instructions available in the document :doc:`build_and_test`
131 to launch **dpdk-testpmd**.
132
133 Limitations
134 -----------
135
136 - Multi queue is not supported.