Skip to contentSkip to conversation

bonding: rcu cleanups

PATCH Superseded Eric Dumazet 4 participants 11 messages Jul 15, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover bonding: rcu cleanups

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with full sparse & LOCKDEP support.

Lets clean the code.

Eric Dumazet (3):
bonding: get rid of bond_option_active_slave_get()
bonding: use rcu_access_pointer() in bonding_show_mii_status()
bonding: add proper __rcu annotation for curr_active_slave

 drivers/net/bonding/bond_alb.c     | 47 +++++++++++++++++++--------------
 drivers/net/bonding/bond_main.c    | 53 +++++++++++++++++++++-----------------
 drivers/net/bonding/bond_netlink.c | 21 +++++++++++----
 drivers/net/bonding/bond_options.c |  7 +----
 drivers/net/bonding/bond_sysfs.c   |  3 ++-
 drivers/net/bonding/bonding.h      |  7 +++--
 6 files changed, 81 insertions(+), 57 deletions(-)
Signature · 1 line
2.0.0.526.g5318336
#1 lore raw

PATCH 1/3 bonding: get rid of bond_option_active_slave_get()

Only keep bond_option_active_slave_get_rcu() helper.

bond_fill_info() uses a new bond_option_active_slave_get_ifindex() helper.

---
 drivers/net/bonding/bond_netlink.c | 21 ++++++++++++++++-----
 drivers/net/bonding/bond_options.c |  5 -----
 drivers/net/bonding/bonding.h      |  1 -
 3 files changed, 16 insertions(+), 11 deletions(-)
drivers/net/bonding/bond_netlink.c +16 -5
index 5ab3c1847e67..4d97e23eb497 100644
@@ -398,20 +398,31 @@ static size_t bond_get_size(const struct net_device *bond_dev)
 		0;
 }
 
+static int bond_option_active_slave_get_ifindex(struct bonding *bond)
+{
+	const struct net_device *slave;
+	int ifindex;
+
+	rcu_read_lock();
+	slave = bond_option_active_slave_get_rcu(bond);
+	ifindex = slave ? slave->ifindex : 0;
+	rcu_read_unlock();
+	return ifindex;
+}
+
 static int bond_fill_info(struct sk_buff *skb,
 			  const struct net_device *bond_dev)
 {
 	struct bonding *bond = netdev_priv(bond_dev);
-	struct net_device *slave_dev = bond_option_active_slave_get(bond);
-	struct nlattr *targets;
 	unsigned int packets_per_slave;
-	int i, targets_added;
+	int ifindex, i, targets_added;
+	struct nlattr *targets;
 
 	if (nla_put_u8(skb, IFLA_BOND_MODE, BOND_MODE(bond)))
 		goto nla_put_failure;
 
-	if (slave_dev &&
-	    nla_put_u32(skb, IFLA_BOND_ACTIVE_SLAVE, slave_dev->ifindex))
+	ifindex = bond_option_active_slave_get_ifindex(bond);
+	if (ifindex && nla_put_u32(skb, IFLA_BOND_ACTIVE_SLAVE, ifindex))
 		goto nla_put_failure;
 
 	if (nla_put_u32(skb, IFLA_BOND_MIIMON, bond->params.miimon))
drivers/net/bonding/bond_options.c +0 -5
index 540e0167bf24..b26271fd7b09 100644
@@ -704,11 +704,6 @@ struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond)
 	return __bond_option_active_slave_get(bond, slave);
 }
 
-struct net_device *bond_option_active_slave_get(struct bonding *bond)
-{
-	return __bond_option_active_slave_get(bond, bond->curr_active_slave);
-}
-
 static int bond_option_active_slave_set(struct bonding *bond,
 					const struct bond_opt_value *newval)
 {
drivers/net/bonding/bonding.h +0 -1
index 0b4d9cde0b05..713e2a99c661 100644
@@ -514,7 +514,6 @@ unsigned int bond_get_num_tx_queues(void);
 int bond_netlink_init(void);
 void bond_netlink_fini(void);
 struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond);
-struct net_device *bond_option_active_slave_get(struct bonding *bond);
 const char *bond_slave_link_status(s8 link);
 bool bond_verify_device_path(struct net_device *start_dev,
 			     struct net_device *end_dev,
Signature · 1 line
2.0.0.526.g5318336
#3 lore raw

PATCH 2/3 bonding: use rcu_access_pointer() in bonding_show_mii_status()

In reply to Eric Dumazet

curr_active_slave is rcu protected, and bonding_show_mii_status() only wants to check if pointer is NULL or not.

---
 drivers/net/bonding/bond_sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_sysfs.c +2 -1
index daed52f68ce1..98db8edd9c75 100644
@@ -492,8 +492,9 @@ static ssize_t bonding_show_mii_status(struct device *d,
 				       char *buf)
 {
 	struct bonding *bond = to_bond(d);
+	bool active = !!rcu_access_pointer(bond->curr_active_slave);
 
-	return sprintf(buf, "%s\n", bond->curr_active_slave ? "up" : "down");
+	return sprintf(buf, "%s\n", active ? "up" : "down");
 }
 static DEVICE_ATTR(mii_status, S_IRUGO, bonding_show_mii_status, NULL);
 
Signature · 1 line
2.0.0.526.g5318336
#5 lore raw

PATCH 3/3 bonding: add proper __rcu annotation for curr_active_slave

In reply to Eric Dumazet

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with LOCKDEP support.

---
 drivers/net/bonding/bond_alb.c     | 47 +++++++++++++++++++--------------
 drivers/net/bonding/bond_main.c    | 53 +++++++++++++++++++++-----------------
 drivers/net/bonding/bond_options.c |  2 +-
 drivers/net/bonding/bonding.h      |  6 ++++-
 4 files changed, 63 insertions(+), 45 deletions(-)
drivers/net/bonding/bond_alb.c +28 -19
index 76c0dade233f..de5bd03925b4 100644
@@ -448,11 +448,13 @@ static struct slave *__rlb_next_rx_slave(struct bonding *bond)
  */
 static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[])
 {
-	if (!bond->curr_active_slave)
+	struct slave *curr_active = bond_deref_active_protected(bond);
+
+	if (!curr_active)
 		return;
 
 	if (!bond->alb_info.primary_is_promisc) {
-		if (!dev_set_promiscuity(bond->curr_active_slave->dev, 1))
+		if (!dev_set_promiscuity(curr_active->dev, 1))
 			bond->alb_info.primary_is_promisc = 1;
 		else
 			bond->alb_info.primary_is_promisc = 0;
@@ -460,7 +462,7 @@ static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[])
 
 	bond->alb_info.rlb_promisc_timeout_counter = 0;
 
-	alb_send_learning_packets(bond->curr_active_slave, addr, true);
+	alb_send_learning_packets(curr_active, addr, true);
 }
 
 /* slave being removed should not be active at this point
@@ -509,7 +511,7 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
 
 	write_lock_bh(&bond->curr_slave_lock);
 
-	if (slave != bond->curr_active_slave)
+	if (slave != bond_deref_active_protected(bond))
 		rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr);
 
 	write_unlock_bh(&bond->curr_slave_lock);
@@ -684,7 +686,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
 			 * move the old client to primary (curr_active_slave) so
 			 * that the new client can be assigned to this entry.
 			 */
-			if (bond->curr_active_slave &&
+			if (curr_active_slave &&
 			    client_info->slave != curr_active_slave) {
 				client_info->slave = curr_active_slave;
 				rlb_update_client(client_info);
@@ -1221,7 +1223,7 @@ static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *sla
  */
 static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slave *slave)
 {
-	struct slave *has_bond_addr = bond->curr_active_slave;
+	struct slave *has_bond_addr = rcu_access_pointer(bond->curr_active_slave);
 	struct slave *tmp_slave1, *free_mac_slave = NULL;
 	struct list_head *iter;
 
@@ -1575,7 +1577,7 @@ void bond_alb_monitor(struct work_struct *work)
 			 * use mac of the slave device.
 			 * In RLB mode, we always use strict matches.
 			 */
-			strict_match = (slave != bond->curr_active_slave ||
+			strict_match = (slave != rcu_access_pointer(bond->curr_active_slave) ||
 					bond_info->rlb_enabled);
 			alb_send_learning_packets(slave, slave->dev->dev_addr,
 						  strict_match);
@@ -1593,7 +1595,7 @@ void bond_alb_monitor(struct work_struct *work)
 
 		bond_for_each_slave_rcu(bond, slave, iter) {
 			tlb_clear_slave(bond, slave, 1);
-			if (slave == bond->curr_active_slave) {
+			if (slave == rcu_access_pointer(bond->curr_active_slave)) {
 				SLAVE_TLB_INFO(slave).load =
 					bond_info->unbalanced_load /
 						BOND_TLB_REBALANCE_INTERVAL;
@@ -1625,7 +1627,8 @@ void bond_alb_monitor(struct work_struct *work)
 			 * because a slave was disabled then
 			 * it can now leave promiscuous mode.
 			 */
-			dev_set_promiscuity(bond->curr_active_slave->dev, -1);
+			dev_set_promiscuity(rtnl_dereference(bond->curr_active_slave)->dev,
+					    -1);
 			bond_info->primary_is_promisc = 0;
 
 			rtnl_unlock();
@@ -1742,17 +1745,21 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
 	__acquires(&bond->curr_slave_lock)
 {
 	struct slave *swap_slave;
+	struct slave *curr_active;
 
-	if (bond->curr_active_slave == new_slave)
+	curr_active = rcu_dereference_protected(bond->curr_active_slave,
+						!new_slave ||
+						lockdep_is_held(&bond->curr_slave_lock));
+	if (curr_active == new_slave)
 		return;
 
-	if (bond->curr_active_slave && bond->alb_info.primary_is_promisc) {
-		dev_set_promiscuity(bond->curr_active_slave->dev, -1);
+	if (curr_active && bond->alb_info.primary_is_promisc) {
+		dev_set_promiscuity(curr_active->dev, -1);
 		bond->alb_info.primary_is_promisc = 0;
 		bond->alb_info.rlb_promisc_timeout_counter = 0;
 	}
 
-	swap_slave = bond->curr_active_slave;
+	swap_slave = curr_active;
 	rcu_assign_pointer(bond->curr_active_slave, new_slave);
 
 	if (!new_slave || !bond_has_slaves(bond))
@@ -1818,6 +1825,7 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
 {
 	struct bonding *bond = netdev_priv(bond_dev);
 	struct sockaddr *sa = addr;
+	struct slave *curr_active;
 	struct slave *swap_slave;
 	int res;
 
@@ -1834,23 +1842,24 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
 	 * Otherwise we'll need to pass the new address to it and handle
 	 * duplications.
 	 */
-	if (!bond->curr_active_slave)
+	curr_active = rtnl_dereference(bond->curr_active_slave);
+	if (!curr_active)
 		return 0;
 
 	swap_slave = bond_slave_has_mac(bond, bond_dev->dev_addr);
 
 	if (swap_slave) {
-		alb_swap_mac_addr(swap_slave, bond->curr_active_slave);
-		alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
+		alb_swap_mac_addr(swap_slave, curr_active);
+		alb_fasten_mac_swap(bond, swap_slave, curr_active);
 	} else {
-		alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr);
+		alb_set_slave_mac_addr(curr_active, bond_dev->dev_addr);
 
 		read_lock(&bond->lock);
-		alb_send_learning_packets(bond->curr_active_slave,
+		alb_send_learning_packets(curr_active,
 					  bond_dev->dev_addr, false);
 		if (bond->alb_info.rlb_enabled) {
 			/* inform clients mac address has changed */
-			rlb_req_update_slave_clients(bond, bond->curr_active_slave);
+			rlb_req_update_slave_clients(bond, curr_active);
 		}
 		read_unlock(&bond->lock);
 	}
drivers/net/bonding/bond_main.c +29 -24

151 lines not on this page · raw message

drivers/net/bonding/bond_options.c +1 -1
index b26271fd7b09..f908e65e86c1 100644
@@ -743,7 +743,7 @@ static int bond_option_active_slave_set(struct bonding *bond,
 		RCU_INIT_POINTER(bond->curr_active_slave, NULL);
 		bond_select_active_slave(bond);
 	} else {
-		struct slave *old_active = bond->curr_active_slave;
+		struct slave *old_active = bond_deref_active_protected(bond);
 		struct slave *new_active = bond_slave_get_rtnl(slave_dev);
 
 		BUG_ON(!new_active);
drivers/net/bonding/bonding.h +5 -1
index 713e2a99c661..d03d2ae4d3af 100644
@@ -194,7 +194,7 @@ struct slave {
  */
 struct bonding {
 	struct   net_device *dev; /* first - useful for panic debug */
-	struct   slave *curr_active_slave;
+	struct   slave __rcu *curr_active_slave;
 	struct   slave *current_arp_slave;
 	struct   slave *primary_slave;
 	bool     force_primary;
@@ -232,6 +232,10 @@ struct bonding {
 #define bond_slave_get_rtnl(dev) \
 	((struct slave *) rtnl_dereference(dev->rx_handler_data))
 
+#define bond_deref_active_protected(bond)				   \
+	rcu_dereference_protected(bond->curr_active_slave,		   \
+				  lockdep_is_held(&bond->curr_slave_lock))
+
 struct bond_vlan_tag {
 	__be16		vlan_proto;
 	unsigned short	vlan_id;
Signature · 1 line
2.0.0.526.g5318336
Acked-by on v1 1/3
#2 lore raw

Re: [PATCH net-next 1/3] bonding: get rid of bond_option_active_slave_get()

In reply to Eric Dumazet
Quoted 6 lines · Eric Dumazet

Only keep bond_option_active_slave_get_rcu() helper.

bond_fill_info() uses a new bond_option_active_slave_get_ifindex() helper.

Quoted 78 lines

---

drivers/net/bonding/bond_netlink.c | 21 ++++++++++++++++-----
drivers/net/bonding/bond_options.c |  5 -----
drivers/net/bonding/bonding.h      |  1 -
3 files changed, 16 insertions(+), 11 deletions(-)
drivers/net/bonding/bond_netlink.c +16 -5
index 5ab3c1847e67..4d97e23eb497 100644
@@ -398,20 +398,31 @@ static size_t bond_get_size(const struct net_device *bond_dev)
 		0;
 }
 
+static int bond_option_active_slave_get_ifindex(struct bonding *bond)
+{
+	const struct net_device *slave;
+	int ifindex;
+
+	rcu_read_lock();
+	slave = bond_option_active_slave_get_rcu(bond);
+	ifindex = slave ? slave->ifindex : 0;
+	rcu_read_unlock();
+	return ifindex;
+}
+
 static int bond_fill_info(struct sk_buff *skb,
 			  const struct net_device *bond_dev)
 {
 	struct bonding *bond = netdev_priv(bond_dev);
-	struct net_device *slave_dev = bond_option_active_slave_get(bond);
-	struct nlattr *targets;
 	unsigned int packets_per_slave;
-	int i, targets_added;
+	int ifindex, i, targets_added;
+	struct nlattr *targets;
 
 	if (nla_put_u8(skb, IFLA_BOND_MODE, BOND_MODE(bond)))
 		goto nla_put_failure;
 
-	if (slave_dev &&
-	    nla_put_u32(skb, IFLA_BOND_ACTIVE_SLAVE, slave_dev->ifindex))
+	ifindex = bond_option_active_slave_get_ifindex(bond);
+	if (ifindex && nla_put_u32(skb, IFLA_BOND_ACTIVE_SLAVE, ifindex))
 		goto nla_put_failure;
 
 	if (nla_put_u32(skb, IFLA_BOND_MIIMON, bond->params.miimon))
drivers/net/bonding/bond_options.c +0 -5
index 540e0167bf24..b26271fd7b09 100644
@@ -704,11 +704,6 @@ struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond)
 	return __bond_option_active_slave_get(bond, slave);
 }
 
-struct net_device *bond_option_active_slave_get(struct bonding *bond)
-{
-	return __bond_option_active_slave_get(bond, bond->curr_active_slave);
-}
-
 static int bond_option_active_slave_set(struct bonding *bond,
 					const struct bond_opt_value *newval)
 {
drivers/net/bonding/bonding.h +0 -1
index 0b4d9cde0b05..713e2a99c661 100644
@@ -514,7 +514,6 @@ unsigned int bond_get_num_tx_queues(void);
 int bond_netlink_init(void);
 void bond_netlink_fini(void);
 struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond);
-struct net_device *bond_option_active_slave_get(struct bonding *bond);
 const char *bond_slave_link_status(s8 link);
 bool bond_verify_device_path(struct net_device *start_dev,
 			     struct net_device *end_dev,
Signature · 1 line
2.0.0.526.g5318336
Acked-by on v1 2/3
#4 lore raw

Re: [PATCH net-next 2/3] bonding: use rcu_access_pointer() in bonding_show_mii_status()

In reply to Eric Dumazet
Quoted 4 lines · Eric Dumazet

curr_active_slave is rcu protected, and bonding_show_mii_status() only wants to check if pointer is NULL or not.

Quoted 22 lines

---
drivers/net/bonding/bond_sysfs.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_sysfs.c +2 -1
index daed52f68ce1..98db8edd9c75 100644
@@ -492,8 +492,9 @@ static ssize_t bonding_show_mii_status(struct device *d,
 				       char *buf)
 {
 	struct bonding *bond = to_bond(d);
+	bool active = !!rcu_access_pointer(bond->curr_active_slave);
 
-	return sprintf(buf, "%s\n", bond->curr_active_slave ? "up" : "down");
+	return sprintf(buf, "%s\n", active ? "up" : "down");
 }
 static DEVICE_ATTR(mii_status, S_IRUGO, bonding_show_mii_status, NULL);
 
Signature · 1 line
2.0.0.526.g5318336
#6 lore raw

Re: [PATCH net-next 3/3] bonding: add proper __rcu annotation for curr_active_slave

In reply to Eric Dumazet
Quoted 6 lines · Eric Dumazet

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with LOCKDEP support.

Thanks a lot for cleaning this up, it's really a huge mess here...

One question though:

...snip...

drivers/net/bonding/bond_main.c static void bond_miimon_commit(struct bonding *bond) · line 2054

Quoted 6 lines
drivers/net/bonding/bond_main.c +1 -1
@@ -2046,7 +2051,7 @@ static void bond_miimon_commit(struct bonding *bond)
 				bond_alb_handle_link_change(bond, slave,
 							    BOND_LINK_DOWN);
 
-			if (slave == bond->curr_active_slave)
+			if (slave == rcu_access_pointer(bond->curr_active_slave))

I guess you've meant rtnl_dereference()? As bond_miimon_commit() is ujnder rtnl, not under rcu.

Quoted 3 lines
drivers/net/bonding/bond_main.c +0 -0
 				goto do_failover;
 
 			continue;
#7 lore raw

Re: [PATCH net-next 3/3] bonding: add proper __rcu annotation for curr_active_slave

Quoted 17 lines · Veaceslav Falico
Quoted 6 lines · Eric Dumazet

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with LOCKDEP support.

Thanks a lot for cleaning this up, it's really a huge mess here...

One question though:

...snip...

Quoted 4 lines
drivers/net/bonding/bond_main.c +0 -0
@@ -2046,7 +2051,7 @@ static void bond_miimon_commit(struct bonding *bond)
 				bond_alb_handle_link_change(bond, slave,
 							    BOND_LINK_DOWN);
 
Quoted 5 lines

drivers/net/bonding/bond_main.c static void bond_miimon_commit(struct bonding *bond) · line 2054

Quoted 2 lines
drivers/net/bonding/bond_main.c +1 -1
-			if (slave == bond->curr_active_slave)
+			if (slave == rcu_access_pointer(bond->curr_active_slave))

I guess you've meant rtnl_dereference()? As bond_miimon_commit() is ujnder rtnl, not under rcu.

This does not really matter here, as we only perform an equality test.

(We dont read the pointer, then dereference it)

rcu_access_pointer() is fine in this context, this makes sparse happy mostly.

Reviewed-by on the v1 series
#9 lore raw
In reply to Eric Dumazet
Quoted 12 lines · Eric Dumazet

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with full sparse & LOCKDEP support.

Lets clean the code.

Eric Dumazet (3):
bonding: get rid of bond_option_active_slave_get()
bonding: use rcu_access_pointer() in bonding_show_mii_status()
bonding: add proper __rcu annotation for curr_active_slave

Quoted 8 lines
 drivers/net/bonding/bond_alb.c     | 47 +++++++++++++++++++--------------
 drivers/net/bonding/bond_main.c    | 53 +++++++++++++++++++++-----------------
 drivers/net/bonding/bond_netlink.c | 21 +++++++++++----
 drivers/net/bonding/bond_options.c |  7 +----
 drivers/net/bonding/bond_sysfs.c   |  3 ++-
 drivers/net/bonding/bonding.h      |  7 +++--
 6 files changed, 81 insertions(+), 57 deletions(-)

Nice clean up, I also gave it a quick run. I believe similar clean up would be beneficial for current_arp_slave at some point.

Anyhow, thanks Eric!

For the set

#8 lore raw

Re: [PATCH net-next 3/3] bonding: add proper __rcu annotation for curr_active_slave

In reply to Eric Dumazet
Quoted 24 lines · Eric Dumazet
Quoted 17 lines · Veaceslav Falico
Quoted 6 lines · Eric Dumazet

RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.

Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave are correctly protected, with LOCKDEP support.

Thanks a lot for cleaning this up, it's really a huge mess here...

One question though:

...snip...

Quoted 4 lines
drivers/net/bonding/bond_main.c +0 -0
@@ -2046,7 +2051,7 @@ static void bond_miimon_commit(struct bonding *bond)
 				bond_alb_handle_link_change(bond, slave,
 							    BOND_LINK_DOWN);
 
Quoted 5 lines

drivers/net/bonding/bond_main.c static void bond_miimon_commit(struct bonding *bond) · line 2054

Quoted 2 lines
drivers/net/bonding/bond_main.c +1 -1
-			if (slave == bond->curr_active_slave)
+			if (slave == rcu_access_pointer(bond->curr_active_slave))

I guess you've meant rtnl_dereference()? As bond_miimon_commit() is ujnder rtnl, not under rcu.

Quoted 6 lines

This does not really matter here, as we only perform an equality test.

(We dont read the pointer, then dereference it)

rcu_access_pointer() is fine in this context, this makes sparse happy mostly.

Fair enough.

#10 lore raw
In reply to Nikolay Aleksandrov
Quoted 2 lines · Nikolay Aleksandrov

Nice clean up, I also gave it a quick run. I believe similar clean up would be beneficial for current_arp_slave at some point.

Yes this one should be much easier, I'll send it, thanks.