Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
dpdk
0010-bonding-fix-active-slaves-with-no-primary....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-bonding-fix-active-slaves-with-no-primary.patch of Package dpdk
From 8997a10bfcad789d000debaac4cd85cd3db57997 Mon Sep 17 00:00:00 2001 From: Eric Kinzie <ekinzie@brocade.com> Date: Tue, 1 Mar 2016 09:32:01 -0800 Subject: [PATCH] bonding: fix active slaves with no primary If the link state of a slave is "up" when added, it is added to the list of active slaves but, even if it is the only slave, is not selected as the primary interface. Generally, handling of link state interrupts selects an interface to be primary, but only if the active count is zero. This change avoids the situation where there are active slaves but no primary. Fixes: 2efb58cbab6e ("bond: new link bonding library") Signed-off-by: Eric Kinzie <ekinzie@brocade.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Declan Doherty <declan.doherty@intel.com> --- drivers/net/bonding/rte_eth_bond_api.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index a0995ec..5292ae1 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -419,8 +419,13 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) if (bonded_eth_dev->data->dev_started) { rte_eth_link_get_nowait(slave_port_id, &link_props); - if (link_props.link_status == 1) + if (link_props.link_status == 1) { + if (internals->active_slave_count == 0 && + !internals->user_defined_primary_port) + bond_ethdev_primary_set(internals, + slave_port_id); activate_slave(bonded_eth_dev, slave_port_id); + } } return 0; -- 2.6.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor