mirror of https://gitee.com/openkylin/linux.git
net: dlink: sundance: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
dev_consume_skb_irq() should be called in intr_handler() when skb xmit done. It makes drop profiles(dropwatch, perf) more friendly. Remove a redundant blank line in intr_handler(). 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
feb558c270
commit
76cba8fd9c
|
@ -1193,7 +1193,6 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
|
||||||
int handled = 0;
|
int handled = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
int intr_status = ioread16(ioaddr + IntrStatus);
|
int intr_status = ioread16(ioaddr + IntrStatus);
|
||||||
iowrite16(intr_status, ioaddr + IntrStatus);
|
iowrite16(intr_status, ioaddr + IntrStatus);
|
||||||
|
@ -1286,7 +1285,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
|
||||||
dma_unmap_single(&np->pci_dev->dev,
|
dma_unmap_single(&np->pci_dev->dev,
|
||||||
le32_to_cpu(np->tx_ring[entry].frag[0].addr),
|
le32_to_cpu(np->tx_ring[entry].frag[0].addr),
|
||||||
skb->len, DMA_TO_DEVICE);
|
skb->len, DMA_TO_DEVICE);
|
||||||
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;
|
||||||
np->tx_ring[entry].frag[0].addr = 0;
|
np->tx_ring[entry].frag[0].addr = 0;
|
||||||
np->tx_ring[entry].frag[0].length = 0;
|
np->tx_ring[entry].frag[0].length = 0;
|
||||||
|
@ -1305,7 +1304,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
|
||||||
dma_unmap_single(&np->pci_dev->dev,
|
dma_unmap_single(&np->pci_dev->dev,
|
||||||
le32_to_cpu(np->tx_ring[entry].frag[0].addr),
|
le32_to_cpu(np->tx_ring[entry].frag[0].addr),
|
||||||
skb->len, DMA_TO_DEVICE);
|
skb->len, DMA_TO_DEVICE);
|
||||||
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;
|
||||||
np->tx_ring[entry].frag[0].addr = 0;
|
np->tx_ring[entry].frag[0].addr = 0;
|
||||||
np->tx_ring[entry].frag[0].length = 0;
|
np->tx_ring[entry].frag[0].length = 0;
|
||||||
|
|
Loading…
Reference in New Issue