1 Freescale DPAA2 Ethernet driver
2 ===============================
4 This file provides documentation for the Freescale DPAA2 Ethernet driver.
11 Creating a Network Interface
17 This driver provides networking support for Freescale DPAA2 SoCs, e.g.
18 LS2080A, LS2088A, LS1088A.
23 Unlike regular NICs, in the DPAA2 architecture there is no single hardware block
24 representing network interfaces; instead, several separate hardware resources
25 concur to provide the networking functionality:
31 All hardware resources are allocated and configured through the Management
32 Complex (MC) portals. MC abstracts most of these resources as DPAA2 objects
33 and exposes ABIs through which they can be configured and controlled. A few
34 hardware resources, like queues, do not have a corresponding MC object and
35 are treated as internal resources of other objects.
37 For a more detailed description of the DPAA2 architecture and its object
39 drivers/staging/fsl-mc/README.txt
41 Each Linux net device is built on top of a Datapath Network Interface (DPNI)
42 object and uses Buffer Pools (DPBPs), I/O Portals (DPIOs) and Concentrators
45 Configuration interface:
47 -----------------------
48 | DPAA2 Ethernet Driver |
49 -----------------------
52 . . . . . . . . . . . .
55 ---------- ---------- -----------
56 | DPBP API | | DPNI API | | DPCON API |
57 ---------- ---------- -----------
59 =========== . ========== . ============ . ===================
61 ------------------------------------------
62 | MC hardware portals |
63 ------------------------------------------
67 | DPBP | | DPNI | | DPCON |
70 The DPNIs are network interfaces without a direct one-on-one mapping to PHYs.
71 DPBPs represent hardware buffer pools. Packet I/O is performed in the context
72 of DPCON objects, using DPIO portals for managing and communicating with the
75 Datapath (I/O) interface:
77 -----------------------------------------------
78 | DPAA2 Ethernet Driver |
79 -----------------------------------------------
82 enqueue| dequeue| data | dequeue| seed |
83 (Tx) | (Rx, TxC)| avail.| request| buffers|
87 -----------------------------------------------
89 -----------------------------------------------
91 | | | | | ================
93 -----------------------------------------------
94 | I/O hardware portals |
95 -----------------------------------------------
99 V | ================ V
100 ---------------------- | -------------
101 queues ---------------------- | | Buffer pool |
102 ---------------------- | -------------
103 =======================
106 Datapath I/O (DPIO) portals provide enqueue and dequeue services, data
107 availability notifications and buffer pool management. DPIOs are shared between
108 all DPAA2 objects (and implicitly all DPAA2 kernel drivers) that work with data
109 frames, but must be affine to the CPUs for the purpose of traffic distribution.
111 Frames are transmitted and received through hardware frame queues, which can be
112 grouped in channels for the purpose of hardware scheduling. The Ethernet driver
113 enqueues TX frames on egress queues and after transmission is complete a TX
114 confirmation frame is sent back to the CPU.
116 When frames are available on ingress queues, a data availability notification
117 is sent to the CPU; notifications are raised per channel, so even if multiple
118 queues in the same channel have available frames, only one notification is sent.
119 After a channel fires a notification, is must be explicitly rearmed.
121 Each network interface can have multiple Rx, Tx and confirmation queues affined
122 to CPUs, and one channel (DPCON) for each CPU that services at least one queue.
123 DPCONs are used to distribute ingress traffic to different CPUs via the cores'
126 The role of hardware buffer pools is storage of ingress frame data. Each network
127 interface has a privately owned buffer pool which it seeds with kernel allocated
131 DPNIs are decoupled from PHYs; a DPNI can be connected to a PHY through a DPMAC
132 object or to another DPNI through an internal link, but the connection is
133 managed by MC and completely transparent to the Ethernet driver.
135 --------- --------- ---------
136 | eth if1 | | eth if2 | | eth ifn |
137 --------- --------- ---------
141 ---------------------------
142 | DPAA2 Ethernet Driver |
143 ---------------------------
147 ------ ------ ------ -------
148 | DPNI | | DPNI | | DPNI | | DPMAC |----+
149 ------ ------ ------ ------- |
152 =========== ================== | PHY |
155 Creating a Network Interface
156 ============================
157 A net device is created for each DPNI object probed on the MC bus. Each DPNI has
158 a number of properties which determine the network interface configuration
159 options and associated hardware resources.
161 DPNI objects (and the other DPAA2 objects needed for a network interface) can be
162 added to a container on the MC bus in one of two ways: statically, through a
163 Datapath Layout Binary file (DPL) that is parsed by MC at boot time; or created
164 dynamically at runtime, via the DPAA2 objects APIs.
169 Hardware checksum offloading is supported for TCP and UDP over IPv4/6 frames.
170 The checksum offloads can be independently configured on RX and TX through
173 Hardware offload of unicast and multicast MAC filtering is supported on the
174 ingress path and permanently enabled.
176 Scatter-gather frames are supported on both RX and TX paths. On TX, SG support
177 is configurable via ethtool; on RX it is always enabled.
179 The DPAA2 hardware can process jumbo Ethernet frames of up to 10K bytes.
181 The Ethernet driver defines a static flow hashing scheme that distributes
182 traffic based on a 5-tuple key: src IP, dst IP, IP proto, L4 src port,
183 L4 dst port. No user configuration is supported for now.
185 Hardware specific statistics for the network interface as well as some
186 non-standard driver stats can be consulted through ethtool -S option.