DPDK  24.11.0-rc3
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 #include <rte_ether.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
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 int
129 rte_eth_bond_member_add(uint16_t bonding_port_id, uint16_t member_port_id);
130 
140 int
141 rte_eth_bond_member_remove(uint16_t bonding_port_id, uint16_t member_port_id);
142 
152 int
153 rte_eth_bond_mode_set(uint16_t bonding_port_id, uint8_t mode);
154 
163 int
164 rte_eth_bond_mode_get(uint16_t bonding_port_id);
165 
175 int
176 rte_eth_bond_primary_set(uint16_t bonding_port_id, uint16_t member_port_id);
177 
186 int
187 rte_eth_bond_primary_get(uint16_t bonding_port_id);
188 
200 int
201 rte_eth_bond_members_get(uint16_t bonding_port_id, uint16_t members[],
202  uint16_t len);
203 
216 int
217 rte_eth_bond_active_members_get(uint16_t bonding_port_id, uint16_t members[],
218  uint16_t len);
219 
230 int
231 rte_eth_bond_mac_address_set(uint16_t bonding_port_id,
232  struct rte_ether_addr *mac_addr);
233 
243 int
244 rte_eth_bond_mac_address_reset(uint16_t bonding_port_id);
245 
257 int
258 rte_eth_bond_xmit_policy_set(uint16_t bonding_port_id, uint8_t policy);
259 
268 int
269 rte_eth_bond_xmit_policy_get(uint16_t bonding_port_id);
270 
282 int
283 rte_eth_bond_link_monitoring_set(uint16_t bonding_port_id, uint32_t internal_ms);
284 
294 int
295 rte_eth_bond_link_monitoring_get(uint16_t bonding_port_id);
296 
297 
308 int
309 rte_eth_bond_link_down_prop_delay_set(uint16_t bonding_port_id,
310  uint32_t delay_ms);
311 
321 int
322 rte_eth_bond_link_down_prop_delay_get(uint16_t bonding_port_id);
323 
334 int
335 rte_eth_bond_link_up_prop_delay_set(uint16_t bonding_port_id,
336  uint32_t delay_ms);
337 
347 int
348 rte_eth_bond_link_up_prop_delay_get(uint16_t bonding_port_id);
349 
350 
351 #ifdef __cplusplus
352 }
353 #endif
354 
355 #endif
int rte_eth_bond_member_remove(uint16_t bonding_port_id, uint16_t member_port_id)
int rte_eth_bond_member_add(uint16_t bonding_port_id, uint16_t member_port_id)
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)
int rte_eth_bond_free(const char *name)
int rte_eth_bond_link_monitoring_get(uint16_t bonding_port_id)
int rte_eth_bond_active_members_get(uint16_t bonding_port_id, uint16_t members[], uint16_t len)
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)
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)
int rte_eth_bond_mode_get(uint16_t bonding_port_id)
int rte_eth_bond_members_get(uint16_t bonding_port_id, uint16_t members[], uint16_t len)
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)
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)