summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/powerpc/fsl/fman_chosen_node_device_tree.txt
blob: 86f6dac5f164fdbdc7b83357c8a7c472be66b20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
=================================================================================
Chosen Node - DPAA extended arguments Bindings

Copyright 2013 Freescale Semiconductor Inc.

CONTENTS
  - FMan Extended Args Node
  - FMan-Port Extended Args Node
  - Example
  - General note on FMan internal resources

NOTE: The bindings described in this document are preliminary and subject to change.

=================================================================================
FMan Extended Args Node

DESCRIPTION

The purpose of this node it to provide means to implicitly initialize some of the
FMan advanced arguments as described below. This node is entirely optional; i.e.
the FMan Linux driver already sets the appropriate default values that should
fit most of the standard applications.

PROPERTIES

  - compatible
      Usage: required
      Value type: <string>
      Definition: Must include "fsl,fman-extended-args"

  - cell-index
      Usage: required
      Value type: <u32>
      Definition: Specifies the index of the FMan unit. The index should match
        exactly the numbering of the cell-index of the FMan device-tree node.
        It is recommended to use the "reference-to-node" method to assure matching.

  - dma-aid-mode
      Usage: optional
      Value type: <string>
      Definition: Sets the AID mode.
        The optional values are "port" and "tnum".

  - total-fifo-size
      Usage: optional
      Value type: <u32>
      Definition: Specifies the total space allocated for data FIFOs.
      This attribute could be used when tuning the fman block.
      It might be needed when expecting heavy traffic load and
      then an increased value is required.
      The extra-space will be taken from the PCD space portion
      which means less space for classification patterns.
      More information can be found in the note below -
      "FMan Internal Resources".


Example

fman1-extd-args {
    cell-index = <1>;
    compatible = "fsl,fman-extended-args";
    dma-aid-mode = "port";
    total-fifo-size = <0x27000>;
};

=================================================================================
FMan-Port Extended Args Node

DESCRIPTION

The purpose of this node it to provide means to implicitly initialize some of the
FMan-port advanced arguments as described below. This node supports all FMan-Port
types: OP, RX, 10G-RX, TX and 10G-TX ports. This node is entirely optional; i.e.
the FMan Linux driver already sets the appropriate default values that should
fit most of the standard applications.

PROPERTIES

  - compatible
      Usage: required
      Value type: <string>
      Definition: A standard property.
          An Offline-Parsing port must include "fsl,fman-port-op-extended-args".
          The Rx port must include "fsl,fman-port-1g-rx-extended-args" or
          "fsl,fman-port-10g-rx-extended-args" for 10G Rx ports.
          The Tx port must include "fsl,fman-port-1g-tx-extended-args" or
          "fsl,fman-port-10g-tx-extended-args" for 10G Tx ports.

  - cell-index
      Usage: required
      Value type: <u32>
      Definition: Specifies the index of the FMan Port unit.
          The types of ports: offline-parsing, 1G Rx, 10G Rx, 1G Tx and 10G Tx
          ports. The index should match exactly the numbering of the cell-index of the
          FMan-Port device-tree node. It is recommended to use the "reference-to-node"
          method to assure matching.

  - num-tnums
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the number of tnums required (first value)
        as well as the extra required tnums (second value).
        In the fman-port case "tnums" represent the number of tasks that the
        Fman controller allocates to handle the appropriate port RX or TX activities.
        For more details please refer to the Fman RM.

  - num-dmas
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the number of dmas required (first value)
        as well as the extra required dmas (second value).
        In the fman-port case "num-dmas" represent the number of dma channels
        that the Fman controller allocates to handle the appropriate port
        RX or TX activities.
        For more details please refer to the Fman RM.

  - fifo-size
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the fifo size required (first value)
        as well as the required excessive buffer size (second value).
        In the fman-port case "fifo-size" represent the size of memory (in bytes)
        that the Fman controller allocates to handle the appropriate port
        RX or TX activities.
        For more details please refer to the Fman RM.

  - buffer-layout
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the manipulation extra space needed (first value)
        and the data alignment (second value).
        For more information please refer to the FMan User's guide

  - vsp-window
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the number of profiles for this port (first value)
        and the dfault virtual port relative id (second value). Note that the
        kernel FMan driver automatically initializes the default VSP (using
        the configuration from the Linux dpaa Ethernet Driver of the equivalent
        port) while the rest of the VSPs should be initialized by the user
        (using the appropriate IOCTLs).
        For more information please refer to the FMan User's guide

  - errors-to-discard
      Usage: optional
      Value type: <u32>
      Definition: Specifies which errors should be discarded.
        Errors that are not in the mask, will not be discarded;
        I.e. those errors will be enqueued and sent to the default error queue.

  - ar-tables-sizes
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the max number of entries which would be allocated
        to each protocol in the auto response module. 0 value means protocol is
        not supported. This field is only relevant for Rx ports.
        A special value is the SNMP_char which stands for total
        number of characters that would be available for the SNMP protocol in
        auto response; Since all memory for the auto response must be pre
        allocated, this is the only value that can't be auto calculated from
        number of entries.
        For example, if SNMP table uses among other values 3 strings:
        "General printer", "idle", "Floor 2",
        then the number of characters used is 15+4+7=26. The SNMP_char should
        be a maximal value for such cases, i.e. worst case for such combination.
        the location of the protocols is as followes:
        < ARP ICMPv4 NDP ICMPv6 SNMP_ipv4 SNMP_ipv6 SNMP_oid SNMP_char >

  - ar-filters-sizes
      Usage: optional
      Value type: <prop-encoded-array>
      Definition: Specifies the max number of entries which would be allocated
        to each filtering table in the auto response module.
        0 value means such filtering table will not be used.
        This field is only relevant for Rx ports.
        the location of the filtering tables is as followes:
        < IP_prot TCP_port UDP_port >

Example

fman1_rx4-extd-args {
    cell-index = <4>;
    compatible = "fsl,fman-port-1g-rx-extended-args";
    num-tnums = <16 0>;
    num-dmas = <8 0>;
    fifo-size = <0x3000 0>;
    buffer-layout = <64 128>;
    vsp-window = <8 0>;
    errors-to-discard = <0x00020000>;
};

===============================================================================
Example

chosen {
    name = "chosen";

    dpaa-extended-args {
        fman1-extd-args {
            cell-index = <1>;
            compatible = "fsl,fman-extended-args";
            dma-aid-mode = "port";

            fman1_rx4-extd-args {
                cell-index = <4>;
                compatible = "fsl,fman-port-1g-rx-extended-args";
                policer-profile-window = <8>;
                num-tnums = <16 0>;
                num-dmas = <8 0>;
                fifo-size = <0x3000 0>;
                buffer-layout = <64 128>;
                vsp-window = <8 0>;
                errors-to-discard = <0x00020000>;
            };

            fman1_tx4-extd-args {
                cell-index = <4>;
                compatible = "fsl,fman-port-1g-tx-extended-args";
                num-tnums = <16 0>;
                num-dmas = <8 0>;
                fifo-size = <0x3000 0>;
            };
        };
    };
};

===============================================================================
FMan Internal Resources

The FMan internal resources are: FIFO buffers, number of open DMA lines,
number of tasks (TNUMs), excessive buffer size, shared extra TNUMs and
shared extra DMAs.

FIFO allocation size ("total-fifo-size"):
The P2/P3/P4/P5 devices have 160KB total size of MURAM.
The MURAM resource has two consumers: the FIFOs and the microcode.
In the FMan driver we reserve by default 32KB for the coarse-classification
microcode and the rest of the 128KB are reserved for the ports FIFOs data.

There are 4 types of ports ("fifo-size"): 10G, 1G, host command and
Offline Parsing (O/H). Each one requires reservation of FIFOs space
on the RX and on the TX sides. In addition there is a general space reservation
called Excessive Buffer Size (Excessive Buffer Size: When Rx port FIFO size
exceeds its max value BMI may allocate additional internal buffers to avoid
frames discard) Default initialization values for committed FIFO sizes are:

10G Tx Ports: 16KB for all ports
10G Rx Ports: 16KB for regular ports
              (if largest buffer pool is larger than 14K, fifo size should be
              ((largest buffer pool size rounded up to 256) +1792)).
1G Tx Ports:  4KB for regular frames (assuming 'dequeue pipeline depth' <= 2)
              11008B for regular ports using jumbo frames.
1G Rx Ports:  4KB for regular ports (unless largest buffer pool is larger than
              2304B, in which case FIFO should be:
              ((largest buffer pool size rounded up to 256) +1792)).
O/H Ports:    1536B (assuming 'dequeue pipeline depth' <= 2)

Default initialization value for Rx ports excessive FIFO size is:
16KB of excessive buffer size.

Tasks allocation ("num-tnums"):
Committed number of tnums is defined per port and specifies the maximum number
of concurrent tasks that the port can create. The total number of committed
tnums for all ports should not exceed the total number of tnums defined for
the whole FMan block. There's a max number of 128 tnums per FM. By default,
the total number is configured to be 96. When a port reached its max number
of committed tasks, the BMI, if configured accordingly, may allocate
extra tnums to the port in order to ease its stress.
The committed number of tnums (and excessive tnums) are initialized by default:
with the following values:
10G Rx/Tx Ports:       16 (8)
1G Rx/Tx Ports:         3 (2)
Offline parsing ports:  3 (2)
Host command ports:     1 (0)

Number of open DMAs allocation ("num-dmas")
The number of open DMAs is defined per port and specifies the number of maximum
outstanding DMA requests allowed. The total number of committed open DMAs
for all ports should not exceed the total number of open DMAs defined for
the whole FM. There's a max number of 32 open DMA's per FM. By default,
the total number is configured to be 24. When a port reached its max DMA
transactions, the BMI may allocate extra DMA to the port (if configured to
do so) in order to ease its stress.

The committed number of DMAs (and excessive dmas) is initialized by default
with the following values:
10G Rx Port:             4 (8)
10G Tx Port:            10 (8)
1G Rx/Tx Ports:          1 (1)
Offline parsing ports:   1 (1)
Host command ports:      1 (0)