diff options
author | David S. Miller <davem@davemloft.net> | 2005-08-09 22:34:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:32:25 -0400 |
commit | f2ccd8fa06c8e302116e71df372f5c1f83432e03 (patch) | |
tree | 6e933f4bdc8899009edb33642b908779f123fb4a /drivers/net/bonding | |
parent | b6b99eb5409d75ae35390057cd28f3aedfbd4cf4 (diff) |
[NET]: Kill skb->real_dev
Bonding just wants the device before the skb_bond()
decapsulation occurs, so simply pass that original
device into packet_type->func() as an argument.
It remains to be seen whether we can use this same
exact thing to get rid of skb->input_dev as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 | ||||
-rw-r--r-- | drivers/net/bonding/bond_3ad.h | 2 | ||||
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 5 |
3 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index a2e8dda5afac..d2f34d5a8083 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2419,22 +2419,19 @@ out: | |||
2419 | return 0; | 2419 | return 0; |
2420 | } | 2420 | } |
2421 | 2421 | ||
2422 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype) | 2422 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev) |
2423 | { | 2423 | { |
2424 | struct bonding *bond = dev->priv; | 2424 | struct bonding *bond = dev->priv; |
2425 | struct slave *slave = NULL; | 2425 | struct slave *slave = NULL; |
2426 | int ret = NET_RX_DROP; | 2426 | int ret = NET_RX_DROP; |
2427 | 2427 | ||
2428 | if (!(dev->flags & IFF_MASTER)) { | 2428 | if (!(dev->flags & IFF_MASTER)) |
2429 | goto out; | 2429 | goto out; |
2430 | } | ||
2431 | 2430 | ||
2432 | read_lock(&bond->lock); | 2431 | read_lock(&bond->lock); |
2433 | slave = bond_get_slave_by_dev((struct bonding *)dev->priv, | 2432 | slave = bond_get_slave_by_dev((struct bonding *)dev->priv, orig_dev); |
2434 | skb->real_dev); | 2433 | if (!slave) |
2435 | if (slave == NULL) { | ||
2436 | goto out_unlock; | 2434 | goto out_unlock; |
2437 | } | ||
2438 | 2435 | ||
2439 | bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); | 2436 | bond_3ad_rx_indication((struct lacpdu *) skb->data, slave, skb->len); |
2440 | 2437 | ||
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index f46823894187..673a30af5660 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h | |||
@@ -295,6 +295,6 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave); | |||
295 | void bond_3ad_handle_link_change(struct slave *slave, char link); | 295 | void bond_3ad_handle_link_change(struct slave *slave, char link); |
296 | int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); | 296 | int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); |
297 | int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); | 297 | int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); |
298 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype); | 298 | int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev); |
299 | #endif //__BOND_3AD_H__ | 299 | #endif //__BOND_3AD_H__ |
300 | 300 | ||
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 19e829b567d0..f8fce3961197 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -354,15 +354,14 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp) | |||
354 | _unlock_rx_hashtbl(bond); | 354 | _unlock_rx_hashtbl(bond); |
355 | } | 355 | } |
356 | 356 | ||
357 | static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype) | 357 | static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct packet_type *ptype, struct net_device *orig_dev) |
358 | { | 358 | { |
359 | struct bonding *bond = bond_dev->priv; | 359 | struct bonding *bond = bond_dev->priv; |
360 | struct arp_pkt *arp = (struct arp_pkt *)skb->data; | 360 | struct arp_pkt *arp = (struct arp_pkt *)skb->data; |
361 | int res = NET_RX_DROP; | 361 | int res = NET_RX_DROP; |
362 | 362 | ||
363 | if (!(bond_dev->flags & IFF_MASTER)) { | 363 | if (!(bond_dev->flags & IFF_MASTER)) |
364 | goto out; | 364 | goto out; |
365 | } | ||
366 | 365 | ||
367 | if (!arp) { | 366 | if (!arp) { |
368 | dprintk("Packet has no ARP data\n"); | 367 | dprintk("Packet has no ARP data\n"); |