return max_nb_of_tx_pkts;
}
-void
+static void
link_properties_set(struct rte_eth_dev *ethdev, struct rte_eth_link *slave_link)
{
struct bond_dev_private *bond_ctx = ethdev->data->dev_private;
}
}
-int
+static int
link_properties_valid(struct rte_eth_dev *ethdev,
struct rte_eth_link *slave_link)
{
if (active_pos < internals->active_slave_count)
goto link_update;
- /* if no active slave ports then set this port to be primary port */
- if (internals->active_slave_count < 1) {
- /* If first active slave, then change link status */
- bonded_eth_dev->data->dev_link.link_status = ETH_LINK_UP;
- internals->current_primary_port = port_id;
- lsc_flag = 1;
-
- mac_address_slaves_update(bonded_eth_dev);
- }
-
/* check link state properties if bonded link is up*/
if (bonded_eth_dev->data->dev_link.link_status == ETH_LINK_UP) {
if (link_properties_valid(bonded_eth_dev, &link) != 0)
link_properties_set(bonded_eth_dev, &link);
}
+ /* If no active slave ports then set this port to be
+ * the primary port.
+ */
+ if (internals->active_slave_count < 1) {
+ /* If first active slave, then change link status */
+ bonded_eth_dev->data->dev_link.link_status =
+ ETH_LINK_UP;
+ internals->current_primary_port = port_id;
+ lsc_flag = 1;
+
+ mac_address_slaves_update(bonded_eth_dev);
+ }
+
activate_slave(bonded_eth_dev, port_id);
- /* If user has defined the primary port then default to using it */
+ /* If the user has defined the primary port then default to
+ * using it.
+ */
if (internals->user_defined_primary_port &&
internals->primary_port == port_id)
bond_ethdev_primary_set(internals, port_id);
void
activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
-void
-link_properties_set(struct rte_eth_dev *bonded_eth_dev,
- struct rte_eth_link *slave_dev_link);
-int
-link_properties_valid(struct rte_eth_dev *bonded_eth_dev,
- struct rte_eth_link *slave_dev_link);
-
int
mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr);