All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any()
@ 2014-09-08 15:31 Rick Jones
  2014-09-08 19:38 ` Jaroslav Kysela
  2014-09-08 22:40 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Rick Jones @ 2014-09-08 15:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, perex


From: Rick Jones <rick.jones2@hp.com>

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.

Signed-off-by: Rick Jones <rick.jones2@hp.com>

---

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

diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index ed7916f..76a6e0c 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any()
  2014-09-08 15:31 [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any() Rick Jones
@ 2014-09-08 19:38 ` Jaroslav Kysela
  2014-09-08 22:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2014-09-08 19:38 UTC (permalink / raw)
  To: Rick Jones, netdev; +Cc: davem

Date 8.9.2014 17:31, Rick Jones wrote:
> From: Rick Jones <rick.jones2@hp.com>
> 
> 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.
> 
> Signed-off-by: Rick Jones <rick.jones2@hp.com>

Acked-by: Jaroslav Kysela <perex@perex.cz>

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

It's really old hw..

> 
> diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
> index ed7916f..76a6e0c 100644
> --- a/drivers/net/ethernet/hp/hp100.c
> +++ b/drivers/net/ethernet/hp/hp100.c
> @@ -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);
> 


-- 
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any()
  2014-09-08 15:31 [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any() Rick Jones
  2014-09-08 19:38 ` Jaroslav Kysela
@ 2014-09-08 22:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-08 22:40 UTC (permalink / raw)
  To: raj; +Cc: netdev, perex

From: raj@tardy.usa.hp.com (Rick Jones)
Date: Mon,  8 Sep 2014 08:31:32 -0700 (PDT)

> From: Rick Jones <rick.jones2@hp.com>
> 
> 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.
> 
> Signed-off-by: Rick Jones <rick.jones2@hp.com>

Applied, thanks Rick.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-08 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 15:31 [PATCH net-next] hp100: Convert the normal skb free path to dev_consume_skb_any() Rick Jones
2014-09-08 19:38 ` Jaroslav Kysela
2014-09-08 22:40 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.