]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/core/dev.c
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
[mv-sheeva.git] / net / core / dev.c
index 7bd3c29c5a785992d49088d232456876aae3e3e6..052dd478d3e112b769b66ab83db5b82996d88061 100644 (file)
@@ -1670,7 +1670,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
        const struct net_device_ops *ops = dev->netdev_ops;
        int rc;
 
-       prefetch(&dev->netdev_ops->ndo_start_xmit);
        if (likely(!skb->next)) {
                if (!list_empty(&ptype_all))
                        dev_queue_xmit_nit(skb, dev);
@@ -1725,7 +1724,7 @@ out_kfree_skb:
 
 static u32 skb_tx_hashrnd;
 
-static u16 skb_tx_hash(struct net_device *dev, struct sk_buff *skb)
+u16 skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb)
 {
        u32 hash;
 
@@ -1740,6 +1739,7 @@ static u16 skb_tx_hash(struct net_device *dev, struct sk_buff *skb)
 
        return (u16) (((u64) hash * dev->real_num_tx_queues) >> 32);
 }
+EXPORT_SYMBOL(skb_tx_hash);
 
 static struct netdev_queue *dev_pick_tx(struct net_device *dev,
                                        struct sk_buff *skb)
@@ -2627,9 +2627,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
                local_irq_disable();
                skb = __skb_dequeue(&queue->input_pkt_queue);
                if (!skb) {
-                       __napi_complete(napi);
                        local_irq_enable();
-                       break;
+                       napi_complete(napi);
+                       goto out;
                }
                local_irq_enable();
 
@@ -2638,6 +2638,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
 
        napi_gro_flush(napi);
 
+out:
        return work;
 }
 
@@ -2711,7 +2712,7 @@ void netif_napi_del(struct napi_struct *napi)
        struct sk_buff *skb, *next;
 
        list_del_init(&napi->dev_list);
-       kfree(napi->skb);
+       kfree_skb(napi->skb);
 
        for (skb = napi->gro_list; skb; skb = next) {
                next = skb->next;