Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a575f6b authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'bonding-next'



Veaceslav Falico says:

====================
bonding: convert pr_* to netdev_*

Currently bonding uses pr_info/warn/etc. function to print something, while
it's encouraged to use netdev_info/warn/etc. in net/.

This patchset converts them where possible (i.e. where we have a working
net_device). Also, convert pr_ratelimit* to net_() and remove the pr_fmt,
to unify netdev_* and pr_* outputs.
====================

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a84bc2a9 cb252358
Loading
Loading
Loading
Loading
+88 −97
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>
@@ -301,7 +299,7 @@ static u16 __get_link_speed(struct port *port)
		}
	}

	pr_debug("Port %d Received link speed %d update from adapter\n",
	netdev_dbg(slave->bond->dev, "Port %d Received link speed %d update from adapter\n",
		   port->actor_port_number, speed);
	return speed;
}
@@ -329,13 +327,13 @@ static u8 __get_duplex(struct port *port)
		switch (slave->duplex) {
		case DUPLEX_FULL:
			retval = 0x1;
			pr_debug("Port %d Received status full duplex update from adapter\n",
			netdev_dbg(slave->bond->dev, "Port %d Received status full duplex update from adapter\n",
				   port->actor_port_number);
			break;
		case DUPLEX_HALF:
		default:
			retval = 0x0;
			pr_debug("Port %d Received status NOT full duplex update from adapter\n",
			netdev_dbg(slave->bond->dev, "Port %d Received status NOT full duplex update from adapter\n",
				   port->actor_port_number);
			break;
		}
@@ -1079,9 +1077,8 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
			/* detect loopback situation */
			if (MAC_ADDRESS_EQUAL(&(lacpdu->actor_system),
					      &(port->actor_system))) {
				pr_err("%s: An illegal loopback occurred on adapter (%s)\n"
				netdev_err(port->slave->bond->dev, "An illegal loopback occurred on adapter (%s)\n"
				       "Check the configuration to verify that all adapters are connected to 802.3ad compliant switch ports\n",
				       port->slave->bond->dev->name,
				       port->slave->dev->name);
				return;
			}
@@ -1269,7 +1266,7 @@ static void ad_port_selection_logic(struct port *port)
				port->next_port_in_aggregator = NULL;
				port->actor_port_aggregator_identifier = 0;

				pr_debug("Port %d left LAG %d\n",
				netdev_dbg(bond->dev, "Port %d left LAG %d\n",
					   port->actor_port_number,
					   temp_aggregator->aggregator_identifier);
				/* if the aggregator is empty, clear its
@@ -1284,7 +1281,7 @@ static void ad_port_selection_logic(struct port *port)
			/* meaning: the port was related to an aggregator
			 * but was not on the aggregator port list
			 */
			pr_warn_ratelimited("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n",
			net_warn_ratelimited("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n",
					     port->slave->bond->dev->name,
					     port->actor_port_number,
					     port->slave->dev->name,
@@ -1318,7 +1315,7 @@ static void ad_port_selection_logic(struct port *port)
			port->next_port_in_aggregator = aggregator->lag_ports;
			port->aggregator->num_of_ports++;
			aggregator->lag_ports = port;
			pr_debug("Port %d joined LAG %d(existing LAG)\n",
			netdev_dbg(bond->dev, "Port %d joined LAG %d(existing LAG)\n",
				   port->actor_port_number,
				   port->aggregator->aggregator_identifier);

@@ -1363,12 +1360,11 @@ static void ad_port_selection_logic(struct port *port)
			/* mark this port as selected */
			port->sm_vars |= AD_PORT_SELECTED;

			pr_debug("Port %d joined LAG %d(new LAG)\n",
			netdev_dbg(bond->dev, "Port %d joined LAG %d(new LAG)\n",
				   port->actor_port_number,
				   port->aggregator->aggregator_identifier);
		} else {
			pr_err("%s: Port %d (on %s) did not find a suitable aggregator\n",
			       port->slave->bond->dev->name,
			netdev_err(bond->dev, "Port %d (on %s) did not find a suitable aggregator\n",
			       port->actor_port_number, port->slave->dev->name);
		}
	}
@@ -1445,7 +1441,7 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,
		break;

	default:
		pr_warn_ratelimited("%s: Impossible agg select mode %d\n",
		net_warn_ratelimited("%s: Impossible agg select mode %d\n",
				     curr->slave->bond->dev->name,
				     __get_agg_selection_mode(curr->lag_ports));
		break;
@@ -1539,19 +1535,19 @@ static void ad_agg_selection_logic(struct aggregator *agg)

	/* if there is new best aggregator, activate it */
	if (best) {
		pr_debug("best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
		netdev_dbg(bond->dev, "best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
			   best->aggregator_identifier, best->num_of_ports,
			   best->actor_oper_aggregator_key,
			   best->partner_oper_aggregator_key,
			   best->is_individual, best->is_active);
		pr_debug("best ports %p slave %p %s\n",
		netdev_dbg(bond->dev, "best ports %p slave %p %s\n",
			   best->lag_ports, best->slave,
			   best->slave ? best->slave->dev->name : "NULL");

		bond_for_each_slave_rcu(bond, slave, iter) {
			agg = &(SLAVE_AD_INFO(slave)->aggregator);

			pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
			netdev_dbg(bond->dev, "Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
				   agg->aggregator_identifier, agg->num_of_ports,
				   agg->actor_oper_aggregator_key,
				   agg->partner_oper_aggregator_key,
@@ -1560,15 +1556,15 @@ static void ad_agg_selection_logic(struct aggregator *agg)

		/* check if any partner replys */
		if (best->is_individual) {
			pr_warn_ratelimited("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
			net_warn_ratelimited("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
					     best->slave ?
					     best->slave->bond->dev->name : "NULL");
		}

		best->is_active = 1;
		pr_debug("LAG %d chosen as the active LAG\n",
		netdev_dbg(bond->dev, "LAG %d chosen as the active LAG\n",
			   best->aggregator_identifier);
		pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
		netdev_dbg(bond->dev, "Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
			   best->aggregator_identifier, best->num_of_ports,
			   best->actor_oper_aggregator_key,
			   best->partner_oper_aggregator_key,
@@ -1908,12 +1904,12 @@ void bond_3ad_unbind_slave(struct slave *slave)

	/* if slave is null, the whole port is not initialized */
	if (!port->slave) {
		pr_warn("Warning: %s: Trying to unbind an uninitialized port on %s\n",
			slave->bond->dev->name, slave->dev->name);
		netdev_warn(bond->dev, "Trying to unbind an uninitialized port on %s\n",
			    slave->dev->name);
		return;
	}

	pr_debug("Unbinding Link Aggregation Group %d\n",
	netdev_dbg(bond->dev, "Unbinding Link Aggregation Group %d\n",
		   aggregator->aggregator_identifier);

	/* Tell the partner that this port is not suitable for aggregation */
@@ -1949,14 +1945,13 @@ void bond_3ad_unbind_slave(struct slave *slave)
			 * new aggregator
			 */
			if ((new_aggregator) && ((!new_aggregator->lag_ports) || ((new_aggregator->lag_ports == port) && !new_aggregator->lag_ports->next_port_in_aggregator))) {
				pr_debug("Some port(s) related to LAG %d - replacing with LAG %d\n",
				netdev_dbg(bond->dev, "Some port(s) related to LAG %d - replacing with LAG %d\n",
					   aggregator->aggregator_identifier,
					   new_aggregator->aggregator_identifier);

				if ((new_aggregator->lag_ports == port) &&
				    new_aggregator->is_active) {
					pr_info("%s: Removing an active aggregator\n",
						aggregator->slave->bond->dev->name);
					netdev_info(bond->dev, "Removing an active aggregator\n");
					 select_new_active_agg = 1;
				}

@@ -1986,8 +1981,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
				if (select_new_active_agg)
					ad_agg_selection_logic(__get_first_agg(port));
			} else {
				pr_warn("%s: Warning: unbinding aggregator, and could not find a new aggregator for its ports\n",
					slave->bond->dev->name);
				netdev_warn(bond->dev, "unbinding aggregator, and could not find a new aggregator for its ports\n");
			}
		} else {
			/* in case that the only port related to this
@@ -1996,8 +1990,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
			select_new_active_agg = aggregator->is_active;
			ad_clear_agg(aggregator);
			if (select_new_active_agg) {
				pr_info("%s: Removing an active aggregator\n",
					slave->bond->dev->name);
				netdev_info(bond->dev, "Removing an active aggregator\n");
				/* select new active aggregator */
				temp_aggregator = __get_first_agg(port);
				if (temp_aggregator)
@@ -2006,7 +1999,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
		}
	}

	pr_debug("Unbinding port %d\n", port->actor_port_number);
	netdev_dbg(bond->dev, "Unbinding port %d\n", port->actor_port_number);

	/* find the aggregator that this port is connected to */
	bond_for_each_slave(bond, slave_iter, iter) {
@@ -2029,8 +2022,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
					select_new_active_agg = temp_aggregator->is_active;
					ad_clear_agg(temp_aggregator);
					if (select_new_active_agg) {
						pr_info("%s: Removing an active aggregator\n",
							slave->bond->dev->name);
						netdev_info(bond->dev, "Removing an active aggregator\n");
						/* select new active aggregator */
						ad_agg_selection_logic(__get_first_agg(port));
					}
@@ -2081,7 +2073,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
		/* select the active aggregator for the bond */
		if (port) {
			if (!port->slave) {
				pr_warn_ratelimited("%s: Warning: bond's first port is uninitialized\n",
				net_warn_ratelimited("%s: Warning: bond's first port is uninitialized\n",
						     bond->dev->name);
				goto re_arm;
			}
@@ -2096,7 +2088,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
	bond_for_each_slave_rcu(bond, slave, iter) {
		port = &(SLAVE_AD_INFO(slave)->port);
		if (!port->slave) {
			pr_warn_ratelimited("%s: Warning: Found an uninitialized port\n",
			net_warn_ratelimited("%s: Warning: Found an uninitialized port\n",
					    bond->dev->name);
			goto re_arm;
		}
@@ -2158,7 +2150,7 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,
		port = &(SLAVE_AD_INFO(slave)->port);

		if (!port->slave) {
			pr_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n",
			net_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n",
					     slave->dev->name, slave->bond->dev->name);
			return ret;
		}
@@ -2166,7 +2158,7 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,
		switch (lacpdu->subtype) {
		case AD_TYPE_LACPDU:
			ret = RX_HANDLER_CONSUMED;
			pr_debug("Received LACPDU on port %d\n",
			netdev_dbg(slave->bond->dev, "Received LACPDU on port %d\n",
				   port->actor_port_number);
			/* Protect against concurrent state machines */
			__get_state_machine_lock(port);
@@ -2182,19 +2174,19 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,

			switch (((struct bond_marker *)lacpdu)->tlv_type) {
			case AD_MARKER_INFORMATION_SUBTYPE:
				pr_debug("Received Marker Information on port %d\n",
				netdev_dbg(slave->bond->dev, "Received Marker Information on port %d\n",
					   port->actor_port_number);
				ad_marker_info_received((struct bond_marker *)lacpdu, port);
				break;

			case AD_MARKER_RESPONSE_SUBTYPE:
				pr_debug("Received Marker Response on port %d\n",
				netdev_dbg(slave->bond->dev, "Received Marker Response on port %d\n",
					   port->actor_port_number);
				ad_marker_response_received((struct bond_marker *)lacpdu, port);
				break;

			default:
				pr_debug("Received an unknown Marker subtype on slot %d\n",
				netdev_dbg(slave->bond->dev, "Received an unknown Marker subtype on slot %d\n",
					   port->actor_port_number);
			}
		}
@@ -2216,8 +2208,8 @@ void bond_3ad_adapter_speed_changed(struct slave *slave)

	/* if slave is null, the whole port is not initialized */
	if (!port->slave) {
		pr_warn("Warning: %s: speed changed for uninitialized port on %s\n",
			slave->bond->dev->name, slave->dev->name);
		netdev_warn(slave->bond->dev, "speed changed for uninitialized port on %s\n",
			    slave->dev->name);
		return;
	}

@@ -2226,7 +2218,7 @@ void bond_3ad_adapter_speed_changed(struct slave *slave)
	port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS;
	port->actor_oper_port_key = port->actor_admin_port_key |=
		(__get_link_speed(port) << 1);
	pr_debug("Port %d changed speed\n", port->actor_port_number);
	netdev_dbg(slave->bond->dev, "Port %d changed speed\n", port->actor_port_number);
	/* there is no need to reselect a new aggregator, just signal the
	 * state machines to reinitialize
	 */
@@ -2249,8 +2241,8 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave)

	/* if slave is null, the whole port is not initialized */
	if (!port->slave) {
		pr_warn("%s: Warning: duplex changed for uninitialized port on %s\n",
			slave->bond->dev->name, slave->dev->name);
		netdev_warn(slave->bond->dev, "duplex changed for uninitialized port on %s\n",
			    slave->dev->name);
		return;
	}

@@ -2259,7 +2251,7 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave)
	port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS;
	port->actor_oper_port_key = port->actor_admin_port_key |=
		__get_duplex(port);
	pr_debug("Port %d changed duplex\n", port->actor_port_number);
	netdev_dbg(slave->bond->dev, "Port %d changed duplex\n", port->actor_port_number);
	/* there is no need to reselect a new aggregator, just signal the
	 * state machines to reinitialize
	 */
@@ -2283,8 +2275,8 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)

	/* if slave is null, the whole port is not initialized */
	if (!port->slave) {
		pr_warn("Warning: %s: link status changed for uninitialized port on %s\n",
			slave->bond->dev->name, slave->dev->name);
		netdev_warn(slave->bond->dev, "link status changed for uninitialized port on %s\n",
			    slave->dev->name);
		return;
	}

@@ -2311,7 +2303,7 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)
		port->actor_oper_port_key = (port->actor_admin_port_key &=
					     ~AD_SPEED_KEY_BITS);
	}
	pr_debug("Port %d changed link status to %s\n",
	netdev_dbg(slave->bond->dev, "Port %d changed link status to %s\n",
		   port->actor_port_number,
		   link == BOND_LINK_UP ? "UP" : "DOWN");
	/* there is no need to reselect a new aggregator, just signal the
@@ -2427,8 +2419,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
	int agg_id;

	if (__bond_3ad_get_active_agg_info(bond, &ad_info)) {
		pr_debug("%s: Error: __bond_3ad_get_active_agg_info failed\n",
			 dev->name);
		netdev_dbg(dev, "__bond_3ad_get_active_agg_info failed\n");
		goto err_free;
	}

@@ -2436,7 +2427,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
	agg_id = ad_info.aggregator_id;

	if (slaves_in_agg == 0) {
		pr_debug("%s: Error: active aggregator is empty\n", dev->name);
		netdev_dbg(dev, "active aggregator is empty\n");
		goto err_free;
	}

@@ -2462,8 +2453,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
	}

	if (slave_agg_no >= 0) {
		pr_err("%s: Error: Couldn't find a slave to tx on for aggregator ID %d\n",
		       dev->name, agg_id);
		netdev_err(dev, "Couldn't find a slave to tx on for aggregator ID %d\n",
			   agg_id);
		goto err_free;
	}

+15 −21
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@
 *
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
@@ -369,7 +367,7 @@ static int rlb_arp_recv(const struct sk_buff *skb, struct bonding *bond,
	if (arp->op_code == htons(ARPOP_REPLY)) {
		/* update rx hash table for this ARP */
		rlb_update_entry_from_arp(bond, arp);
		pr_debug("Server received an ARP Reply from client\n");
		netdev_dbg(bond->dev, "Server received an ARP Reply from client\n");
	}
out:
	return RX_HANDLER_ANOTHER;
@@ -535,8 +533,8 @@ static void rlb_update_client(struct rlb_client_info *client_info)
				 client_info->slave->dev->dev_addr,
				 client_info->mac_dst);
		if (!skb) {
			pr_err("%s: Error: failed to create an ARP packet\n",
			       client_info->slave->bond->dev->name);
			netdev_err(client_info->slave->bond->dev,
				   "failed to create an ARP packet\n");
			continue;
		}

@@ -545,8 +543,8 @@ static void rlb_update_client(struct rlb_client_info *client_info)
		if (client_info->vlan_id) {
			skb = vlan_put_tag(skb, htons(ETH_P_8021Q), client_info->vlan_id);
			if (!skb) {
				pr_err("%s: Error: failed to insert VLAN tag\n",
				       client_info->slave->bond->dev->name);
				netdev_err(client_info->slave->bond->dev,
					   "failed to insert VLAN tag\n");
				continue;
			}
		}
@@ -630,8 +628,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
		client_info = &(bond_info->rx_hashtbl[hash_index]);

		if (!client_info->slave) {
			pr_err("%s: Error: found a client with no channel in the client's hash table\n",
			       bond->dev->name);
			netdev_err(bond->dev, "found a client with no channel in the client's hash table\n");
			continue;
		}
		/*update all clients using this src_ip, that are not assigned
@@ -767,7 +764,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
		tx_slave = rlb_choose_channel(skb, bond);
		if (tx_slave)
			ether_addr_copy(arp->mac_src, tx_slave->dev->dev_addr);
		pr_debug("Server sent ARP Reply packet\n");
		netdev_dbg(bond->dev, "Server sent ARP Reply packet\n");
	} else if (arp->op_code == htons(ARPOP_REQUEST)) {
		/* Create an entry in the rx_hashtbl for this client as a
		 * place holder.
@@ -787,7 +784,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
		 * updated with their assigned mac.
		 */
		rlb_req_update_subnet_clients(bond, arp->ip_src);
		pr_debug("Server sent ARP Request packet\n");
		netdev_dbg(bond->dev, "Server sent ARP Request packet\n");
	}

	return tx_slave;
@@ -1026,8 +1023,7 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
	if (vid) {
		skb = vlan_put_tag(skb, vlan_proto, vid);
		if (!skb) {
			pr_err("%s: Error: failed to insert VLAN tag\n",
			       slave->bond->dev->name);
			netdev_err(slave->bond->dev, "failed to insert VLAN tag\n");
			return;
		}
	}
@@ -1093,9 +1089,8 @@ static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[])
	memcpy(s_addr.sa_data, addr, dev->addr_len);
	s_addr.sa_family = dev->type;
	if (dev_set_mac_address(dev, &s_addr)) {
		pr_err("%s: Error: dev_set_mac_address of dev %s failed!\n"
		       "ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n",
		       slave->bond->dev->name, dev->name);
		netdev_err(slave->bond->dev, "dev_set_mac_address of dev %s failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n",
			   dev->name);
		return -EOPNOTSUPP;
	}
	return 0;
@@ -1269,13 +1264,12 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
	if (free_mac_slave) {
		alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr);

		pr_warn("%s: Warning: the hw address of slave %s is in use by the bond; giving it the hw address of %s\n",
			bond->dev->name, slave->dev->name,
			free_mac_slave->dev->name);
		netdev_warn(bond->dev, "the hw address of slave %s is in use by the bond; giving it the hw address of %s\n",
			    slave->dev->name, free_mac_slave->dev->name);

	} else if (has_bond_addr) {
		pr_err("%s: Error: the hw address of slave %s is in use by the bond; couldn't find a slave with a free hw address to give it (this should not have happened)\n",
		       bond->dev->name, slave->dev->name);
		netdev_err(bond->dev, "the hw address of slave %s is in use by the bond; couldn't find a slave with a free hw address to give it (this should not have happened)\n",
			   slave->dev->name);
		return -EFAULT;
	}

+2 −4
Original line number Diff line number Diff line
@@ -69,8 +69,7 @@ void bond_debug_register(struct bonding *bond)
		debugfs_create_dir(bond->dev->name, bonding_debug_root);

	if (!bond->debug_dir) {
		pr_warn("%s: Warning: failed to register to debugfs\n",
			bond->dev->name);
		netdev_warn(bond->dev, "failed to register to debugfs\n");
		return;
	}

@@ -98,8 +97,7 @@ void bond_debug_reregister(struct bonding *bond)
	if (d) {
		bond->debug_dir = d;
	} else {
		pr_warn("%s: Warning: failed to reregister, so just unregister old one\n",
			bond->dev->name);
		netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n");
		bond_debug_unregister(bond);
	}
}
+162 −182

File changed.

Preview size limit exceeded, changes collapsed.

+3 −8
Original line number Diff line number Diff line
@@ -9,8 +9,6 @@
 * (at your option) any later version.
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
@@ -181,8 +179,7 @@ static int bond_changelink(struct net_device *bond_dev,
		int arp_interval = nla_get_u32(data[IFLA_BOND_ARP_INTERVAL]);

		if (arp_interval && miimon) {
			pr_err("%s: ARP monitoring cannot be used with MII monitoring\n",
			       bond->dev->name);
			netdev_err(bond->dev, "ARP monitoring cannot be used with MII monitoring\n");
			return -EINVAL;
		}

@@ -207,8 +204,7 @@ static int bond_changelink(struct net_device *bond_dev,
			i++;
		}
		if (i == 0 && bond->params.arp_interval)
			pr_warn("%s: Removing last arp target with arp_interval on\n",
				bond->dev->name);
			netdev_warn(bond->dev, "Removing last arp target with arp_interval on\n");
		if (err)
			return err;
	}
@@ -216,8 +212,7 @@ static int bond_changelink(struct net_device *bond_dev,
		int arp_validate = nla_get_u32(data[IFLA_BOND_ARP_VALIDATE]);

		if (arp_validate && miimon) {
			pr_err("%s: ARP validating cannot be used with MII monitoring\n",
			       bond->dev->name);
			netdev_err(bond->dev, "ARP validating cannot be used with MII monitoring\n");
			return -EINVAL;
		}

Loading