source: SVN/rincon/u-boot/cpu/ixp/npe/include/IxEthNpe.h @ 55

Last change on this file since 55 was 55, checked in by Tim Harvey, 2 years ago

rincon: added latest u-boot source

restored form server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 19.6 KB
Line 
1#ifndef __doxygen_HIDE  /* This file is not part of the API */
2
3/**
4 * @file IxEthNpe.h
5 *
6 * @par
7 * IXP400 SW Release version 2.0
8 *
9 * -- Copyright Notice --
10 *
11 * @par
12 * Copyright 2001-2005, Intel Corporation.
13 * All rights reserved.
14 *
15 * @par
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 *    notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 *    notice, this list of conditions and the following disclaimer in the
23 *    documentation and/or other materials provided with the distribution.
24 * 3. Neither the name of the Intel Corporation nor the names of its contributors
25 *    may be used to endorse or promote products derived from this software
26 *    without specific prior written permission.
27 *
28 * @par
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
30 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @par
42 * -- End of Copyright Notice --
43*/
44
45/**
46 * @defgroup IxEthNpe IXP400 Ethernet NPE (IxEthNpe) API
47 *
48 * @brief Contains the API for Ethernet NPE.
49 *
50 * All messages given to NPE, get back an acknowledgment. The acknowledgment
51 * is identical to the message sent to the NPE (except for NPE_GETSTATUS message).
52 *
53 * @{
54 */
55
56
57/*--------------------------------------------------------------------------
58 * APB Message IDs - XScale->NPE
59 *------------------------------------------------------------------------*/
60
61/**
62 * @def IX_ETHNPE_NPE_GETSTATUS
63 *
64 * @brief Request from the XScale client for the NPE to return the firmware
65 * version of the currently executing image.
66 *
67 * Acknowledgment message id is same as the request message id.
68 * NPE returns the firmware version ID to XScale.
69 */
70#define IX_ETHNPE_NPE_GETSTATUS                 0x00
71
72/**
73 * @def IX_ETHNPE_EDB_SETPORTADDRESS
74 *
75 * @brief Request from the XScale client for the NPE to set the Ethernet
76 * port's port ID and MAC address.
77 */
78#define IX_ETHNPE_EDB_SETPORTADDRESS            0x01
79
80/**
81 * @def IX_ETHNPE_EDB_GETMACADDRESSDATABASE
82 *
83 * @brief Request from XScale client to the NPE requesting upload of
84 * Ethernet Filtering Database or Header Conversion Database from NPE's
85 * data memory to XScale accessible SDRAM.
86 */
87#define IX_ETHNPE_EDB_GETMACADDRESSDATABASE     0x02
88
89/**
90 * @def IX_ETHNPE_EDB_SETMACADDRESSSDATABASE
91 *
92 * @brief Request from XScale client to the NPE requesting download of
93 * Ethernet Filtering Database or Header Conversion Database from SDRAM
94 * to the NPE's datamemory.
95 */
96#define IX_ETHNPE_EDB_SETMACADDRESSSDATABASE    0x03
97
98/**
99 * @def IX_ETHNPE_GETSTATS
100 *
101 * @brief Request from the XScale client for the current MAC port statistics
102 * data to be written to the (empty) statistics structure and the specified
103 * location in externa memory.
104 */
105#define IX_ETHNPE_GETSTATS                      0x04
106
107/**
108 * @def IX_ETHNPE_RESETSTATS
109 *
110 * @brief Request from the XScale client to the NPE to reset all of its internal
111 * MAC port statistics state variables.
112 *
113 * As a side effect, this message entails an implicit request that the NPE
114 *  write the current MAC port statistics into the MAC statistics structure
115 * at the specified location in external memory.
116 */
117#define IX_ETHNPE_RESETSTATS                    0x05
118
119/**
120 * @def IX_ETHNPE_SETMAXFRAMELENGTHS
121 *
122 * @brief Request from the XScale client to the NPE to configure maximum framelengths
123 * and block sizes in receive and transmit direction.
124 */
125#define IX_ETHNPE_SETMAXFRAMELENGTHS            0x06
126
127/**
128 * @def IX_ETHNPE_VLAN_SETRXTAGMODE
129 *
130 * @brief Request from the XScale client to the NPE to configure VLAN frame type
131 * filtering and VLAN the tagging mode for the receiver.
132 */
133#define IX_ETHNPE_VLAN_SETRXTAGMODE             0x07
134
135/**
136 * @def IX_ETHNPE_VLAN_SETDEFAULTRXVID
137 *
138 * @brief Request from the XScale client to the NPE to set receiver's default
139 * VLAN tag (PVID)and internal traffic class.
140 */
141#define IX_ETHNPE_VLAN_SETDEFAULTRXVID          0x08
142
143/**
144 * @def IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY
145 *
146 * @brief Request from the XScale client to the NPE to configure VLAN Port
147 * membership and Tx tagging for 8 consecutive VLANID's.
148 */
149#define IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY    0x09
150
151/**
152 * @def IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE
153 *
154 * @brief Request from the XScale client to the NPE to configure VLAN Port
155 * membership and Tx tagging for a range of VLANID's.
156 */
157#define IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE    0x0A
158
159/**
160 * @def IX_ETHNPE_VLAN_SETRXQOSENTRY
161 *
162 * @brief Request from the XScale client to the NPE to map a user priority
163 * to QoS class and an AQM queue number.
164 */
165#define IX_ETHNPE_VLAN_SETRXQOSENTRY            0x0B
166
167/**
168 * @def IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE
169 *
170 * @brief Request from the XScale client to the NPE to enable or disable
171 * portID extraction from VLAN-tagged frames for the specified port.
172 */
173#define IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE  0x0C
174
175/**
176 * @def IX_ETHNPE_STP_SETBLOCKINGSTATE
177 *
178 * @brief Request from the XScale client to the NPE to block or unblock
179 * forwarding for spanning tree BPDUs.
180 */
181#define IX_ETHNPE_STP_SETBLOCKINGSTATE          0x0D
182
183/**
184 * @def IX_ETHNPE_FW_SETFIREWALLMODE
185 *
186 * @brief Request from the XScale client to the NPE to configure firewall
187 * services modes of operation and/or download Ethernet Firewall Database from
188 * SDRAM to NPE.
189 */
190#define IX_ETHNPE_FW_SETFIREWALLMODE            0x0E
191
192/**
193 * @def IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID
194 *
195 * @brief Request from the XScale client to the NPE to set global frame control
196 * and duration/ID field for the 802.3 to 802.11 protocol header conversion
197 * service.
198 */
199#define IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID  0x0F
200
201/**
202 * @def IX_ETHNPE_PC_SETBBSID
203 *
204 * @brief Request from the XScale client to the NPE to set global BBSID field
205 * value for the 802.3 to 802.11 protocol header conversion service.
206 */
207#define IX_ETHNPE_PC_SETBBSID                   0x10
208
209/**
210 * @def IX_ETHNPE_PC_SETAPMACTABLE
211 *
212 * @brief Request from the XScale client to the NPE to update a block/section/
213 * range of the AP MAC Address Table.
214 */
215#define IX_ETHNPE_PC_SETAPMACTABLE              0x11
216
217/**
218 * @def IX_ETHNPE_SETLOOPBACK_MODE
219 *
220 * @brief Turn on or off the NPE frame loopback.
221 */
222#define IX_ETHNPE_SETLOOPBACK_MODE              (0x12)
223
224/*--------------------------------------------------------------------------
225 * APB Message IDs - NPE->XScale
226 *------------------------------------------------------------------------*/
227
228/**
229 * @def IX_ETHNPE_NPE_GETSTATUS_ACK
230 *
231 * @brief Acknowledgment to IX_ETHNPE_NPE_GETSTATUS message. NPE firmware version
232 * id is returned in the message.
233 */
234#define IX_ETHNPE_NPE_GETSTATUS_ACK                 0x00
235
236/**
237 * @def IX_ETHNPE_EDB_SETPORTADDRESS_ACK
238 *
239 * @brief Acknowledgment to IX_ETHNPE_EDB_SETPORTADDRESS message.
240 */
241#define IX_ETHNPE_EDB_SETPORTADDRESS_ACK            0x01
242
243/**
244 * @def IX_ETHNPE_EDB_GETMACADDRESSDATABASE_ACK
245 *
246 * @brief Acknowledgment to IX_ETHNPE_EDB_GETMACADDRESSDATABASE message
247 */
248#define IX_ETHNPE_EDB_GETMACADDRESSDATABASE_ACK     0x02
249
250/**
251 * @def IX_ETHNPE_EDB_SETMACADDRESSSDATABASE_ACK
252 *
253 * @brief Acknowledgment to IX_ETHNPE_EDB_SETMACADDRESSSDATABASE message.
254 */
255#define IX_ETHNPE_EDB_SETMACADDRESSSDATABASE_ACK    0x03
256
257/**
258 * @def IX_ETHNPE_GETSTATS_ACK
259 *
260 * @brief Acknowledgment to IX_ETHNPE_GETSTATS message.
261 */
262#define IX_ETHNPE_GETSTATS_ACK                      0x04
263
264/**
265 * @def IX_ETHNPE_RESETSTATS_ACK
266 *
267 * @brief Acknowledgment to IX_ETHNPE_RESETSTATS message.
268 */
269#define IX_ETHNPE_RESETSTATS_ACK                    0x05
270
271/**
272 * @def IX_ETHNPE_SETMAXFRAMELENGTHS_ACK
273 *
274 * @brief Acknowledgment to IX_ETHNPE_SETMAXFRAMELENGTHS message.
275 */
276#define IX_ETHNPE_SETMAXFRAMELENGTHS_ACK            0x06
277
278/**
279 * @def IX_ETHNPE_VLAN_SETRXTAGMODE_ACK
280 *
281 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETRXTAGMODE message.
282 */
283#define IX_ETHNPE_VLAN_SETRXTAGMODE_ACK             0x07
284
285/**
286 * @def IX_ETHNPE_VLAN_SETDEFAULTRXVID_ACK
287 *
288 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETDEFAULTRXVID  message.
289 */
290#define IX_ETHNPE_VLAN_SETDEFAULTRXVID_ACK          0x08
291
292/**
293 * @def IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY_ACK
294 *
295 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY message.
296 */
297#define IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY_ACK    0x09
298
299/**
300 * @def IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE_ACK
301 *
302 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE message.
303 */
304#define IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE_ACK    0x0A
305
306/**
307 * @def IX_ETHNPE_VLAN_SETRXQOSENTRY_ACK
308 *
309 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETRXQOSENTRY message.
310 */
311#define IX_ETHNPE_VLAN_SETRXQOSENTRY_ACK            0x0B
312
313/**
314 * @def IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE_ACK
315 *
316 * @brief Acknowledgment to IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE message.
317 */
318#define IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE_ACK  0x0C
319
320/**
321 * @def IX_ETHNPE_STP_SETBLOCKINGSTATE_ACK
322 *
323 * @brief Acknowledgment to IX_ETHNPE_STP_SETBLOCKINGSTATE message.
324 */
325#define IX_ETHNPE_STP_SETBLOCKINGSTATE_ACK          0x0D
326
327/**
328 * @def IX_ETHNPE_FW_SETFIREWALLMODE_ACK
329 *
330 * @brief Acknowledgment to IX_ETHNPE_FW_SETFIREWALLMODE message.
331 */
332#define IX_ETHNPE_FW_SETFIREWALLMODE_ACK            0x0E
333
334/**
335 * @def IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID_ACK
336 *
337 * @brief Acknowledgment to IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID message.
338 */
339#define IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID_ACK  0x0F
340
341/**
342 * @def IX_ETHNPE_PC_SETBBSID_ACK
343 *
344 * @brief Acknowledgment to IX_ETHNPE_PC_SETBBSID message.
345 */
346#define IX_ETHNPE_PC_SETBBSID_ACK                   0x10
347
348/**
349 * @def IX_ETHNPE_PC_SETAPMACTABLE_ACK
350 *
351 * @brief Acknowledgment to IX_ETHNPE_PC_SETAPMACTABLE message.
352 */
353#define IX_ETHNPE_PC_SETAPMACTABLE_ACK              0x11
354
355/**
356 * @def IX_ETHNPE_SETLOOPBACK_MODE_ACK
357 *
358 * @brief Acknowledgment to IX_ETHNPE_SETLOOPBACK_MODE message.
359 */
360#define IX_ETHNPE_SETLOOPBACK_MODE_ACK              (0x12)
361
362/*--------------------------------------------------------------------------
363 * Queue Manager Queue entry bit field boundary definitions
364 *------------------------------------------------------------------------*/
365
366/**
367 * @def MASK(hi,lo)
368 *
369 * @brief Macro for mask
370 */
371#define MASK(hi,lo)                    (((1 << (1 + ((hi) - (lo)))) - 1) << (lo))
372
373/**
374 * @def BITS(x,hi,lo)
375 *
376 * @brief Macro for bits
377 */
378#define BITS(x,hi,lo)                  (((x) & MASK(hi,lo)) >> (lo))
379
380/**
381 * @def IX_ETHNPE_QM_Q_RXENET_LENGTH_MASK
382 *
383 * @brief QMgr Queue LENGTH field mask
384 */
385#define IX_ETHNPE_QM_Q_RXENET_LENGTH_MASK   0x3fff
386
387/**
388 * @def IX_ETHNPE_QM_Q_FIELD_FLAG_R
389 *
390 * @brief QMgr Queue FLAG field right boundary
391 */
392#define IX_ETHNPE_QM_Q_FIELD_FLAG_R             20
393
394/**
395 * @def IX_ETHNPE_QM_Q_FIELD_FLAG_MASK
396 *
397 * @brief QMgr Queue FLAG field mask
398 *
399 * Multicast bit : BIT(4)
400 * Broadcast bit : BIT(5)
401 * IP bit        : BIT(6) (linux only)
402 *
403 */
404#ifdef __vxworks
405#define IX_ETHNPE_QM_Q_FIELD_FLAG_MASK           0x30
406#else
407#define IX_ETHNPE_QM_Q_FIELD_FLAG_MASK           0x70
408#endif
409
410
411/**
412 * @def IX_ETHNPE_QM_Q_FIELD_NPEID_L
413 *
414 * @brief QMgr Queue NPE ID field left boundary
415 */
416#define IX_ETHNPE_QM_Q_FIELD_NPEID_L            1
417
418/**
419 * @def IX_ETHNPE_QM_Q_FIELD_NPEID_R
420 *
421 * @brief QMgr Queue NPE ID field right boundary
422 */
423#define IX_ETHNPE_QM_Q_FIELD_NPEID_R            0
424
425/**
426 * @def IX_ETHNPE_QM_Q_FIELD_PRIOR_L
427 *
428 * @brief QMgr Queue Priority field left boundary
429 */
430#define IX_ETHNPE_QM_Q_FIELD_PRIOR_L            2
431
432/**
433 * @def IX_ETHNPE_QM_Q_FIELD_PRIOR_R
434 *
435 * @brief QMgr Queue Priority field right boundary
436 */
437#define IX_ETHNPE_QM_Q_FIELD_PRIOR_R            0
438
439/**
440 * @def IX_ETHNPE_QM_Q_FIELD_ADDR_L
441 *
442 * @brief QMgr Queue Address field left boundary
443 */
444#define IX_ETHNPE_QM_Q_FIELD_ADDR_L             31
445
446/**
447 * @def IX_ETHNPE_QM_Q_FIELD_ADDR_R
448 *
449 * @brief QMgr Queue Address field right boundary
450 */
451#define IX_ETHNPE_QM_Q_FIELD_ADDR_R              5
452
453/*--------------------------------------------------------------------------
454 * Queue Manager Queue entry bit field masks
455 *------------------------------------------------------------------------*/
456
457/**
458 * @def IX_ETHNPE_QM_Q_FREEENET_ADDR_MASK
459 *
460 * @brief Macro to mask the Address field of the FreeEnet Queue Manager Entry
461 */
462#define IX_ETHNPE_QM_Q_FREEENET_ADDR_MASK \
463            MASK (IX_ETHNPE_QM_Q_FIELD_ADDR_L, \
464                  IX_ETHNPE_QM_Q_FIELD_ADDR_R)
465
466/**
467 * @def IX_ETHNPE_QM_Q_RXENET_NPEID_MASK 
468 *
469 * @brief Macro to mask the NPE ID field of the RxEnet Queue Manager Entry
470 */
471#define IX_ETHNPE_QM_Q_RXENET_NPEID_MASK \
472            MASK (IX_ETHNPE_QM_Q_FIELD_NPEID_L, \
473                  IX_ETHNPE_QM_Q_FIELD_NPEID_R)
474
475/**
476 * @def IX_ETHNPE_QM_Q_RXENET_ADDR_MASK
477 *
478 * @brief Macro to mask the Mbuf Address field of the RxEnet Queue Manager Entry
479 */
480#define IX_ETHNPE_QM_Q_RXENET_ADDR_MASK \
481            MASK (IX_ETHNPE_QM_Q_FIELD_ADDR_L, \
482                  IX_ETHNPE_QM_Q_FIELD_ADDR_R)
483
484/**
485 * @def IX_ETHNPE_QM_Q_TXENET_PRIOR_MASK
486 *
487 * @brief Macro to mask the Priority field of the TxEnet Queue Manager Entry
488 */
489#define IX_ETHNPE_QM_Q_TXENET_PRIOR_MASK \
490            MASK (IX_ETHNPE_QM_Q_FIELD_PRIOR_L, \
491                  IX_ETHNPE_QM_Q_FIELD_PRIOR_R)
492
493/**
494 * @def IX_ETHNPE_QM_Q_TXENET_ADDR_MASK
495 *
496 * @brief Macro to mask the Mbuf Address field of the TxEnet Queue Manager Entry
497 */
498#define IX_ETHNPE_QM_Q_TXENET_ADDR_MASK \
499            MASK (IX_ETHNPE_QM_Q_FIELD_ADDR_L, \
500                  IX_ETHNPE_QM_Q_FIELD_ADDR_R)
501
502/**
503 * @def IX_ETHNPE_QM_Q_TXENETDONE_NPEID_MASK
504 *
505 * @brief Macro to mask the NPE ID field of the TxEnetDone Queue Manager Entry
506 */
507#define IX_ETHNPE_QM_Q_TXENETDONE_NPEID_MASK \
508            MASK (IX_ETHNPE_QM_Q_FIELD_NPEID_L, \
509                  IX_ETHNPE_QM_Q_FIELD_NPEID_R)
510
511/**
512 * @def IX_ETHNPE_QM_Q_TXENETDONE_ADDR_MASK
513 *
514 * @brief Macro to mask the Mbuf Address field of the TxEnetDone Queue Manager
515 * Entry
516 */
517#define IX_ETHNPE_QM_Q_TXENETDONE_ADDR_MASK \
518            MASK (IX_ETHNPE_QM_Q_FIELD_ADDR_L, \
519                  IX_ETHNPE_QM_Q_FIELD_ADDR_R)
520
521/*--------------------------------------------------------------------------
522 * Queue Manager Queue entry bit field value extraction macros
523 *------------------------------------------------------------------------*/
524
525/**
526 * @def IX_ETHNPE_QM_Q_FREEENET_ADDR_VAL(x)
527 *
528 * @brief Extraction macro for Address field of FreeNet Queue Manager Entry
529 *
530 * Pointer to an mbuf buffer descriptor
531 */
532#define IX_ETHNPE_QM_Q_FREEENET_ADDR_VAL(x) \
533            ((x) & IX_ETHNPE_QM_Q_FREEENET_ADDR_MASK)
534
535/**
536 * @def IX_ETHNPE_QM_Q_RXENET_NPEID_VAL(x)
537 *
538 * @brief Extraction macro for NPE ID field of RxEnet Queue Manager Entry
539 *
540 * Set to 0 for entries originating from the Eth0 NPE;
541 * Set to 1 for entries originating from the Eth1 NPE.
542 */
543#define IX_ETHNPE_QM_Q_RXENET_NPEID_VAL(x) \
544            BITS (x, IX_ETHNPE_QM_Q_FIELD_NPEID_L, \
545                     IX_ETHNPE_QM_Q_FIELD_NPEID_R)
546
547/**
548 * @def IX_ETHNPE_QM_Q_RXENET_PORTID_VAL(x)
549 *
550 * @brief Extraction macro for Port ID field of RxEnet Queue Manager Entry
551 *
552 * 0-5: Assignable (by the XScale client) to any of the physical ports.
553 * 6: It is reserved
554 * 7: Indication that the NPE did not find the associated frame's destination MAC address within
555 * its internal filtering database.
556 */
557#define IX_ETHNPE_QM_Q_RXENET_PORTID_VAL(x) \
558            BITS (x, IX_ETHNPE_QM_Q_FIELD_PORTID_L, \
559                     IX_ETHNPE_QM_Q_Field_PortID_R)
560
561/**
562 * @def IX_ETHNPE_QM_Q_RXENET_ADDR_VAL(x)
563 *
564 * @brief Extraction macro for Address field of RxEnet Queue Manager Entry
565 *
566 * Pointer to an mbuf buffer descriptor
567 */
568#define IX_ETHNPE_QM_Q_RXENET_ADDR_VAL(x) \
569            ((x) & IX_ETHNPE_QM_Q_RXENET_ADDR_MASK)
570
571/**
572 * @def IX_ETHNPE_QM_Q_TXENET_PRIOR_VAL(x)
573 *
574 * @brief Extraction macro for Priority field of TxEnet Queue Manager Entry
575 *
576 * Priority of the packet (as described in IEEE 802.1D). This field is
577 * cleared upon return from the Ethernet NPE to the TxEnetDone queue.
578 */
579#define IX_ETHNPE_QM_Q_TXENET_PRIOR_VAL(x) \
580            BITS (x, IX_ETHNPE_QM_Q_FIELD_PRIOR_L, \
581                     IX_ETHNPE_QM_Q_FIELD_PRIOR_R)
582
583/**
584 * @def IX_ETHNPE_QM_Q_TXENET_ADDR_VAL(x)
585 *
586 * @brief Extraction macro for Address field of Queue Manager TxEnet Queue
587 * Manager Entry
588 *
589 * Pointer to an mbuf buffer descriptor
590 */
591#define IX_ETHNPE_QM_Q_TXENET_ADDR_VAL(x) \
592            ((x) & IX_ETHNPE_QM_Q_TXENET_ADDR_MASK)
593
594/**
595 * @def IX_ETHNPE_QM_Q_TXENETDONE_NPEID_VAL(x)
596 *
597 * @brief Extraction macro for NPE ID field of TxEnetDone Queue Manager Entry
598 *
599 * Set to 0 for entries originating from the Eth0 NPE; set to 1 for en-tries
600 * originating from the Eth1 NPE.
601 */
602#define IX_ETHNPE_QM_Q_TXENETDONE_NPEID_VAL(x) \
603            BITS (x, IX_ETHNPE_QM_Q_FIELD_NPEID_L, \
604                     IX_ETHNPE_QM_Q_FIELD_NPEID_R)
605
606/**
607 * @def IX_ETHNPE_QM_Q_TXENETDONE_ADDR_VAL(x)
608 *
609 * @brief Extraction macro for Address field of TxEnetDone Queue Manager Entry
610 *
611 * Pointer to an mbuf buffer descriptor
612 */
613#define IX_ETHNPE_QM_Q_TXENETDONE_ADDR_VAL(x) \
614            ((x) & IX_ETHNPE_QM_Q_TXENETDONE_ADDR_MASK)
615
616
617/*--------------------------------------------------------------------------
618 * NPE limits
619 *------------------------------------------------------------------------*/
620
621/**
622 * @def IX_ETHNPE_ACC_RXFREE_BUFFER_LENGTH_MIN
623 *
624 * @brief Macro to check the minimum length of a rx free buffer
625 */
626#define IX_ETHNPE_ACC_RXFREE_BUFFER_LENGTH_MIN (64)
627
628/**
629 * @def IX_ETHNPE_ACC_RXFREE_BUFFER_LENGTH_MASK
630 *
631 * @brief Mask to apply to the mbuf length before submitting it to the NPE
632 * (the NPE handles only rx free mbufs which are multiple of 64)
633 *
634 * @sa IX_ETHNPE_ACC_RXFREE_BUFFER_LENGTH_MASK
635 */
636#define IX_ETHNPE_ACC_RXFREE_BUFFER_LENGTH_MASK (~63)
637
638/**
639 * @def IX_ETHNPE_ACC_RXFREE_BUFFER_ROUND_UP(size)
640 *
641 * @brief  Round up to get the size necessary to receive without chaining
642 * the frames which are (size) bytes (the NPE operates by multiple of 64)
643 * e.g. To receive 1514 bytes frames, the size of the buffers in replenish
644 * has to be at least (1514+63)&(~63) = 1536 bytes.
645 *
646 */
647#define IX_ETHNPE_ACC_RXFREE_BUFFER_ROUND_UP(size) (((size) + 63) & ~63)
648
649/**
650 * @def IX_ETHNPE_ACC_RXFREE_BUFFER_ROUND_DOWN(size)
651 *
652 * @brief Round down to apply to the mbuf length before submitting
653 * it to the NPE. (the NPE operates by multiple of 64)
654 *
655 */
656#define IX_ETHNPE_ACC_RXFREE_BUFFER_ROUND_DOWN(size) ((size) & ~63)
657
658/**
659 * @def IX_ETHNPE_ACC_FRAME_LENGTH_MAX
660 *
661 * @brief maximum mbuf length supported by the NPE
662 *
663 * @sa IX_ETHNPE_ACC_FRAME_LENGTH_MAX
664 */
665#define IX_ETHNPE_ACC_FRAME_LENGTH_MAX (16320)
666
667/**
668 * @def IX_ETHNPE_ACC_FRAME_LENGTH_DEFAULT
669 *
670 * @brief default mbuf length supported by the NPE
671 *
672 * @sa IX_ETHNPE_ACC_FRAME_LENGTH_DEFAULT
673 */
674#define IX_ETHNPE_ACC_FRAME_LENGTH_DEFAULT (1522)
675
676/**
677 * @def IX_ETHNPE_ACC_LENGTH_OFFSET
678 *
679 * @brief Offset of the cluster length field in the word shared with the NPEs
680 */
681#define IX_ETHNPE_ACC_LENGTH_OFFSET 16
682
683/**
684 * @def IX_ETHNPE_ACC_PKTLENGTH_MASK
685 *
686 * @brief Mask of the cluster length field in the word shared with the NPEs
687 */
688#define IX_ETHNPE_ACC_PKTLENGTH_MASK 0x3fff
689
690
691/**
692 *@}
693 */
694
695#endif /* __doxygen_HIDE */
Note: See TracBrowser for help on using the repository browser.