summaryrefslogtreecommitdiff
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-07-30 15:33:24 (GMT)
committerDoug Ledford <dledford@redhat.com>2015-08-30 22:08:50 (GMT)
commite999869548b9ab97b7dffa053ba2fee81c31d069 (patch)
treed4c7bfbf220cd541d8d3426c50d7b257a68e733c /drivers/net/bonding
parent816dd19b3d191da88bc034fb85e21ed09a3ed320 (diff)
downloadlinux-e999869548b9ab97b7dffa053ba2fee81c31d069.tar.xz
net/bonding: Export bond_option_active_slave_get_rcu
Some consumers of the netdev events API would like to know who is the active slave when a NETDEV_CHANGEUPPER or NETDEV_BONDING_FAILOVER events occur. For example, when managing RoCE GIDs, GIDs based on the bond's ips should only be set on the port which corresponds to active slave netdevice. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_options.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index e9c624d..28bd005 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -730,19 +730,6 @@ static int bond_option_mode_set(struct bonding *bond,
return 0;
}
-static struct net_device *__bond_option_active_slave_get(struct bonding *bond,
- struct slave *slave)
-{
- return bond_uses_primary(bond) && slave ? slave->dev : NULL;
-}
-
-struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond)
-{
- struct slave *slave = rcu_dereference(bond->curr_active_slave);
-
- return __bond_option_active_slave_get(bond, slave);
-}
-
static int bond_option_active_slave_set(struct bonding *bond,
const struct bond_opt_value *newval)
{