DPDK  24.07.0
rte_eth_bond.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4 
5 #ifndef _RTE_ETH_BOND_H_
6 #define _RTE_ETH_BOND_H_
7 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include <rte_ether.h>
25 
26 /* Supported modes of operation of link bonding library */
27 
28 #define BONDING_MODE_ROUND_ROBIN (0)
29 
33 #define BONDING_MODE_ACTIVE_BACKUP (1)
34 
41 #define BONDING_MODE_BALANCE (2)
42 
48 #define BONDING_MODE_BROADCAST (3)
49 
53 #define BONDING_MODE_8023AD (4)
54 
71 #define BONDING_MODE_TLB (5)
72 
77 #define BONDING_MODE_ALB (6)
78 
87 /* Balance Mode Transmit Policies */
88 #define BALANCE_XMIT_POLICY_LAYER2 (0)
89 
90 #define BALANCE_XMIT_POLICY_LAYER23 (1)
91 
92 #define BALANCE_XMIT_POLICY_LAYER34 (2)
93 
105 int
106 rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id);
107 
116 int
117 rte_eth_bond_free(const char *name);
118 
128 __rte_experimental
129 int
130 rte_eth_bond_member_add(uint16_t bonding_port_id, uint16_t member_port_id);
131 
141 __rte_experimental
142 int
143 rte_eth_bond_member_remove(uint16_t bonding_port_id, uint16_t member_port_id);
144 
154 int
155 rte_eth_bond_mode_set(uint16_t bonding_port_id, uint8_t mode);
156 
165 int
166 rte_eth_bond_mode_get(uint16_t bonding_port_id);
167 
177 int
178 rte_eth_bond_primary_set(uint16_t bonding_port_id, uint16_t member_port_id);
179 
188 int
189 rte_eth_bond_primary_get(uint16_t bonding_port_id);
190 
202 __rte_experimental
203 int
204 rte_eth_bond_members_get(uint16_t bonding_port_id, uint16_t members[],
205  uint16_t len);
206 
219 __rte_experimental
220 int
221 rte_eth_bond_active_members_get(uint16_t bonding_port_id, uint16_t members[],
222  uint16_t len);
223 
234 int
235 rte_eth_bond_mac_address_set(uint16_t bonding_port_id,
236  struct rte_ether_addr *mac_addr);
237 
247 int
248 rte_eth_bond_mac_address_reset(uint16_t bonding_port_id);
249 
261 int
262 rte_eth_bond_xmit_policy_set(uint16_t bonding_port_id, uint8_t policy);
263 
272 int
273 rte_eth_bond_xmit_policy_get(uint16_t bonding_port_id);
274 
286 int
287 rte_eth_bond_link_monitoring_set(uint16_t bonding_port_id, uint32_t internal_ms);
288 
298 int
299 rte_eth_bond_link_monitoring_get(uint16_t bonding_port_id);
300 
301 
312 int
313 rte_eth_bond_link_down_prop_delay_set(uint16_t bonding_port_id,
314  uint32_t delay_ms);
315 
325 int
326 rte_eth_bond_link_down_prop_delay_get(uint16_t bonding_port_id);
327 
338 int
339 rte_eth_bond_link_up_prop_delay_set(uint16_t bonding_port_id,
340  uint32_t delay_ms);
341 
351 int
352 rte_eth_bond_link_up_prop_delay_get(uint16_t bonding_port_id);
353 
354 
355 #ifdef __cplusplus
356 }
357 #endif
358 
359 #endif
int rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
int rte_eth_bond_mac_address_set(uint16_t bonding_port_id, struct rte_ether_addr *mac_addr)
__rte_experimental int rte_eth_bond_active_members_get(uint16_t bonding_port_id, uint16_t members[], uint16_t len)
int rte_eth_bond_free(const char *name)
int rte_eth_bond_link_monitoring_get(uint16_t bonding_port_id)
int rte_eth_bond_xmit_policy_get(uint16_t bonding_port_id)
int rte_eth_bond_mode_set(uint16_t bonding_port_id, uint8_t mode)
__rte_experimental int rte_eth_bond_members_get(uint16_t bonding_port_id, uint16_t members[], uint16_t len)
int rte_eth_bond_primary_set(uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_link_up_prop_delay_get(uint16_t bonding_port_id)
int rte_eth_bond_mac_address_reset(uint16_t bonding_port_id)
__rte_experimental int rte_eth_bond_member_add(uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_mode_get(uint16_t bonding_port_id)
int rte_eth_bond_link_down_prop_delay_set(uint16_t bonding_port_id, uint32_t delay_ms)
int rte_eth_bond_link_monitoring_set(uint16_t bonding_port_id, uint32_t internal_ms)
int rte_eth_bond_link_down_prop_delay_get(uint16_t bonding_port_id)
int rte_eth_bond_xmit_policy_set(uint16_t bonding_port_id, uint8_t policy)
__rte_experimental int rte_eth_bond_member_remove(uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_link_up_prop_delay_set(uint16_t bonding_port_id, uint32_t delay_ms)
int rte_eth_bond_primary_get(uint16_t bonding_port_id)