mirror of
https://github.com/torvalds/linux
synced 2024-10-17 16:58:15 +00:00
net: 3com: 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: Yang Wei <yang.wei9@zte.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
67633e7864
commit
467d2fceaf
|
@ -1177,7 +1177,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)
|
||||||
if (inl(ioaddr + DownListPtr) == isa_virt_to_bus(&lp->tx_ring[entry]))
|
if (inl(ioaddr + DownListPtr) == isa_virt_to_bus(&lp->tx_ring[entry]))
|
||||||
break; /* It still hasn't been processed. */
|
break; /* It still hasn't been processed. */
|
||||||
if (lp->tx_skbuff[entry]) {
|
if (lp->tx_skbuff[entry]) {
|
||||||
dev_kfree_skb_irq(lp->tx_skbuff[entry]);
|
dev_consume_skb_irq(lp->tx_skbuff[entry]);
|
||||||
lp->tx_skbuff[entry] = NULL;
|
lp->tx_skbuff[entry] = NULL;
|
||||||
}
|
}
|
||||||
dirty_tx++;
|
dirty_tx++;
|
||||||
|
@ -1192,7 +1192,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)
|
||||||
#ifdef VORTEX_BUS_MASTER
|
#ifdef VORTEX_BUS_MASTER
|
||||||
if (status & DMADone) {
|
if (status & DMADone) {
|
||||||
outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */
|
outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */
|
||||||
dev_kfree_skb_irq(lp->tx_skb); /* Release the transferred buffer */
|
dev_consume_skb_irq(lp->tx_skb); /* Release the transferred buffer */
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2307,7 +2307,7 @@ _vortex_interrupt(int irq, struct net_device *dev)
|
||||||
dma_unmap_single(vp->gendev, vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, DMA_TO_DEVICE);
|
dma_unmap_single(vp->gendev, vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, DMA_TO_DEVICE);
|
||||||
pkts_compl++;
|
pkts_compl++;
|
||||||
bytes_compl += vp->tx_skb->len;
|
bytes_compl += vp->tx_skb->len;
|
||||||
dev_kfree_skb_irq(vp->tx_skb); /* Release the transferred buffer */
|
dev_consume_skb_irq(vp->tx_skb); /* Release the transferred buffer */
|
||||||
if (ioread16(ioaddr + TxFree) > 1536) {
|
if (ioread16(ioaddr + TxFree) > 1536) {
|
||||||
/*
|
/*
|
||||||
* AKPM: FIXME: I don't think we need this. If the queue was stopped due to
|
* AKPM: FIXME: I don't think we need this. If the queue was stopped due to
|
||||||
|
@ -2449,7 +2449,7 @@ _boomerang_interrupt(int irq, struct net_device *dev)
|
||||||
#endif
|
#endif
|
||||||
pkts_compl++;
|
pkts_compl++;
|
||||||
bytes_compl += skb->len;
|
bytes_compl += skb->len;
|
||||||
dev_kfree_skb_irq(skb);
|
dev_consume_skb_irq(skb);
|
||||||
vp->tx_skbuff[entry] = NULL;
|
vp->tx_skbuff[entry] = NULL;
|
||||||
} else {
|
} else {
|
||||||
pr_debug("boomerang_interrupt: no skb!\n");
|
pr_debug("boomerang_interrupt: no skb!\n");
|
||||||
|
|
Loading…
Reference in a new issue