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