diff options
author | Jasper Spaans <spaans@fox-it.com> | 2009-10-23 00:09:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-27 04:05:13 -0400 |
commit | a361c83cb4d7c8fe013d82a2f124175a7f276f30 (patch) | |
tree | 685e6e1374bf8bca7bb742c025c13cedadfb537e /drivers | |
parent | cfadf853f6cd9689f79a63ca960c6f9d6665314f (diff) |
bonding: Remove bond_dev from xmit_hash_policy call.
Now that the bonding device is no longer used in determining the device to
which to send packets, it can be dropped from the argument list of the various
xmit_hash_policy calls.
Signed-off-by: Jasper Spaans <spaans@fox-it.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 11 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 3 |
3 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index c3fa31c9f2a7..3cd8153b906c 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1956,7 +1956,7 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
1956 | struct port *port, *prev_port, *temp_port; | 1956 | struct port *port, *prev_port, *temp_port; |
1957 | struct aggregator *aggregator, *new_aggregator, *temp_aggregator; | 1957 | struct aggregator *aggregator, *new_aggregator, *temp_aggregator; |
1958 | int select_new_active_agg = 0; | 1958 | int select_new_active_agg = 0; |
1959 | 1959 | ||
1960 | // find the aggregator related to this slave | 1960 | // find the aggregator related to this slave |
1961 | aggregator = &(SLAVE_AD_INFO(slave).aggregator); | 1961 | aggregator = &(SLAVE_AD_INFO(slave).aggregator); |
1962 | 1962 | ||
@@ -2024,7 +2024,7 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2024 | 2024 | ||
2025 | // clear the aggregator | 2025 | // clear the aggregator |
2026 | ad_clear_agg(aggregator); | 2026 | ad_clear_agg(aggregator); |
2027 | 2027 | ||
2028 | if (select_new_active_agg) { | 2028 | if (select_new_active_agg) { |
2029 | ad_agg_selection_logic(__get_first_agg(port)); | 2029 | ad_agg_selection_logic(__get_first_agg(port)); |
2030 | } | 2030 | } |
@@ -2075,7 +2075,7 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2075 | } | 2075 | } |
2076 | } | 2076 | } |
2077 | } | 2077 | } |
2078 | port->slave=NULL; | 2078 | port->slave=NULL; |
2079 | } | 2079 | } |
2080 | 2080 | ||
2081 | /** | 2081 | /** |
@@ -2301,7 +2301,7 @@ void bond_3ad_handle_link_change(struct slave *slave, char link) | |||
2301 | } | 2301 | } |
2302 | 2302 | ||
2303 | /* | 2303 | /* |
2304 | * set link state for bonding master: if we have an active | 2304 | * set link state for bonding master: if we have an active |
2305 | * aggregator, we're up, if not, we're down. Presumes that we cannot | 2305 | * aggregator, we're up, if not, we're down. Presumes that we cannot |
2306 | * have an active aggregator if there are no slaves with link up. | 2306 | * have an active aggregator if there are no slaves with link up. |
2307 | * | 2307 | * |
@@ -2395,7 +2395,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2395 | goto out; | 2395 | goto out; |
2396 | } | 2396 | } |
2397 | 2397 | ||
2398 | slave_agg_no = bond->xmit_hash_policy(skb, dev, slaves_in_agg); | 2398 | slave_agg_no = bond->xmit_hash_policy(skb, slaves_in_agg); |
2399 | 2399 | ||
2400 | bond_for_each_slave(bond, slave, i) { | 2400 | bond_for_each_slave(bond, slave, i) { |
2401 | struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator; | 2401 | struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator; |
@@ -2468,4 +2468,3 @@ out: | |||
2468 | 2468 | ||
2469 | return ret; | 2469 | return ret; |
2470 | } | 2470 | } |
2471 | |||
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3adbeed2c057..8c5ebfb0680f 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3696,8 +3696,7 @@ void bond_unregister_arp(struct bonding *bond) | |||
3696 | * Hash for the output device based upon layer 2 and layer 3 data. If | 3696 | * Hash for the output device based upon layer 2 and layer 3 data. If |
3697 | * the packet is not IP mimic bond_xmit_hash_policy_l2() | 3697 | * the packet is not IP mimic bond_xmit_hash_policy_l2() |
3698 | */ | 3698 | */ |
3699 | static int bond_xmit_hash_policy_l23(struct sk_buff *skb, | 3699 | static int bond_xmit_hash_policy_l23(struct sk_buff *skb, int count) |
3700 | struct net_device *bond_dev, int count) | ||
3701 | { | 3700 | { |
3702 | struct ethhdr *data = (struct ethhdr *)skb->data; | 3701 | struct ethhdr *data = (struct ethhdr *)skb->data; |
3703 | struct iphdr *iph = ip_hdr(skb); | 3702 | struct iphdr *iph = ip_hdr(skb); |
@@ -3715,8 +3714,7 @@ static int bond_xmit_hash_policy_l23(struct sk_buff *skb, | |||
3715 | * the packet is a frag or not TCP or UDP, just use layer 3 data. If it is | 3714 | * the packet is a frag or not TCP or UDP, just use layer 3 data. If it is |
3716 | * altogether not IP, mimic bond_xmit_hash_policy_l2() | 3715 | * altogether not IP, mimic bond_xmit_hash_policy_l2() |
3717 | */ | 3716 | */ |
3718 | static int bond_xmit_hash_policy_l34(struct sk_buff *skb, | 3717 | static int bond_xmit_hash_policy_l34(struct sk_buff *skb, int count) |
3719 | struct net_device *bond_dev, int count) | ||
3720 | { | 3718 | { |
3721 | struct ethhdr *data = (struct ethhdr *)skb->data; | 3719 | struct ethhdr *data = (struct ethhdr *)skb->data; |
3722 | struct iphdr *iph = ip_hdr(skb); | 3720 | struct iphdr *iph = ip_hdr(skb); |
@@ -3740,8 +3738,7 @@ static int bond_xmit_hash_policy_l34(struct sk_buff *skb, | |||
3740 | /* | 3738 | /* |
3741 | * Hash for the output device based upon layer 2 data | 3739 | * Hash for the output device based upon layer 2 data |
3742 | */ | 3740 | */ |
3743 | static int bond_xmit_hash_policy_l2(struct sk_buff *skb, | 3741 | static int bond_xmit_hash_policy_l2(struct sk_buff *skb, int count) |
3744 | struct net_device *bond_dev, int count) | ||
3745 | { | 3742 | { |
3746 | struct ethhdr *data = (struct ethhdr *)skb->data; | 3743 | struct ethhdr *data = (struct ethhdr *)skb->data; |
3747 | 3744 | ||
@@ -4334,7 +4331,7 @@ static int bond_xmit_xor(struct sk_buff *skb, struct net_device *bond_dev) | |||
4334 | if (!BOND_IS_OK(bond)) | 4331 | if (!BOND_IS_OK(bond)) |
4335 | goto out; | 4332 | goto out; |
4336 | 4333 | ||
4337 | slave_no = bond->xmit_hash_policy(skb, bond_dev, bond->slave_cnt); | 4334 | slave_no = bond->xmit_hash_policy(skb, bond->slave_cnt); |
4338 | 4335 | ||
4339 | bond_for_each_slave(bond, slave, i) { | 4336 | bond_for_each_slave(bond, slave, i) { |
4340 | slave_no--; | 4337 | slave_no--; |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 9c03c2ee074d..9b520b05fbac 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -206,7 +206,7 @@ struct bonding { | |||
206 | #endif /* CONFIG_PROC_FS */ | 206 | #endif /* CONFIG_PROC_FS */ |
207 | struct list_head bond_list; | 207 | struct list_head bond_list; |
208 | struct dev_mc_list *mc_list; | 208 | struct dev_mc_list *mc_list; |
209 | int (*xmit_hash_policy)(struct sk_buff *, struct net_device *, int); | 209 | int (*xmit_hash_policy)(struct sk_buff *, int); |
210 | __be32 master_ip; | 210 | __be32 master_ip; |
211 | u16 flags; | 211 | u16 flags; |
212 | u16 rr_tx_counter; | 212 | u16 rr_tx_counter; |
@@ -377,4 +377,3 @@ static inline void bond_unregister_ipv6_notifier(void) | |||
377 | #endif | 377 | #endif |
378 | 378 | ||
379 | #endif /* _LINUX_BONDING_H */ | 379 | #endif /* _LINUX_BONDING_H */ |
380 | |||