1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2017 Intel Corporation
8 #include <rte_malloc.h>
9 #include <rte_ethdev_driver.h>
11 #include <rte_bus_vdev.h>
12 #include <rte_kvargs.h>
14 #include "rte_eth_bond.h"
15 #include "rte_eth_bond_private.h"
16 #include "rte_eth_bond_8023ad_private.h"
19 check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
21 /* Check valid pointer */
22 if (eth_dev->device->driver->name == NULL)
25 /* return 0 if driver name matches */
26 return eth_dev->device->driver->name != pmd_bond_drv.driver.name;
30 valid_bonded_port_id(uint16_t port_id)
32 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
33 return check_for_bonded_ethdev(&rte_eth_devices[port_id]);
37 check_for_master_bonded_ethdev(const struct rte_eth_dev *eth_dev)
40 struct bond_dev_private *internals;
42 if (check_for_bonded_ethdev(eth_dev) != 0)
45 internals = eth_dev->data->dev_private;
47 /* Check if any of slave devices is a bonded device */
48 for (i = 0; i < internals->slave_count; i++)
49 if (valid_bonded_port_id(internals->slaves[i].port_id) == 0)
56 valid_slave_port_id(uint16_t port_id, uint8_t mode)
58 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
60 /* Verify that port_id refers to a non bonded port */
61 if (check_for_bonded_ethdev(&rte_eth_devices[port_id]) == 0 &&
62 mode == BONDING_MODE_8023AD) {
63 RTE_BOND_LOG(ERR, "Cannot add slave to bonded device in 802.3ad"
64 " mode as slave is also a bonded device, only "
65 "physical devices can be support in this mode.");
73 activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
75 struct bond_dev_private *internals = eth_dev->data->dev_private;
76 uint8_t active_count = internals->active_slave_count;
78 if (internals->mode == BONDING_MODE_8023AD)
79 bond_mode_8023ad_activate_slave(eth_dev, port_id);
81 if (internals->mode == BONDING_MODE_TLB
82 || internals->mode == BONDING_MODE_ALB) {
84 internals->tlb_slaves_order[active_count] = port_id;
87 RTE_ASSERT(internals->active_slave_count <
88 (RTE_DIM(internals->active_slaves) - 1));
90 internals->active_slaves[internals->active_slave_count] = port_id;
91 internals->active_slave_count++;
93 if (internals->mode == BONDING_MODE_TLB)
94 bond_tlb_activate_slave(internals);
95 if (internals->mode == BONDING_MODE_ALB)
96 bond_mode_alb_client_list_upd(eth_dev);
100 deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
103 struct bond_dev_private *internals = eth_dev->data->dev_private;
104 uint16_t active_count = internals->active_slave_count;
106 if (internals->mode == BONDING_MODE_8023AD) {
107 bond_mode_8023ad_stop(eth_dev);
108 bond_mode_8023ad_deactivate_slave(eth_dev, port_id);
109 } else if (internals->mode == BONDING_MODE_TLB
110 || internals->mode == BONDING_MODE_ALB)
111 bond_tlb_disable(internals);
113 slave_pos = find_slave_by_id(internals->active_slaves, active_count,
116 /* If slave was not at the end of the list
117 * shift active slaves up active array list */
118 if (slave_pos < active_count) {
120 memmove(internals->active_slaves + slave_pos,
121 internals->active_slaves + slave_pos + 1,
122 (active_count - slave_pos) *
123 sizeof(internals->active_slaves[0]));
126 RTE_ASSERT(active_count < RTE_DIM(internals->active_slaves));
127 internals->active_slave_count = active_count;
129 if (eth_dev->data->dev_started) {
130 if (internals->mode == BONDING_MODE_8023AD) {
131 bond_mode_8023ad_start(eth_dev);
132 } else if (internals->mode == BONDING_MODE_TLB) {
133 bond_tlb_enable(internals);
134 } else if (internals->mode == BONDING_MODE_ALB) {
135 bond_tlb_enable(internals);
136 bond_mode_alb_client_list_upd(eth_dev);
142 rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
144 struct bond_dev_private *internals;
150 RTE_BOND_LOG(ERR, "Invalid name specified");
154 ret = snprintf(devargs, sizeof(devargs),
155 "driver=net_bonding,mode=%d,socket_id=%d", mode, socket_id);
156 if (ret < 0 || ret >= (int)sizeof(devargs))
159 ret = rte_vdev_init(name, devargs);
163 ret = rte_eth_dev_get_port_by_name(name, &port_id);
167 * To make bond_ethdev_configure() happy we need to free the
168 * internals->kvlist here.
170 * Also see comment in bond_ethdev_configure().
172 internals = rte_eth_devices[port_id].data->dev_private;
173 rte_kvargs_free(internals->kvlist);
174 internals->kvlist = NULL;
180 rte_eth_bond_free(const char *name)
182 return rte_vdev_uninit(name);
186 slave_vlan_filter_set(uint16_t bonded_port_id, uint16_t slave_port_id)
188 struct rte_eth_dev *bonded_eth_dev;
189 struct bond_dev_private *internals;
196 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
197 if ((bonded_eth_dev->data->dev_conf.rxmode.offloads &
198 DEV_RX_OFFLOAD_VLAN_FILTER) == 0)
201 internals = bonded_eth_dev->data->dev_private;
202 found = rte_bitmap_scan(internals->vlan_filter_bmp, &pos, &slab);
212 for (i = 0, mask = 1;
213 i < RTE_BITMAP_SLAB_BIT_SIZE;
215 if (unlikely(slab & mask)) {
216 uint16_t vlan_id = pos + i;
218 res = rte_eth_dev_vlan_filter(slave_port_id,
222 found = rte_bitmap_scan(internals->vlan_filter_bmp,
224 } while (found && first != pos && res == 0);
230 slave_rte_flow_prepare(uint16_t slave_id, struct bond_dev_private *internals)
232 struct rte_flow *flow;
233 struct rte_flow_error ferror;
234 uint16_t slave_port_id = internals->slaves[slave_id].port_id;
236 if (internals->flow_isolated_valid != 0) {
237 rte_eth_dev_stop(slave_port_id);
238 if (rte_flow_isolate(slave_port_id, internals->flow_isolated,
240 RTE_BOND_LOG(ERR, "rte_flow_isolate failed for slave"
241 " %d: %s", slave_id, ferror.message ?
242 ferror.message : "(no stated reason)");
246 TAILQ_FOREACH(flow, &internals->flow_list, next) {
247 flow->flows[slave_id] = rte_flow_create(slave_port_id,
252 if (flow->flows[slave_id] == NULL) {
253 RTE_BOND_LOG(ERR, "Cannot create flow for slave"
255 ferror.message ? ferror.message :
256 "(no stated reason)");
257 /* Destroy successful bond flows from the slave */
258 TAILQ_FOREACH(flow, &internals->flow_list, next) {
259 if (flow->flows[slave_id] != NULL) {
260 rte_flow_destroy(slave_port_id,
261 flow->flows[slave_id],
263 flow->flows[slave_id] = NULL;
273 __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
275 struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev;
276 struct bond_dev_private *internals;
277 struct rte_eth_link link_props;
278 struct rte_eth_dev_info dev_info;
280 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
281 internals = bonded_eth_dev->data->dev_private;
283 if (valid_slave_port_id(slave_port_id, internals->mode) != 0)
286 slave_eth_dev = &rte_eth_devices[slave_port_id];
287 if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDED_SLAVE) {
288 RTE_BOND_LOG(ERR, "Slave device is already a slave of a bonded device");
292 rte_eth_dev_info_get(slave_port_id, &dev_info);
293 if (dev_info.max_rx_pktlen < internals->max_rx_pktlen) {
294 RTE_BOND_LOG(ERR, "Slave (port %u) max_rx_pktlen too small",
299 slave_add(internals, slave_eth_dev);
301 /* We need to store slaves reta_size to be able to synchronize RETA for all
302 * slave devices even if its sizes are different.
304 internals->slaves[internals->slave_count].reta_size = dev_info.reta_size;
306 if (internals->slave_count < 1) {
307 /* if MAC is not user defined then use MAC of first slave add to
309 if (!internals->user_defined_mac) {
310 if (mac_address_set(bonded_eth_dev,
311 slave_eth_dev->data->mac_addrs)) {
312 RTE_BOND_LOG(ERR, "Failed to set MAC address");
317 /* Inherit eth dev link properties from first slave */
318 link_properties_set(bonded_eth_dev,
319 &(slave_eth_dev->data->dev_link));
321 /* Make primary slave */
322 internals->primary_port = slave_port_id;
323 internals->current_primary_port = slave_port_id;
325 /* Inherit queues settings from first slave */
326 internals->nb_rx_queues = slave_eth_dev->data->nb_rx_queues;
327 internals->nb_tx_queues = slave_eth_dev->data->nb_tx_queues;
329 internals->reta_size = dev_info.reta_size;
331 /* Take the first dev's offload capabilities */
332 internals->rx_offload_capa = dev_info.rx_offload_capa;
333 internals->tx_offload_capa = dev_info.tx_offload_capa;
334 internals->rx_queue_offload_capa = dev_info.rx_queue_offload_capa;
335 internals->tx_queue_offload_capa = dev_info.tx_queue_offload_capa;
336 internals->flow_type_rss_offloads = dev_info.flow_type_rss_offloads;
338 /* Inherit first slave's max rx packet size */
339 internals->candidate_max_rx_pktlen = dev_info.max_rx_pktlen;
342 internals->rx_offload_capa &= dev_info.rx_offload_capa;
343 internals->tx_offload_capa &= dev_info.tx_offload_capa;
344 internals->rx_queue_offload_capa &= dev_info.rx_queue_offload_capa;
345 internals->tx_queue_offload_capa &= dev_info.tx_queue_offload_capa;
346 internals->flow_type_rss_offloads &= dev_info.flow_type_rss_offloads;
348 /* RETA size is GCD of all slaves RETA sizes, so, if all sizes will be
349 * the power of 2, the lower one is GCD
351 if (internals->reta_size > dev_info.reta_size)
352 internals->reta_size = dev_info.reta_size;
354 if (!internals->max_rx_pktlen &&
355 dev_info.max_rx_pktlen < internals->candidate_max_rx_pktlen)
356 internals->candidate_max_rx_pktlen = dev_info.max_rx_pktlen;
359 bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf &=
360 internals->flow_type_rss_offloads;
362 if (slave_rte_flow_prepare(internals->slave_count, internals) != 0) {
363 RTE_BOND_LOG(ERR, "Failed to prepare new slave flows: port=%d",
368 /* Add additional MAC addresses to the slave */
369 if (slave_add_mac_addresses(bonded_eth_dev, slave_port_id) != 0) {
370 RTE_BOND_LOG(ERR, "Failed to add mac address(es) to slave %hu",
375 internals->slave_count++;
377 if (bonded_eth_dev->data->dev_started) {
378 if (slave_configure(bonded_eth_dev, slave_eth_dev) != 0) {
379 internals->slave_count--;
380 RTE_BOND_LOG(ERR, "rte_bond_slaves_configure: port=%d",
386 /* Add slave details to bonded device */
387 slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDED_SLAVE;
389 /* Update all slave devices MACs */
390 mac_address_slaves_update(bonded_eth_dev);
392 /* Register link status change callback with bonded device pointer as
394 rte_eth_dev_callback_register(slave_port_id, RTE_ETH_EVENT_INTR_LSC,
395 bond_ethdev_lsc_event_callback, &bonded_eth_dev->data->port_id);
397 /* If bonded device is started then we can add the slave to our active
399 if (bonded_eth_dev->data->dev_started) {
400 rte_eth_link_get_nowait(slave_port_id, &link_props);
402 if (link_props.link_status == ETH_LINK_UP) {
403 if (internals->active_slave_count == 0 &&
404 !internals->user_defined_primary_port)
405 bond_ethdev_primary_set(internals,
410 slave_vlan_filter_set(bonded_port_id, slave_port_id);
417 rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
419 struct rte_eth_dev *bonded_eth_dev;
420 struct bond_dev_private *internals;
424 /* Verify that port id's are valid bonded and slave ports */
425 if (valid_bonded_port_id(bonded_port_id) != 0)
428 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
429 internals = bonded_eth_dev->data->dev_private;
431 rte_spinlock_lock(&internals->lock);
433 retval = __eth_bond_slave_add_lock_free(bonded_port_id, slave_port_id);
435 rte_spinlock_unlock(&internals->lock);
441 __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
442 uint16_t slave_port_id)
444 struct rte_eth_dev *bonded_eth_dev;
445 struct bond_dev_private *internals;
446 struct rte_eth_dev *slave_eth_dev;
447 struct rte_flow_error flow_error;
448 struct rte_flow *flow;
451 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
452 internals = bonded_eth_dev->data->dev_private;
454 if (valid_slave_port_id(slave_port_id, internals->mode) < 0)
457 /* first remove from active slave list */
458 slave_idx = find_slave_by_id(internals->active_slaves,
459 internals->active_slave_count, slave_port_id);
461 if (slave_idx < internals->active_slave_count)
462 deactivate_slave(bonded_eth_dev, slave_port_id);
465 /* now find in slave list */
466 for (i = 0; i < internals->slave_count; i++)
467 if (internals->slaves[i].port_id == slave_port_id) {
473 RTE_BOND_LOG(ERR, "Couldn't find slave in port list, slave count %d",
474 internals->slave_count);
478 /* Un-register link status change callback with bonded device pointer as
480 rte_eth_dev_callback_unregister(slave_port_id, RTE_ETH_EVENT_INTR_LSC,
481 bond_ethdev_lsc_event_callback,
482 &rte_eth_devices[bonded_port_id].data->port_id);
484 /* Restore original MAC address of slave device */
485 rte_eth_dev_default_mac_addr_set(slave_port_id,
486 &(internals->slaves[slave_idx].persisted_mac_addr));
488 /* remove additional MAC addresses from the slave */
489 slave_remove_mac_addresses(bonded_eth_dev, slave_port_id);
492 * Remove bond device flows from slave device.
493 * Note: don't restore flow isolate mode.
495 TAILQ_FOREACH(flow, &internals->flow_list, next) {
496 if (flow->flows[slave_idx] != NULL) {
497 rte_flow_destroy(slave_port_id, flow->flows[slave_idx],
499 flow->flows[slave_idx] = NULL;
503 slave_eth_dev = &rte_eth_devices[slave_port_id];
504 slave_remove(internals, slave_eth_dev);
505 slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE);
507 /* first slave in the active list will be the primary by default,
508 * otherwise use first device in list */
509 if (internals->current_primary_port == slave_port_id) {
510 if (internals->active_slave_count > 0)
511 internals->current_primary_port = internals->active_slaves[0];
512 else if (internals->slave_count > 0)
513 internals->current_primary_port = internals->slaves[0].port_id;
515 internals->primary_port = 0;
518 if (internals->active_slave_count < 1) {
519 /* if no slaves are any longer attached to bonded device and MAC is not
520 * user defined then clear MAC of bonded device as it will be reset
521 * when a new slave is added */
522 if (internals->slave_count < 1 && !internals->user_defined_mac)
523 memset(rte_eth_devices[bonded_port_id].data->mac_addrs, 0,
524 sizeof(*(rte_eth_devices[bonded_port_id].data->mac_addrs)));
526 if (internals->slave_count == 0) {
527 internals->rx_offload_capa = 0;
528 internals->tx_offload_capa = 0;
529 internals->rx_queue_offload_capa = 0;
530 internals->tx_queue_offload_capa = 0;
531 internals->flow_type_rss_offloads = ETH_RSS_PROTO_MASK;
532 internals->reta_size = 0;
533 internals->candidate_max_rx_pktlen = 0;
534 internals->max_rx_pktlen = 0;
540 rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
542 struct rte_eth_dev *bonded_eth_dev;
543 struct bond_dev_private *internals;
546 if (valid_bonded_port_id(bonded_port_id) != 0)
549 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
550 internals = bonded_eth_dev->data->dev_private;
552 rte_spinlock_lock(&internals->lock);
554 retval = __eth_bond_slave_remove_lock_free(bonded_port_id, slave_port_id);
556 rte_spinlock_unlock(&internals->lock);
562 rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
564 struct rte_eth_dev *bonded_eth_dev;
566 if (valid_bonded_port_id(bonded_port_id) != 0)
569 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
571 if (check_for_master_bonded_ethdev(bonded_eth_dev) != 0 &&
572 mode == BONDING_MODE_8023AD)
575 return bond_ethdev_mode_set(bonded_eth_dev, mode);
579 rte_eth_bond_mode_get(uint16_t bonded_port_id)
581 struct bond_dev_private *internals;
583 if (valid_bonded_port_id(bonded_port_id) != 0)
586 internals = rte_eth_devices[bonded_port_id].data->dev_private;
588 return internals->mode;
592 rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
594 struct bond_dev_private *internals;
596 if (valid_bonded_port_id(bonded_port_id) != 0)
599 internals = rte_eth_devices[bonded_port_id].data->dev_private;
601 if (valid_slave_port_id(slave_port_id, internals->mode) != 0)
604 internals->user_defined_primary_port = 1;
605 internals->primary_port = slave_port_id;
607 bond_ethdev_primary_set(internals, slave_port_id);
613 rte_eth_bond_primary_get(uint16_t bonded_port_id)
615 struct bond_dev_private *internals;
617 if (valid_bonded_port_id(bonded_port_id) != 0)
620 internals = rte_eth_devices[bonded_port_id].data->dev_private;
622 if (internals->slave_count < 1)
625 return internals->current_primary_port;
629 rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
632 struct bond_dev_private *internals;
635 if (valid_bonded_port_id(bonded_port_id) != 0)
641 internals = rte_eth_devices[bonded_port_id].data->dev_private;
643 if (internals->slave_count > len)
646 for (i = 0; i < internals->slave_count; i++)
647 slaves[i] = internals->slaves[i].port_id;
649 return internals->slave_count;
653 rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
656 struct bond_dev_private *internals;
658 if (valid_bonded_port_id(bonded_port_id) != 0)
664 internals = rte_eth_devices[bonded_port_id].data->dev_private;
666 if (internals->active_slave_count > len)
669 memcpy(slaves, internals->active_slaves,
670 internals->active_slave_count * sizeof(internals->active_slaves[0]));
672 return internals->active_slave_count;
676 rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
677 struct ether_addr *mac_addr)
679 struct rte_eth_dev *bonded_eth_dev;
680 struct bond_dev_private *internals;
682 if (valid_bonded_port_id(bonded_port_id) != 0)
685 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
686 internals = bonded_eth_dev->data->dev_private;
688 /* Set MAC Address of Bonded Device */
689 if (mac_address_set(bonded_eth_dev, mac_addr))
692 internals->user_defined_mac = 1;
694 /* Update all slave devices MACs*/
695 if (internals->slave_count > 0)
696 return mac_address_slaves_update(bonded_eth_dev);
702 rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
704 struct rte_eth_dev *bonded_eth_dev;
705 struct bond_dev_private *internals;
707 if (valid_bonded_port_id(bonded_port_id) != 0)
710 bonded_eth_dev = &rte_eth_devices[bonded_port_id];
711 internals = bonded_eth_dev->data->dev_private;
713 internals->user_defined_mac = 0;
715 if (internals->slave_count > 0) {
717 /* Get the primary slave location based on the primary port
718 * number as, while slave_add(), we will keep the primary
719 * slave based on slave_count,but not based on the primary port.
721 for (slave_port = 0; slave_port < internals->slave_count;
723 if (internals->slaves[slave_port].port_id ==
724 internals->primary_port)
728 /* Set MAC Address of Bonded Device */
729 if (mac_address_set(bonded_eth_dev,
730 &internals->slaves[slave_port].persisted_mac_addr)
732 RTE_BOND_LOG(ERR, "Failed to set MAC address on bonded device");
735 /* Update all slave devices MAC addresses */
736 return mac_address_slaves_update(bonded_eth_dev);
738 /* No need to update anything as no slaves present */
743 rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy)
745 struct bond_dev_private *internals;
747 if (valid_bonded_port_id(bonded_port_id) != 0)
750 internals = rte_eth_devices[bonded_port_id].data->dev_private;
753 case BALANCE_XMIT_POLICY_LAYER2:
754 internals->balance_xmit_policy = policy;
755 internals->burst_xmit_hash = burst_xmit_l2_hash;
757 case BALANCE_XMIT_POLICY_LAYER23:
758 internals->balance_xmit_policy = policy;
759 internals->burst_xmit_hash = burst_xmit_l23_hash;
761 case BALANCE_XMIT_POLICY_LAYER34:
762 internals->balance_xmit_policy = policy;
763 internals->burst_xmit_hash = burst_xmit_l34_hash;
773 rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id)
775 struct bond_dev_private *internals;
777 if (valid_bonded_port_id(bonded_port_id) != 0)
780 internals = rte_eth_devices[bonded_port_id].data->dev_private;
782 return internals->balance_xmit_policy;
786 rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms)
788 struct bond_dev_private *internals;
790 if (valid_bonded_port_id(bonded_port_id) != 0)
793 internals = rte_eth_devices[bonded_port_id].data->dev_private;
794 internals->link_status_polling_interval_ms = internal_ms;
800 rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id)
802 struct bond_dev_private *internals;
804 if (valid_bonded_port_id(bonded_port_id) != 0)
807 internals = rte_eth_devices[bonded_port_id].data->dev_private;
809 return internals->link_status_polling_interval_ms;
813 rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
817 struct bond_dev_private *internals;
819 if (valid_bonded_port_id(bonded_port_id) != 0)
822 internals = rte_eth_devices[bonded_port_id].data->dev_private;
823 internals->link_down_delay_ms = delay_ms;
829 rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id)
831 struct bond_dev_private *internals;
833 if (valid_bonded_port_id(bonded_port_id) != 0)
836 internals = rte_eth_devices[bonded_port_id].data->dev_private;
838 return internals->link_down_delay_ms;
842 rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
845 struct bond_dev_private *internals;
847 if (valid_bonded_port_id(bonded_port_id) != 0)
850 internals = rte_eth_devices[bonded_port_id].data->dev_private;
851 internals->link_up_delay_ms = delay_ms;
857 rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id)
859 struct bond_dev_private *internals;
861 if (valid_bonded_port_id(bonded_port_id) != 0)
864 internals = rte_eth_devices[bonded_port_id].data->dev_private;
866 return internals->link_up_delay_ms;