Skip to content

Commit

Permalink
net/core: Uninline skb_bond().
Browse files Browse the repository at this point in the history
Otherwise subsequent changes need multiple return values.

Signed-off-by: Joe Eykholt <jre@nuovasystems.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Joe Eykholt authored and Jeff Garzik committed Aug 7, 2008
1 parent db018a5 commit cc9bd5c
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1939,22 +1939,6 @@ int netif_rx_ni(struct sk_buff *skb)

EXPORT_SYMBOL(netif_rx_ni);

static inline struct net_device *skb_bond(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;

if (dev->master) {
if (skb_bond_should_drop(skb)) {
kfree_skb(skb);
return NULL;
}
skb->dev = dev->master;
}

return dev;
}


static void net_tx_action(struct softirq_action *h)
{
struct softnet_data *sd = &__get_cpu_var(softnet_data);
Expand Down Expand Up @@ -2194,10 +2178,14 @@ int netif_receive_skb(struct sk_buff *skb)
if (!skb->iif)
skb->iif = skb->dev->ifindex;

orig_dev = skb_bond(skb);

if (!orig_dev)
return NET_RX_DROP;
orig_dev = skb->dev;
if (orig_dev->master) {
if (skb_bond_should_drop(skb)) {
kfree_skb(skb);
return NET_RX_DROP;
}
skb->dev = orig_dev->master;
}

__get_cpu_var(netdev_rx_stat).total++;

Expand Down

0 comments on commit cc9bd5c

Please sign in to comment.