Patchwork tg3: Fix to use multi queue BQL interfaces

login
register
mail settings
Submitter Tom Herbert
Date March 6, 2012, 5:53 a.m.
Message ID <alpine.DEB.2.00.1203052147540.19396@pokey.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/144848/
State Accepted
Delegated to: David Miller
Headers show

Comments

Tom Herbert - March 6, 2012, 5:53 a.m.
Fix tg3 to use BQL multi queue related netdev interfaces since the
device supports multi queue.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/ethernet/broadcom/tg3.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Eric Dumazet - March 6, 2012, 5:56 a.m.
Le lundi 05 mars 2012 à 21:53 -0800, Tom Herbert a écrit :
> Fix tg3 to use BQL multi queue related netdev interfaces since the
> device supports multi queue.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
>  drivers/net/ethernet/broadcom/tg3.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index bc236b6..b065746 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -5595,7 +5595,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
>  		}
>  	}
>  
> -	netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
> +	netdev_tx_completed_queue(txq, pkts_compl, bytes_compl);
>  
>  	tnapi->tx_cons = sw_idx;
>  
> @@ -6971,7 +6971,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  	}
>  
>  	skb_tx_timestamp(skb);
> -	netdev_sent_queue(tp->dev, skb->len);
> +	netdev_tx_sent_queue(txq, skb->len);
>  
>  	/* Sync BD data before updating mailbox */
>  	wmb();
> @@ -7396,8 +7396,8 @@ static void tg3_free_rings(struct tg3 *tp)
>  
>  			dev_kfree_skb_any(skb);
>  		}
> +		netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
>  	}
> -	netdev_reset_queue(tp->dev);
>  }
>  
>  /* Initialize tx/rx rings for packet processing.

Reported-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 6, 2012, 6:20 a.m.
From: Tom Herbert <therbert@google.com>
Date: Mon, 5 Mar 2012 21:53:50 -0800 (PST)

> Fix tg3 to use BQL multi queue related netdev interfaces since the
> device supports multi queue.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index bc236b6..b065746 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -5595,7 +5595,7 @@  static void tg3_tx(struct tg3_napi *tnapi)
 		}
 	}
 
-	netdev_completed_queue(tp->dev, pkts_compl, bytes_compl);
+	netdev_tx_completed_queue(txq, pkts_compl, bytes_compl);
 
 	tnapi->tx_cons = sw_idx;
 
@@ -6971,7 +6971,7 @@  static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	}
 
 	skb_tx_timestamp(skb);
-	netdev_sent_queue(tp->dev, skb->len);
+	netdev_tx_sent_queue(txq, skb->len);
 
 	/* Sync BD data before updating mailbox */
 	wmb();
@@ -7396,8 +7396,8 @@  static void tg3_free_rings(struct tg3 *tp)
 
 			dev_kfree_skb_any(skb);
 		}
+		netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
 	}
-	netdev_reset_queue(tp->dev);
 }
 
 /* Initialize tx/rx rings for packet processing.