aggr_lacp.h (95c1c84b) aggr_lacp.h (da14cebe)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 143 unchanged lines hidden (view full) ---

152 boolean_t ReceiveState; /* Enabled/Disabled */
153 boolean_t TransmitState; /* Enabled/Disabled */
154
155 uint16_t ActorSystemPriority; /* System Priority */
156 uint16_t CollectorMaxDelay; /* tens of Usecs */
157 aggr_lacp_timer_t PeriodicTimer; /* AGGR_LACP_{LONG,SHORT} */
158 uint64_t TimeOfLastOperChange; /* Time in state */
159 boolean_t ready; /* Ready_N for all ports TRUE */
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 143 unchanged lines hidden (view full) ---

152 boolean_t ReceiveState; /* Enabled/Disabled */
153 boolean_t TransmitState; /* Enabled/Disabled */
154
155 uint16_t ActorSystemPriority; /* System Priority */
156 uint16_t CollectorMaxDelay; /* tens of Usecs */
157 aggr_lacp_timer_t PeriodicTimer; /* AGGR_LACP_{LONG,SHORT} */
158 uint64_t TimeOfLastOperChange; /* Time in state */
159 boolean_t ready; /* Ready_N for all ports TRUE */
160
161 krwlock_t gl_lock;
162} Agg_t;
163
164/*
165 * 802.3ad Variables used for managing the operation of
166 * the state machines (section 43.4.8)
167 * Note: These are on a per port basis.
168 */
169typedef enum {

--- 17 unchanged lines hidden (view full) ---

187 uint32_t current_while_timer_exp; /* # of times timer expired */
188 lacp_periodic_state_t periodic_state; /* State of periodic machine */
189 lacp_receive_state_t receive_state; /* State of receive machine */
190 lacp_mux_state_t mux_state; /* State of mux machine */
191 lacp_churn_state_t churn_state; /* State of churn machine */
192} state_machine_t;
193
194/*
160} Agg_t;
161
162/*
163 * 802.3ad Variables used for managing the operation of
164 * the state machines (section 43.4.8)
165 * Note: These are on a per port basis.
166 */
167typedef enum {

--- 17 unchanged lines hidden (view full) ---

185 uint32_t current_while_timer_exp; /* # of times timer expired */
186 lacp_periodic_state_t periodic_state; /* State of periodic machine */
187 lacp_receive_state_t receive_state; /* State of receive machine */
188 lacp_mux_state_t mux_state; /* State of mux machine */
189 lacp_churn_state_t churn_state; /* State of churn machine */
190} state_machine_t;
191
192/*
193 * The following three flags are set when specific timer is timed out; used
194 * by the LACP timer handler thread.
195 */
196#define LACP_PERIODIC_TIMEOUT 0x01
197#define LACP_WAIT_WHILE_TIMEOUT 0x02
198#define LACP_CURRENT_WHILE_TIMEOUT 0x04
199/*
200 * Set when the port is being deleted; used to inform the LACP timer handler
201 * thread to exit.
202 */
203#define LACP_THREAD_EXIT 0x08
204
205/*
195 * 802.3ad Variables associated with each port (section 43.4.7)
196 */
197typedef struct aggr_lacp_port {
198 uint16_t ActorPortNumber; /* actor port number */
199 uint16_t ActorPortPriority; /* actor port priority */
200 uint32_t ActorPortAggrId; /* aggregator id */
201 boolean_t NTT; /* need to transmit */
202 uint16_t ActorAdminPortKey; /* admin. port key */

--- 20 unchanged lines hidden (view full) ---

223
224 /*
225 * State machine and Timer information.
226 */
227 state_machine_t sm; /* state machine variables per port */
228 lacp_timer_t current_while_timer;
229 lacp_timer_t periodic_timer;
230 lacp_timer_t wait_while_timer;
206 * 802.3ad Variables associated with each port (section 43.4.7)
207 */
208typedef struct aggr_lacp_port {
209 uint16_t ActorPortNumber; /* actor port number */
210 uint16_t ActorPortPriority; /* actor port priority */
211 uint32_t ActorPortAggrId; /* aggregator id */
212 boolean_t NTT; /* need to transmit */
213 uint16_t ActorAdminPortKey; /* admin. port key */

--- 20 unchanged lines hidden (view full) ---

234
235 /*
236 * State machine and Timer information.
237 */
238 state_machine_t sm; /* state machine variables per port */
239 lacp_timer_t current_while_timer;
240 lacp_timer_t periodic_timer;
241 lacp_timer_t wait_while_timer;
242 uint32_t lacp_timer_bits;
243 kthread_t *lacp_timer_thread;
244 kmutex_t lacp_timer_lock;
245 kcondvar_t lacp_timer_cv;
231 hrtime_t time;
232} aggr_lacp_port_t;
233
234typedef struct lacp_stats_s {
235 uint64_t LACPDUsRx;
236 uint64_t MarkerPDUsRx;
237 uint64_t MarkerResponsePDUsRx;
238 uint64_t UnknownRx;

--- 90 unchanged lines hidden ---
246 hrtime_t time;
247} aggr_lacp_port_t;
248
249typedef struct lacp_stats_s {
250 uint64_t LACPDUsRx;
251 uint64_t MarkerPDUsRx;
252 uint64_t MarkerResponsePDUsRx;
253 uint64_t UnknownRx;

--- 90 unchanged lines hidden ---