16 #ifndef __included_lacp_protocol_h__ 17 #define __included_lacp_protocol_h__ 22 #define LACP_CHURN_DETECTION_TIME 60 23 #define LACP_AGGREGATE_WAIT_TIME 2.0 25 #define LACP_SUBTYPE 1 26 #define LACP_ACTOR_LACP_VERSION 1 28 #define foreach_lacp_tlv \ 29 _ (TERMINATOR_INFORMATION, 0) \ 30 _ (ACTOR_INFORMATION, 1) \ 31 _ (PARTNER_INFORMATION , 2) \ 32 _ (COLLECTOR_INFORMATION, 3) 36 #define _(f,n) LACP_##f = (n), 41 #define foreach_lacp_port \ 48 #define _(f,n) LACP_PORT_##f = (n), 54 #define foreach_lacp_state \ 55 _(0, LACP_ACTIVITY, "activity") \ 56 _(1, LACP_TIMEOUT, "lacp timeout") \ 57 _(2, AGGREGATION, "aggregation") \ 58 _(3, SYNCHRONIZATION, "synchronization") \ 59 _(4, COLLECTING, "collecting") \ 60 _(5, DISTRIBUTING, "distributing") \ 61 _(6, DEFAULTED, "defaulted") \ 62 _(7, EXPIRED, "expired") 64 #define LACP_STEADY_STATE (LACP_STATE_SYNCHRONIZATION | \ 65 LACP_STATE_COLLECTING | \ 66 LACP_STATE_DISTRIBUTING) 70 #define _(a, b, c) LACP_STATE_##b = (1 << a), 75 #define foreach_lacp_state_flag \ 76 _(0, LACP_STATE_LACP_ACTIVITY, "activity") \ 77 _(1, LACP_STATE_LACP_TIMEOUT, "lacp timeout") \ 78 _(2, LACP_STATE_AGGREGATION, "aggregation") \ 79 _(3, LACP_STATE_SYNCHRONIZATION, "synchronization") \ 80 _(4, LACP_STATE_COLLECTIING, "collecting") \ 81 _(5, LACP_STATE_DISTRIBUTING, "distributing") \ 82 _(6, LACP_STATE_DEFAULTED, "defaulted") \ 83 _(7, LACP_STATE_EXPIRED, "expired") 97 #define LACP_MAX_TX_IN_SECOND 3 98 #define LACP_DEFAULT_PORT_PRIORITY 0x00ff 99 #define LACP_DEFAULT_SYSTEM_PRIORITY 0xffff 105 lacp_port_info_t port_info;
u8 reserved[3];
106 }) lacp_actor_partner_t;
110 u8 tlv_type;
u8 tlv_length;
u16 max_delay;
116 u8 tlv_type;
u8 tlv_length;
118 }) lacp_terminator_t;
122 u8 subtype;
u8 version_number;
123 lacp_actor_partner_t actor; lacp_actor_partner_t partner;
124 lacp_collector_t collector; lacp_terminator_t terminator;
130 }) ethernet_lacp_pdu_t;
132 #define MARKER_SUBTYPE 2 133 #define MARKER_PROTOCOL_VERSION 1 135 #define foreach_marker_tlv \ 136 _ (TERMINATOR_INFORMATION, 0) \ 138 _ (RESPONSE_INFORMATION , 2) 142 #define _(f,n) MARKER_##f = (n), 149 u8 tlv_type;
u8 tlv_length;
151 }) marker_terminator_t;
157 u16 requester_port;
u8 requester_system[6];
158 u32 requester_transaction_id;
u8 pad[2];
159 }) marker_information_t;
165 marker_information_t marker_info;
166 marker_terminator_t terminator;
172 }) ethernet_marker_pdu_t;
u8 pad[3]
log2 (size of the packing page block)
#define foreach_lacp_state
#define foreach_marker_tlv
typedef CLIB_PACKED(struct { u8 tlv_type;u8 tlv_length;lacp_port_info_t port_info;u8 reserved[3];}) lacp_actor_partner_t
#define foreach_lacp_port