aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r--drivers/net/bonding/bond_alb.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 00ab51ef3129..40fdc41446cc 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -20,6 +20,8 @@
20 * 20 *
21 */ 21 */
22 22
23#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
24
23#include <linux/skbuff.h> 25#include <linux/skbuff.h>
24#include <linux/netdevice.h> 26#include <linux/netdevice.h>
25#include <linux/etherdevice.h> 27#include <linux/etherdevice.h>
@@ -201,8 +203,7 @@ static int tlb_initialize(struct bonding *bond)
201 203
202 new_hashtbl = kzalloc(size, GFP_KERNEL); 204 new_hashtbl = kzalloc(size, GFP_KERNEL);
203 if (!new_hashtbl) { 205 if (!new_hashtbl) {
204 pr_err(DRV_NAME 206 pr_err("%s: Error: Failed to allocate TLB hash table\n",
205 ": %s: Error: Failed to allocate TLB hash table\n",
206 bond->dev->name); 207 bond->dev->name);
207 return -1; 208 return -1;
208 } 209 }
@@ -514,8 +515,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
514 client_info->slave->dev->dev_addr, 515 client_info->slave->dev->dev_addr,
515 client_info->mac_dst); 516 client_info->mac_dst);
516 if (!skb) { 517 if (!skb) {
517 pr_err(DRV_NAME 518 pr_err("%s: Error: failed to create an ARP packet\n",
518 ": %s: Error: failed to create an ARP packet\n",
519 client_info->slave->dev->master->name); 519 client_info->slave->dev->master->name);
520 continue; 520 continue;
521 } 521 }
@@ -525,8 +525,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
525 if (client_info->tag) { 525 if (client_info->tag) {
526 skb = vlan_put_tag(skb, client_info->vlan_id); 526 skb = vlan_put_tag(skb, client_info->vlan_id);
527 if (!skb) { 527 if (!skb) {
528 pr_err(DRV_NAME 528 pr_err("%s: Error: failed to insert VLAN tag\n",
529 ": %s: Error: failed to insert VLAN tag\n",
530 client_info->slave->dev->master->name); 529 client_info->slave->dev->master->name);
531 continue; 530 continue;
532 } 531 }
@@ -609,9 +608,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
609 client_info = &(bond_info->rx_hashtbl[hash_index]); 608 client_info = &(bond_info->rx_hashtbl[hash_index]);
610 609
611 if (!client_info->slave) { 610 if (!client_info->slave) {
612 pr_err(DRV_NAME 611 pr_err("%s: Error: found a client with no channel in the client's hash table\n",
613 ": %s: Error: found a client with no channel in "
614 "the client's hash table\n",
615 bond->dev->name); 612 bond->dev->name);
616 continue; 613 continue;
617 } 614 }
@@ -806,8 +803,7 @@ static int rlb_initialize(struct bonding *bond)
806 803
807 new_hashtbl = kmalloc(size, GFP_KERNEL); 804 new_hashtbl = kmalloc(size, GFP_KERNEL);
808 if (!new_hashtbl) { 805 if (!new_hashtbl) {
809 pr_err(DRV_NAME 806 pr_err("%s: Error: Failed to allocate RLB hash table\n",
810 ": %s: Error: Failed to allocate RLB hash table\n",
811 bond->dev->name); 807 bond->dev->name);
812 return -1; 808 return -1;
813 } 809 }
@@ -928,8 +924,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
928 924
929 skb = vlan_put_tag(skb, vlan->vlan_id); 925 skb = vlan_put_tag(skb, vlan->vlan_id);
930 if (!skb) { 926 if (!skb) {
931 pr_err(DRV_NAME 927 pr_err("%s: Error: failed to insert VLAN tag\n",
932 ": %s: Error: failed to insert VLAN tag\n",
933 bond->dev->name); 928 bond->dev->name);
934 continue; 929 continue;
935 } 930 }
@@ -958,11 +953,8 @@ static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[], int hw)
958 memcpy(s_addr.sa_data, addr, dev->addr_len); 953 memcpy(s_addr.sa_data, addr, dev->addr_len);
959 s_addr.sa_family = dev->type; 954 s_addr.sa_family = dev->type;
960 if (dev_set_mac_address(dev, &s_addr)) { 955 if (dev_set_mac_address(dev, &s_addr)) {
961 pr_err(DRV_NAME 956 pr_err("%s: Error: dev_set_mac_address of dev %s failed!\n"
962 ": %s: Error: dev_set_mac_address of dev %s failed! ALB " 957 "ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n",
963 "mode requires that the base driver support setting "
964 "the hw address also when the network device's "
965 "interface is open\n",
966 dev->master->name, dev->name); 958 dev->master->name, dev->name);
967 return -EOPNOTSUPP; 959 return -EOPNOTSUPP;
968 } 960 }
@@ -1169,18 +1161,12 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
1169 alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr, 1161 alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr,
1170 bond->alb_info.rlb_enabled); 1162 bond->alb_info.rlb_enabled);
1171 1163
1172 pr_warning(DRV_NAME 1164 pr_warning("%s: Warning: the hw address of slave %s is in use by the bond; giving it the hw address of %s\n",
1173 ": %s: Warning: the hw address of slave %s is "
1174 "in use by the bond; giving it the hw address "
1175 "of %s\n",
1176 bond->dev->name, slave->dev->name, 1165 bond->dev->name, slave->dev->name,
1177 free_mac_slave->dev->name); 1166 free_mac_slave->dev->name);
1178 1167
1179 } else if (has_bond_addr) { 1168 } else if (has_bond_addr) {
1180 pr_err(DRV_NAME 1169 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",
1181 ": %s: Error: the hw address of slave %s is in use by the "
1182 "bond; couldn't find a slave with a free hw address to "
1183 "give it (this should not have happened)\n",
1184 bond->dev->name, slave->dev->name); 1170 bond->dev->name, slave->dev->name);
1185 return -EFAULT; 1171 return -EFAULT;
1186 } 1172 }