Commit 380ab7e3 authored by Yang Wei's avatar Yang Wei Committed by David S. Miller

net: natsemi: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles

dev_consume_skb_irq() should be called when skb xmit done. It makes
drop profiles(dropwatch, perf) more friendly.
Signed-off-by: default avatarYang Wei <yang.wei9@zte.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 105cfb06
...@@ -2173,7 +2173,7 @@ static void netdev_tx_done(struct net_device *dev) ...@@ -2173,7 +2173,7 @@ static void netdev_tx_done(struct net_device *dev)
np->tx_skbuff[entry]->len, np->tx_skbuff[entry]->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
/* Free the original skb. */ /* Free the original skb. */
dev_kfree_skb_irq(np->tx_skbuff[entry]); dev_consume_skb_irq(np->tx_skbuff[entry]);
np->tx_skbuff[entry] = NULL; np->tx_skbuff[entry] = NULL;
} }
if (netif_queue_stopped(dev) && if (netif_queue_stopped(dev) &&
......
...@@ -1003,7 +1003,7 @@ static void do_tx_done(struct net_device *ndev) ...@@ -1003,7 +1003,7 @@ static void do_tx_done(struct net_device *ndev)
addr, addr,
len, len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
dev_kfree_skb_irq(skb); dev_consume_skb_irq(skb);
atomic_dec(&dev->nr_tx_skbs); atomic_dec(&dev->nr_tx_skbs);
} else } else
pci_unmap_page(dev->pci_dev, pci_unmap_page(dev->pci_dev,
......
...@@ -328,7 +328,7 @@ static irqreturn_t sonic_interrupt(int irq, void *dev_id) ...@@ -328,7 +328,7 @@ static irqreturn_t sonic_interrupt(int irq, void *dev_id)
} }
/* We must free the original skb */ /* We must free the original skb */
dev_kfree_skb_irq(lp->tx_skb[entry]); dev_consume_skb_irq(lp->tx_skb[entry]);
lp->tx_skb[entry] = NULL; lp->tx_skb[entry] = NULL;
/* and unmap DMA buffer */ /* and unmap DMA buffer */
dma_unmap_single(lp->device, lp->tx_laddr[entry], lp->tx_len[entry], DMA_TO_DEVICE); dma_unmap_single(lp->device, lp->tx_laddr[entry], lp->tx_len[entry], DMA_TO_DEVICE);
......
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