DPDK  20.05.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 
32 #define BONDING_MODE_ACTIVE_BACKUP (1)
33 
39 #define BONDING_MODE_BALANCE (2)
40 
45 #define BONDING_MODE_BROADCAST (3)
46 
49 #define BONDING_MODE_8023AD (4)
50 
68 #define BONDING_MODE_TLB (5)
69 
73 #define BONDING_MODE_ALB (6)
74 
83 /* Balance Mode Transmit Policies */
84 #define BALANCE_XMIT_POLICY_LAYER2 (0)
85 
86 #define BALANCE_XMIT_POLICY_LAYER23 (1)
87 
88 #define BALANCE_XMIT_POLICY_LAYER34 (2)
89 
101 int
102 rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id);
103 
112 int
113 rte_eth_bond_free(const char *name);
114 
124 int
125 rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id);
126 
136 int
137 rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id);
138 
148 int
149 rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode);
150 
159 int
160 rte_eth_bond_mode_get(uint16_t bonded_port_id);
161 
171 int
172 rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id);
173 
182 int
183 rte_eth_bond_primary_get(uint16_t bonded_port_id);
184 
196 int
197 rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
198  uint16_t len);
199 
212 int
213 rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
214  uint16_t len);
215 
226 int
227 rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
228  struct rte_ether_addr *mac_addr);
229 
239 int
240 rte_eth_bond_mac_address_reset(uint16_t bonded_port_id);
241 
253 int
254 rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy);
255 
264 int
265 rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id);
266 
278 int
279 rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms);
280 
290 int
291 rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id);
292 
293 
304 int
305 rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
306  uint32_t delay_ms);
307 
317 int
318 rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id);
319 
330 int
331 rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id,
332  uint32_t delay_ms);
333 
343 int
344 rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id);
345 
346 
347 #ifdef __cplusplus
348 }
349 #endif
350 
351 #endif
int rte_eth_bond_mac_address_set(uint16_t bonded_port_id, struct rte_ether_addr *mac_addr)
int rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
int rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
int rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
int rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
int rte_eth_bond_free(const char *name)
int rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], uint16_t len)
int rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms)
int rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
int rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
int rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], uint16_t len)
int rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
int rte_eth_bond_mode_get(uint16_t bonded_port_id)
int rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
int rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id)
int rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id)
int rte_eth_bond_primary_get(uint16_t bonded_port_id)
int rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id)
int rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id)
int rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy)