net: natsemi: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
authorYang Wei <yang.wei9@zte.com.cn>
Wed, 13 Feb 2019 15:19:14 +0000 (23:19 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 16:56:36 +0000 (11:56 -0500)
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>
drivers/net/ethernet/natsemi/natsemi.c
drivers/net/ethernet/natsemi/ns83820.c
drivers/net/ethernet/natsemi/sonic.c

index b9a1a9f999ea6e582900510f1e4d8a0843c2a227..1a2634cbbb691800b9de081b6f2b802bd8e381c6 100644 (file)
@@ -2173,7 +2173,7 @@ static void netdev_tx_done(struct net_device *dev)
                                        np->tx_skbuff[entry]->len,
                                        PCI_DMA_TODEVICE);
                /* 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;
        }
        if (netif_queue_stopped(dev) &&
index 958fced4dacf20bea8ad357b0d04e9218523af00..000009e18ff8c4fa0948423b2ccb764095c872ab 100644 (file)
@@ -1003,7 +1003,7 @@ static void do_tx_done(struct net_device *ndev)
                                        addr,
                                        len,
                                        PCI_DMA_TODEVICE);
-                       dev_kfree_skb_irq(skb);
+                       dev_consume_skb_irq(skb);
                        atomic_dec(&dev->nr_tx_skbs);
                } else
                        pci_unmap_page(dev->pci_dev,
index c805dcbebd0278752b2ed8b34b7531ec19ea2357..aaec00912ea02296ff1baa618c894010dbc0cc6c 100644 (file)
@@ -328,7 +328,7 @@ static irqreturn_t sonic_interrupt(int irq, void *dev_id)
                                }
 
                                /* 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;
                                /* and unmap DMA buffer */
                                dma_unmap_single(lp->device, lp->tx_laddr[entry], lp->tx_len[entry], DMA_TO_DEVICE);