Commit 89dd2e75 authored by David S. Miller's avatar David S. Miller

Merge branch 'bonding-bug-fixes-and-regressions'

Debabrata Banerjee says:

====================
bonding: bug fixes and regressions

Fixes to bonding driver for balance-alb mode, suitable for stable.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ca3943c4 21706ee8
...@@ -450,7 +450,7 @@ static void rlb_update_client(struct rlb_client_info *client_info) ...@@ -450,7 +450,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
{ {
int i; int i;
if (!client_info->slave) if (!client_info->slave || !is_valid_ether_addr(client_info->mac_dst))
return; return;
for (i = 0; i < RLB_ARP_BURST_SIZE; i++) { for (i = 0; i < RLB_ARP_BURST_SIZE; i++) {
...@@ -943,6 +943,10 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[], ...@@ -943,6 +943,10 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
skb->priority = TC_PRIO_CONTROL; skb->priority = TC_PRIO_CONTROL;
skb->dev = slave->dev; skb->dev = slave->dev;
netdev_dbg(slave->bond->dev,
"Send learning packet: dev %s mac %pM vlan %d\n",
slave->dev->name, mac_addr, vid);
if (vid) if (vid)
__vlan_hwaccel_put_tag(skb, vlan_proto, vid); __vlan_hwaccel_put_tag(skb, vlan_proto, vid);
...@@ -965,14 +969,13 @@ static int alb_upper_dev_walk(struct net_device *upper, void *_data) ...@@ -965,14 +969,13 @@ static int alb_upper_dev_walk(struct net_device *upper, void *_data)
u8 *mac_addr = data->mac_addr; u8 *mac_addr = data->mac_addr;
struct bond_vlan_tag *tags; struct bond_vlan_tag *tags;
if (is_vlan_dev(upper) && vlan_get_encap_level(upper) == 0) { if (is_vlan_dev(upper) &&
if (strict_match && bond->nest_level == vlan_get_encap_level(upper) - 1) {
ether_addr_equal_64bits(mac_addr, if (upper->addr_assign_type == NET_ADDR_STOLEN) {
upper->dev_addr)) {
alb_send_lp_vid(slave, mac_addr, alb_send_lp_vid(slave, mac_addr,
vlan_dev_vlan_proto(upper), vlan_dev_vlan_proto(upper),
vlan_dev_vlan_id(upper)); vlan_dev_vlan_id(upper));
} else if (!strict_match) { } else {
alb_send_lp_vid(slave, upper->dev_addr, alb_send_lp_vid(slave, upper->dev_addr,
vlan_dev_vlan_proto(upper), vlan_dev_vlan_proto(upper),
vlan_dev_vlan_id(upper)); vlan_dev_vlan_id(upper));
......
...@@ -1738,6 +1738,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev, ...@@ -1738,6 +1738,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
if (bond_mode_uses_xmit_hash(bond)) if (bond_mode_uses_xmit_hash(bond))
bond_update_slave_arr(bond, NULL); bond_update_slave_arr(bond, NULL);
bond->nest_level = dev_get_nest_level(bond_dev);
netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n", netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n",
slave_dev->name, slave_dev->name,
bond_is_active_slave(new_slave) ? "an active" : "a backup", bond_is_active_slave(new_slave) ? "an active" : "a backup",
......
...@@ -198,6 +198,7 @@ struct bonding { ...@@ -198,6 +198,7 @@ struct bonding {
struct slave __rcu *primary_slave; struct slave __rcu *primary_slave;
struct bond_up_slave __rcu *slave_arr; /* Array of usable slaves */ struct bond_up_slave __rcu *slave_arr; /* Array of usable slaves */
bool force_primary; bool force_primary;
u32 nest_level;
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
int (*recv_probe)(const struct sk_buff *, struct bonding *, int (*recv_probe)(const struct sk_buff *, struct bonding *,
struct slave *); struct slave *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment