]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - Documentation/networking/dpaa.txt
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
[mirror_ubuntu-artful-kernel.git] / Documentation / networking / dpaa.txt
CommitLineData
5ee6842c
MB
1The QorIQ DPAA Ethernet Driver
2==============================
3
4Authors:
5Madalin Bucur <madalin.bucur@nxp.com>
6Camelia Groza <camelia.groza@nxp.com>
7
8Contents
9========
10
11 - DPAA Ethernet Overview
12 - DPAA Ethernet Supported SoCs
13 - Configuring DPAA Ethernet in your kernel
14 - DPAA Ethernet Frame Processing
15 - DPAA Ethernet Features
16 - Debugging
17
18DPAA Ethernet Overview
19======================
20
21DPAA stands for Data Path Acceleration Architecture and it is a
22set of networking acceleration IPs that are available on several
23generations of SoCs, both on PowerPC and ARM64.
24
25The Freescale DPAA architecture consists of a series of hardware blocks
26that support Ethernet connectivity. The Ethernet driver depends upon the
27following drivers in the Linux kernel:
28
29 - Peripheral Access Memory Unit (PAMU) (* needed only for PPC platforms)
30 drivers/iommu/fsl_*
31 - Frame Manager (FMan)
32 drivers/net/ethernet/freescale/fman
33 - Queue Manager (QMan), Buffer Manager (BMan)
34 drivers/soc/fsl/qbman
35
36A simplified view of the dpaa_eth interfaces mapped to FMan MACs:
37
38 dpaa_eth /eth0\ ... /ethN\
39 driver | | | |
40 ------------- ---- ----------- ---- -------------
41 -Ports / Tx Rx \ ... / Tx Rx \
42 FMan | | | |
43 -MACs | MAC0 | | MACN |
44 / dtsec0 \ ... / dtsecN \ (or tgec)
45 / \ / \(or memac)
46 --------- -------------- --- -------------- ---------
47 FMan, FMan Port, FMan SP, FMan MURAM drivers
48 ---------------------------------------------------------
49 FMan HW blocks: MURAM, MACs, Ports, SP
50 ---------------------------------------------------------
51
52The dpaa_eth relation to the QMan, BMan and FMan:
53 ________________________________
54 dpaa_eth / eth0 \
55 driver / \
56 --------- -^- -^- -^- --- ---------
57 QMan driver / \ / \ / \ \ / | BMan |
58 |Rx | |Rx | |Tx | |Tx | | driver |
59 --------- |Dfl| |Err| |Cnf| |FQs| | |
60 QMan HW |FQ | |FQ | |FQs| | | | |
61 / \ / \ / \ \ / | |
62 --------- --- --- --- -v- ---------
63 | FMan QMI | |
64 | FMan HW FMan BMI | BMan HW |
65 ----------------------- --------
66
67where the acronyms used above (and in the code) are:
68DPAA = Data Path Acceleration Architecture
69FMan = DPAA Frame Manager
70QMan = DPAA Queue Manager
71BMan = DPAA Buffers Manager
72QMI = QMan interface in FMan
73BMI = BMan interface in FMan
74FMan SP = FMan Storage Profiles
75MURAM = Multi-user RAM in FMan
76FQ = QMan Frame Queue
77Rx Dfl FQ = default reception FQ
78Rx Err FQ = Rx error frames FQ
79Tx Cnf FQ = Tx confirmation FQs
80Tx FQs = transmission frame queues
81dtsec = datapath three speed Ethernet controller (10/100/1000 Mbps)
82tgec = ten gigabit Ethernet controller (10 Gbps)
83memac = multirate Ethernet MAC (10/100/1000/10000)
84
85DPAA Ethernet Supported SoCs
86============================
87
88The DPAA drivers enable the Ethernet controllers present on the following SoCs:
89
90# PPC
91P1023
92P2041
93P3041
94P4080
95P5020
96P5040
97T1023
98T1024
99T1040
100T1042
101T2080
102T4240
103B4860
104
105# ARM
106LS1043A
107LS1046A
108
109Configuring DPAA Ethernet in your kernel
110========================================
111
112To enable the DPAA Ethernet driver, the following Kconfig options are required:
113
114# common for arch/arm64 and arch/powerpc platforms
115CONFIG_FSL_DPAA=y
116CONFIG_FSL_FMAN=y
117CONFIG_FSL_DPAA_ETH=y
118CONFIG_FSL_XGMAC_MDIO=y
119
120# for arch/powerpc only
121CONFIG_FSL_PAMU=y
122
123# common options needed for the PHYs used on the RDBs
124CONFIG_VITESSE_PHY=y
125CONFIG_REALTEK_PHY=y
126CONFIG_AQUANTIA_PHY=y
127
128DPAA Ethernet Frame Processing
129==============================
130
131On Rx, buffers for the incoming frames are retrieved from one of the three
132existing buffers pools. The driver initializes and seeds these, each with
133buffers of different sizes: 1KB, 2KB and 4KB.
134
135On Tx, all transmitted frames are returned to the driver through Tx
136confirmation frame queues. The driver is then responsible for freeing the
137buffers. In order to do this properly, a backpointer is added to the buffer
138before transmission that points to the skb. When the buffer returns to the
139driver on a confirmation FQ, the skb can be correctly consumed.
140
141DPAA Ethernet Features
142======================
143
144Currently the DPAA Ethernet driver enables the basic features required for
145a Linux Ethernet driver. The support for advanced features will be added
146gradually.
147
148The driver has Rx and Tx checksum offloading for UDP and TCP. Currently the Rx
149checksum offload feature is enabled by default and cannot be controlled through
150ethtool.
151
152The driver has support for multiple prioritized Tx traffic classes. Priorities
153range from 0 (lowest) to 3 (highest). These are mapped to HW workqueues with
154strict priority levels. Each traffic class contains NR_CPU TX queues. By
155default, only one traffic class is enabled and the lowest priority Tx queues
156are used. Higher priority traffic classes can be enabled with the mqprio
157qdisc. For example, all four traffic classes are enabled on an interface with
158the following command. Furthermore, skb priority levels are mapped to traffic
159classes as follows:
160
161 * priorities 0 to 3 - traffic class 0 (low priority)
162 * priorities 4 to 7 - traffic class 1 (medium-low priority)
163 * priorities 8 to 11 - traffic class 2 (medium-high priority)
164 * priorities 12 to 15 - traffic class 3 (high priority)
165
166tc qdisc add dev <int> root handle 1: \
167 mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1
168
169Debugging
170=========
171
172The following statistics are exported for each interface through ethtool:
173
174 - interrupt count per CPU
175 - Rx packets count per CPU
176 - Tx packets count per CPU
177 - Tx confirmed packets count per CPU
178 - Tx S/G frames count per CPU
179 - Tx error count per CPU
180 - Rx error count per CPU
181 - Rx error count per type
182 - congestion related statistics:
183 - congestion status
184 - time spent in congestion
185 - number of time the device entered congestion
186 - dropped packets count per cause
187
188The driver also exports the following information in sysfs:
189
190 - the FQ IDs for each FQ type
191 /sys/devices/platform/dpaa-ethernet.0/net/<int>/fqids
192
193 - the IDs of the buffer pools in use
194 /sys/devices/platform/dpaa-ethernet.0/net/<int>/bpids