86 u16 socket_id = rte_lcore_to_socket_id (lcore);
137 (
struct ether_addr *)
150 if (xd->
pmd == VNET_DPDK_PMD_BOND)
153 int nlink = rte_eth_bond_slaves_get (xd->
device_index, slink, 16);
156 u8 dpdk_port = slink[--nlink];
157 rte_eth_allmulticast_enable (dpdk_port);
172 if (xd->
pmd == VNET_DPDK_PMD_BOND)
175 int nlink = rte_eth_bond_slaves_get (xd->
device_index, slink, 16);
178 u8 dpdk_port = slink[--nlink];
179 rte_eth_dev_stop (dpdk_port);
186 enum rte_eth_event_type type,
void *param)
188 struct rte_eth_link link;
192 RTE_SET_USED (param);
193 if (type != RTE_ETH_EVENT_INTR_LSC)
195 clib_warning (
"Unknown event %d received for port %d", type, port_id);
199 rte_eth_link_get_nowait (port_id, &link);
200 u8 link_up = link.link_status;
205 int bd_mode = rte_eth_bond_mode_get (bd_port);
211 "slave of port %d BondEthernet%d in mode %d",
212 port_id, (link_up) ?
"UP" :
"DOWN",
213 bd_port, xd->
port_id, bd_mode);
214 if (bd_mode == BONDING_MODE_ACTIVE_BACKUP)
216 rte_eth_link_get_nowait (bd_port, &link);
217 if (link.link_status)
235 port_id, (
unsigned) link.link_speed,
236 (link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
237 "full-duplex" :
"half-duplex");
#define DPDK_DEVICE_FLAG_PROMISC
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
#define DPDK_DEVICE_FLAG_PMD_INIT_FAIL
vnet_main_t * vnet_get_main(void)
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
void dpdk_port_state_callback(uint8_t port_id, enum rte_eth_event_type type, void *param)
u32 send_garp_na_process_node_index
#define clib_error_return(e, args...)
void dpdk_device_setup(dpdk_device_t *xd)
struct rte_eth_conf port_conf
struct rte_eth_txconf tx_conf
vlib_worker_thread_t * vlib_worker_threads
void dpdk_device_start(dpdk_device_t *xd)
static_always_inline uword vnet_get_device_input_thread_index(vnet_main_t *vnm, u32 hw_if_index, u16 queue_id)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define DPDK_DEVICE_FLAG_ADMIN_UP
static_always_inline uword vlib_get_thread_index(void)
#define clib_warning(format, args...)
void dpdk_device_stop(dpdk_device_t *xd)
void dpdk_device_error(dpdk_device_t *xd, char *str, int rv)
struct rte_mempool ** pktmbuf_pools
static vlib_main_t * vlib_get_main(void)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VNET_SW_INTERFACE_FLAG_ERROR
#define DPDK_DEVICE_FLAG_BOND_SLAVE
#define clib_error_free(e)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".
#define DPDK_DEVICE_FLAG_BOND_SLAVE_UP