5#ifndef RTE_ETH_BOND_8023AD_H_
6#define RTE_ETH_BOND_8023AD_H_
17#define STATE_LACP_ACTIVE 0x01
18#define STATE_LACP_SHORT_TIMEOUT 0x02
19#define STATE_AGGREGATION 0x04
20#define STATE_SYNCHRONIZATION 0x08
21#define STATE_COLLECTING 0x10
22#define STATE_DISTRIBUTING 0x20
24#define STATE_DEFAULTED 0x40
25#define STATE_EXPIRED 0x80
27#define TLV_TYPE_ACTOR_INFORMATION 0x01
28#define TLV_TYPE_PARTNER_INFORMATION 0x02
29#define TLV_TYPE_COLLECTOR_INFORMATION 0x03
30#define TLV_TYPE_TERMINATOR_INFORMATION 0x00
32#define SLOW_SUBTYPE_LACP 0x01
33#define SLOW_SUBTYPE_MARKER 0x02
35#define MARKER_TLV_TYPE_INFO 0x01
36#define MARKER_TLV_TYPE_RESP 0x02
38typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint16_t member_id,
41enum rte_bond_8023ad_selection {
47enum rte_bond_8023ad_agg_selection {
56 uint8_t reserved_119[119];
66 uint16_t system_priority;
68 struct rte_ether_addr system;
72 uint16_t port_priority;
79 uint8_t tlv_type_info;
81 struct port_params port_params;
83 uint8_t reserved_3[3];
89 uint8_t version_number;
91 struct lacpdu_actor_partner_params actor;
92 struct lacpdu_actor_partner_params partner;
94 uint8_t tlv_type_collector_info;
95 uint8_t collector_info_length;
96 uint16_t collector_max_delay;
97 uint8_t reserved_12[12];
99 uint8_t tlv_type_terminator;
100 uint8_t terminator_length;
101 uint8_t reserved_50[50];
107 struct lacpdu lacpdu;
112 uint8_t version_number;
114 uint8_t tlv_type_marker;
116 uint16_t requester_port;
117 struct rte_ether_addr requester_system;
118 uint32_t requester_transaction_id;
119 uint8_t reserved_2[2];
121 uint8_t tlv_type_terminator;
122 uint8_t terminator_length;
123 uint8_t reserved_90[90];
128 struct marker marker;
131struct rte_eth_bond_8023ad_conf {
132 uint32_t fast_periodic_ms;
133 uint32_t slow_periodic_ms;
134 uint32_t short_timeout_ms;
135 uint32_t long_timeout_ms;
136 uint32_t aggregate_wait_timeout_ms;
137 uint32_t tx_period_ms;
138 uint32_t rx_marker_period_ms;
139 uint32_t update_timeout_ms;
140 rte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;
141 enum rte_bond_8023ad_agg_selection agg_selection;
144struct rte_eth_bond_8023ad_member_info {
145 enum rte_bond_8023ad_selection selected;
147 struct port_params actor;
148 uint8_t partner_state;
149 struct port_params partner;
150 uint16_t agg_port_id;
166rte_eth_bond_8023ad_conf_get(uint16_t port_id,
167 struct rte_eth_bond_8023ad_conf *conf);
181rte_eth_bond_8023ad_setup(uint16_t port_id,
182 struct rte_eth_bond_8023ad_conf *conf);
197rte_eth_bond_8023ad_member_info(uint16_t port_id, uint16_t member_id,
198 struct rte_eth_bond_8023ad_member_info *conf);
211rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t member_id,
225rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t member_id);
238rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t member_id,
252rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t member_id);
266rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t member_id,
292rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port_id);
309rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port_id);
319rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id);
328rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
329 enum rte_bond_8023ad_agg_selection agg_selection);