iPXE
eth_slow.h
Go to the documentation of this file.
1 #ifndef _IPXE_ETH_SLOW_H
2 #define _IPXE_ETH_SLOW_H
3 
4 /** @file
5  *
6  * Ethernet slow protocols
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 /** Slow protocols header */
15  /** Slow protocols subtype */
17  /** Subtype version number */
19 } __attribute__ (( packed ));
20 
21 /** LACP subtype */
22 #define ETH_SLOW_SUBTYPE_LACP 1
23 
24 /** LACP version number */
25 #define ETH_SLOW_LACP_VERSION 1
26 
27 /** Marker subtype */
28 #define ETH_SLOW_SUBTYPE_MARKER 2
29 
30 /** Marker version number */
31 #define ETH_SLOW_MARKER_VERSION 1
32 
33 /** TLV (type, length, value) header */
35  /** Type
36  *
37  * This is an ETH_SLOW_TLV_XXX constant.
38  */
40  /** Length
41  *
42  * The length includes the TLV header (except for a TLV
43  * terminator, which has a length of zero).
44  */
46 } __attribute__ (( packed ));
47 
48 /** Terminator type */
49 #define ETH_SLOW_TLV_TERMINATOR 0
50 
51 /** Terminator length */
52 #define ETH_SLOW_TLV_TERMINATOR_LEN 0
53 
54 /** LACP actor type */
55 #define ETH_SLOW_TLV_LACP_ACTOR 1
56 
57 /** LACP actor length */
58 #define ETH_SLOW_TLV_LACP_ACTOR_LEN \
59  ( sizeof ( struct eth_slow_lacp_entity_tlv ) )
60 
61 /** LACP partner type */
62 #define ETH_SLOW_TLV_LACP_PARTNER 2
63 
64 /** LACP partner length */
65 #define ETH_SLOW_TLV_LACP_PARTNER_LEN \
66  ( sizeof ( struct eth_slow_lacp_entity_tlv ) )
67 
68 /** LACP collector type */
69 #define ETH_SLOW_TLV_LACP_COLLECTOR 3
70 
71 /** LACP collector length */
72 #define ETH_SLOW_TLV_LACP_COLLECTOR_LEN \
73  ( sizeof ( struct eth_slow_lacp_collector_tlv ) )
74 
75 /** Marker request type */
76 #define ETH_SLOW_TLV_MARKER_REQUEST 1
77 
78 /** Marker request length */
79 #define ETH_SLOW_TLV_MARKER_REQUEST_LEN \
80  ( sizeof ( struct eth_slow_marker_tlv ) )
81 
82 /** Marker response type */
83 #define ETH_SLOW_TLV_MARKER_RESPONSE 2
84 
85 /** Marker response length */
86 #define ETH_SLOW_TLV_MARKER_RESPONSE_LEN \
87  ( sizeof ( struct eth_slow_marker_tlv ) )
88 
89 /** Terminator TLV */
91  /** TLV header */
93 } __attribute__ (( packed ));
94 
95 /** LACP entity (actor or partner) TLV */
97  /** TLV header */
99  /** System priority
100  *
101  * Used to determine the order in which ports are selected for
102  * aggregation.
103  */
105  /** System identifier
106  *
107  * Used to uniquely identify the system (i.e. the entity with
108  * potentially multiple ports).
109  */
111  /** Key
112  *
113  * Used to uniquely identify a group of aggregatable ports
114  * within a system.
115  */
117  /** Port priority
118  *
119  * Used to determine the order in which ports are selected for
120  * aggregation.
121  */
123  /** Port identifier
124  *
125  * Used to uniquely identify a port within a system.
126  */
128  /** State
129  *
130  * This is the bitwise OR of zero or more LACP_STATE_XXX
131  * constants.
132  */
134  /** Reserved */
136 } __attribute__ (( packed ));
137 
138 /** Maximum system priority */
139 #define LACP_SYSTEM_PRIORITY_MAX 0xffff
140 
141 /** Maximum port priority */
142 #define LACP_PORT_PRIORITY_MAX 0xff
143 
144 /** LACP entity is active
145  *
146  * Represented by the state character "A"/"a"
147  */
148 #define LACP_STATE_ACTIVE 0x01
149 
150 /** LACP timeout is short
151  *
152  * Short timeout is one second, long timeout is 30s
153  *
154  * Represented by the state character "F"/"f"
155  */
156 #define LACP_STATE_FAST 0x02
157 
158 /** LACP link is aggregateable
159  *
160  * Represented by the state characters "G"/"g"
161  */
162 #define LACP_STATE_AGGREGATABLE 0x04
163 
164 /** LACP link is in synchronisation
165  *
166  * Represented by the state characters "S"/"s"
167  */
168 #define LACP_STATE_IN_SYNC 0x08
169 
170 /** LACP link is collecting (receiving)
171  *
172  * Represented by the state characters "C"/"c"
173  */
174 #define LACP_STATE_COLLECTING 0x10
175 
176 /** LACP link is distributing (transmitting)
177  *
178  * Represented by the state characters "D"/"d"
179  */
180 #define LACP_STATE_DISTRIBUTING 0x20
181 
182 /** LACP entity is using defaulted partner information
183  *
184  * Represented by the state characters "L"/"l"
185  */
186 #define LACP_STATE_DEFAULTED 0x40
187 
188 /** LACP entity receive state machine is in EXPIRED
189  *
190  * Represented by the state characters "X"/"x"
191  */
192 #define LACP_STATE_EXPIRED 0x80
193 
194 /** LACP fast interval (1 second) */
195 #define LACP_INTERVAL_FAST 1
196 
197 /** LACP slow interval (30 seconds) */
198 #define LACP_INTERVAL_SLOW 30
199 
200 /** LACP collector TLV */
202  /** TLV header */
204  /** Maximum delay (in 10us increments) */
206  /** Reserved */
208 } __attribute__ (( packed ));
209 
210 /** Marker TLV */
212  /** TLV header */
214  /** Requester port */
216  /** Requester system */
218  /** Requester transaction ID */
220  /** Padding */
222 } __attribute__ (( packed ));
223 
224 /** LACP packet */
226  /** Slow protocols header */
228  /** Actor information */
230  /** Partner information */
232  /** Collector information */
234  /** Terminator */
236  /** Reserved */
238 } __attribute__ (( packed ));
239 
240 /** Marker packet */
242  /** Slow protocols header */
244  /** Marker information */
246  /** Terminator */
248  /** Reserved */
250 } __attribute__ (( packed ));
251 
252 /** Slow protocols packet */
254  /** Slow protocols header */
256  /** LACP packet */
258  /** Marker packet */
260 } __attribute__ (( packed ));
261 
262 #endif /* _IPXE_ETH_SLOW_H */
unsigned short uint16_t
Definition: stdint.h:11
struct eth_slow_marker_tlv marker
Marker information.
Definition: eth_slow.h:245
struct eth_slow_lacp lacp
LACP packet.
Definition: eth_slow.h:257
uint8_t reserved[3]
Reserved.
Definition: eth_slow.h:135
Slow protocols header.
Definition: eth_slow.h:14
uint8_t system[ETH_ALEN]
Requester system.
Definition: eth_slow.h:217
LACP entity (actor or partner) TLV.
Definition: eth_slow.h:96
struct eth_slow_terminator_tlv terminator
Terminator.
Definition: eth_slow.h:235
Slow protocols packet.
Definition: eth_slow.h:253
Marker packet.
Definition: eth_slow.h:241
struct eth_slow_lacp_collector_tlv collector
Collector information.
Definition: eth_slow.h:233
uint8_t state
State.
Definition: eth_slow.h:133
uint8_t reserved[90]
Reserved.
Definition: eth_slow.h:249
LACP packet.
Definition: eth_slow.h:225
struct eth_slow_header header
Slow protocols header.
Definition: eth_slow.h:255
Marker TLV.
Definition: eth_slow.h:211
uint16_t max_delay
Maximum delay (in 10us increments)
Definition: eth_slow.h:205
uint8_t system[ETH_ALEN]
System identifier.
Definition: eth_slow.h:110
FILE_SECBOOT(PERMITTED)
uint16_t port
Requester port.
Definition: eth_slow.h:215
struct eth_slow_header header
Slow protocols header.
Definition: eth_slow.h:227
struct eth_slow_header header
Slow protocols header.
Definition: eth_slow.h:243
struct eth_slow_terminator_tlv terminator
Terminator.
Definition: eth_slow.h:247
uint8_t length
Length.
Definition: eth_slow.h:45
uint8_t subtype
Slow protocols subtype.
Definition: eth_slow.h:16
unsigned char uint8_t
Definition: stdint.h:10
struct eth_slow_lacp_entity_tlv partner
Partner information.
Definition: eth_slow.h:231
#define ETH_ALEN
Definition: if_ether.h:9
unsigned int uint32_t
Definition: stdint.h:12
Definition: bnxt_hsi.h:52
uint8_t reserved[50]
Reserved.
Definition: eth_slow.h:237
uint16_t system_priority
System priority.
Definition: eth_slow.h:104
struct eth_slow_header __attribute__((packed))
uint32_t xact
Requester transaction ID.
Definition: eth_slow.h:219
uint8_t type
Type.
Definition: eth_slow.h:39
uint8_t reserved[12]
Reserved.
Definition: eth_slow.h:207
LACP collector TLV.
Definition: eth_slow.h:201
struct eth_slow_marker marker
Marker packet.
Definition: eth_slow.h:259
Terminator TLV.
Definition: eth_slow.h:90
TLV (type, length, value) header.
Definition: eth_slow.h:34
uint16_t port_priority
Port priority.
Definition: eth_slow.h:122
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct eth_slow_lacp_entity_tlv actor
Actor information.
Definition: eth_slow.h:229
uint16_t port
Port identifier.
Definition: eth_slow.h:127
uint16_t pad
Padding.
Definition: eth_slow.h:221
uint8_t version
Subtype version number.
Definition: eth_slow.h:18