Skip to contentSkip to conversation

hp100: Convert the normal skb free path to dev_consume_skb_any()

PATCH Applied Rick Jones 3 participants 3 messages Sep 8, 2014

Subsystems (2)
lore
Share & tools
lore

Rick Jones

author
#0 lore raw

PATCH 1/1 hp100: Convert the normal skb free path to dev_consume_skb_any()

From: Rick Jones <[email protected]>

A bit of floor sweeping in a dusty old corner. Convert the "normal" skb free calls to dev_consume_skb_any() so packet drop tracing will be more sane.

---

Compile tested only. I wonder how many of these cards are still in operation?-)

drivers/net/ethernet/hp/hp100.c +2 -2
index ed7916f..76a6e0c 100644
@@ -1627,7 +1627,7 @@ static void hp100_clean_txring(struct net_device *dev)
 #endif
 		/* Conversion to new PCI API : NOP */
 		pci_unmap_single(lp->pci_dev, (dma_addr_t) lp->txrhead->pdl[1], lp->txrhead->pdl[2], PCI_DMA_TODEVICE);
-		dev_kfree_skb_any(lp->txrhead->skb);
+		dev_consume_skb_any(lp->txrhead->skb);
 		lp->txrhead->skb = NULL;
 		lp->txrhead = lp->txrhead->next;
 		lp->txrcommit--;
@@ -1745,7 +1745,7 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
 	hp100_ints_on();
 	spin_unlock_irqrestore(&lp->lock, flags);
 
-	dev_kfree_skb_any(skb);
+	dev_consume_skb_any(skb);
 
 #ifdef HP100_DEBUG_TX
 	printk("hp100: %s: start_xmit: end\n", dev->name);
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rick Jones

From: Rick Jones <[email protected]>

A bit of floor sweeping in a dusty old corner. Convert the "normal" skb free calls to dev_consume_skb_any() so packet drop tracing will be more sane.

Quoted 5 lines

---

Compile tested only. I wonder how many of these cards are still in operation?-)

It's really old hw..

Quoted 24 lines
drivers/net/ethernet/hp/hp100.c +2 -2
index ed7916f..76a6e0c 100644
@@ -1627,7 +1627,7 @@ static void hp100_clean_txring(struct net_device *dev)
 #endif
 		/* Conversion to new PCI API : NOP */
 		pci_unmap_single(lp->pci_dev, (dma_addr_t) lp->txrhead->pdl[1], lp->txrhead->pdl[2], PCI_DMA_TODEVICE);
-		dev_kfree_skb_any(lp->txrhead->skb);
+		dev_consume_skb_any(lp->txrhead->skb);
 		lp->txrhead->skb = NULL;
 		lp->txrhead = lp->txrhead->next;
 		lp->txrcommit--;
@@ -1745,7 +1745,7 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
 	hp100_ints_on();
 	spin_unlock_irqrestore(&lp->lock, flags);
 
-	dev_kfree_skb_any(skb);
+	dev_consume_skb_any(skb);
 
 #ifdef HP100_DEBUG_TX
 	printk("hp100: %s: start_xmit: end\n", dev->name);
Signature · 3 lines
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.