]>
Commit | Line | Data |
---|---|---|
ba94a1bb WD |
1 | /** |
2 | * @file IxEthDBQoS.h | |
3 | * | |
4 | * @brief Public definitions for QoS traffic classes | |
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 | |
cb3761ea | 16 | * SPDX-License-Identifier: BSD-3-Clause |
ba94a1bb WD |
17 | * @par |
18 | * -- End of Copyright Notice -- | |
19 | */ | |
20 | ||
21 | /** | |
22 | * @defgroup IxEthDBPortDefs IXP400 Ethernet QoS definitions | |
23 | * | |
24 | * @brief IXP00 Public definitions for QoS traffic classes | |
25 | * | |
26 | * @{ | |
27 | */ | |
28 | ||
29 | #ifndef IxEthDBQoS_H | |
30 | #define IxEthDBQoS_H | |
31 | ||
32 | /** | |
33 | * @def IX_ETH_DB_QUEUE_UNAVAILABLE | |
34 | * @brief alias to indicate a queue (traffic class) is not available | |
35 | */ | |
36 | #define IX_ETH_DB_QUEUE_UNAVAILABLE (0) | |
37 | ||
38 | #ifndef IX_IEEE802_1Q_QOS_PRIORITY_COUNT | |
39 | /** | |
40 | * @def IX_IEEE802_1Q_QOS_PRIORITY_COUNT | |
41 | * @brief number of QoS priorities, according to IEEE 802.1Q | |
42 | */ | |
43 | #define IX_IEEE802_1Q_QOS_PRIORITY_COUNT (8) | |
44 | #endif | |
45 | ||
46 | /** | |
47 | * @brief array containing all the supported traffic class configurations | |
48 | */ | |
49 | static const | |
50 | UINT8 ixEthDBQueueAssignments[][IX_IEEE802_1Q_QOS_PRIORITY_COUNT] = | |
51 | { | |
52 | { 4, 5, 6, 7, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE }, | |
53 | { 15, 16, 17, 18, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE }, | |
54 | { 11, 23, 26, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE, IX_ETH_DB_QUEUE_UNAVAILABLE }, | |
55 | { 4, 5, 6, 7, 8, 9, 10, 11 } | |
56 | /* add here all other cases of queue configuration structures and update ixEthDBTrafficClassDefinitions to use them */ | |
57 | }; | |
58 | ||
59 | /** | |
60 | * @brief value used to index the NPE A functionality ID in the traffic class definition table | |
61 | */ | |
62 | #define IX_ETH_DB_NPE_A_FUNCTIONALITY_ID_INDEX (0) | |
63 | ||
64 | /** | |
65 | * @brief value used to index the traffic class count in the traffic class definition table | |
66 | */ | |
67 | #define IX_ETH_DB_TRAFFIC_CLASS_COUNT_INDEX (1) | |
68 | ||
69 | /** | |
70 | * @brief value used to index the queue assignment index in the traffic class definition table | |
71 | */ | |
72 | #define IX_ETH_DB_QUEUE_ASSIGNMENT_INDEX (2) | |
73 | ||
74 | /** | |
75 | * @brief traffic class definitions | |
76 | * | |
77 | * This array contains the default traffic class definition configuration, | |
78 | * as well as any special cases dictated by the functionality ID of NPE A. | |
79 | * | |
80 | * The default case should not be removed (otherwise the Ethernet | |
81 | * components will assert a fatal failure on initialization). | |
82 | */ | |
83 | static const | |
84 | UINT8 ixEthDBTrafficClassDefinitions[][3] = | |
85 | { | |
86 | /* NPE A functionality ID | traffic class count | queue assignment index (points to the queue enumeration in ixEthDBQueueAssignments) */ | |
87 | { 0x00, 4, 0 }, /* default case - DO NOT REMOVE */ | |
88 | { 0x04, 4, 1 }, /* NPE A image ID 0.4.0.0 */ | |
89 | { 0x09, 3, 2 }, /* NPE A image ID 0.9.0.0 */ | |
90 | { 0x80, 8, 3 }, /* NPE A image ID 10.80.02.0 */ | |
91 | { 0x81, 8, 3 }, /* NPE A image ID 10.81.02.0 */ | |
92 | { 0x82, 8, 3 } /* NPE A image ID 10.82.02.0 */ | |
93 | }; | |
94 | ||
95 | /** | |
96 | * @brief IEEE 802.1Q recommended QoS Priority => traffic class maps | |
97 | * | |
98 | * @verbatim | |
d9455273 WD |
99 | Number of available traffic classes |
100 | 1 2 3 4 5 6 7 8 | |
101 | QoS Priority | |
102 | 0 0 0 0 1 1 1 1 2 | |
103 | 1 0 0 0 0 0 0 0 0 | |
104 | 2 0 0 0 0 0 0 0 1 | |
105 | 3 0 0 0 1 1 2 2 3 | |
106 | 4 0 1 1 2 2 3 3 4 | |
107 | 5 0 1 1 2 3 4 4 5 | |
108 | 6 0 1 2 3 4 5 5 6 | |
ba94a1bb WD |
109 | 7 0 1 2 3 4 5 6 7 |
110 | ||
111 | @endverbatim | |
112 | */ | |
113 | static const | |
114 | UINT8 ixEthIEEE802_1QUserPriorityToTrafficClassMapping[IX_IEEE802_1Q_QOS_PRIORITY_COUNT][IX_IEEE802_1Q_QOS_PRIORITY_COUNT] = | |
115 | { | |
116 | { 0, 0, 0, 0, 0, 0, 0, 0 }, /* 1 traffic class available */ | |
117 | { 0, 0, 0, 0, 1, 1, 1, 1 }, /* 2 traffic classes available */ | |
118 | { 0, 0, 0, 0, 1, 1, 2, 2 }, /* 3 traffic classes available */ | |
119 | { 1, 0, 0, 1, 2, 2, 3, 3 }, /* 4 traffic classes available */ | |
120 | { 1, 0, 0, 1, 2, 3, 4, 4 }, /* 5 traffic classes available */ | |
121 | { 1, 0, 0, 2, 3, 4, 5, 5 }, /* 6 traffic classes available */ | |
122 | { 1, 0, 0, 2, 3, 4, 5, 6 }, /* 7 traffic classes available */ | |
123 | { 2, 0, 1, 3, 4, 5, 6, 7 } /* 8 traffic classes available */ | |
124 | }; | |
125 | ||
126 | #endif /* IxEthDBQoS_H */ | |
127 | ||
128 | /** | |
129 | *@} | |
130 | */ |