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