aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-11-29 06:53:05 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-30 17:10:22 -0500
commite98319098885859e34c23cc8a130b6b8668a6abe (patch)
tree56fdca9bc98db8de6aaceaee258099aec1a5207c /drivers/net/ethernet/broadcom
parentd8a6e65f8b6b6b0142ebab578472906d89d63657 (diff)
bnx2: Support for byte queue limits
Changes to bnx2 to use byte queue limits. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index d573169279b7..787e1757973a 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -2810,6 +2810,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2810 struct bnx2_tx_ring_info *txr = &bnapi->tx_ring; 2810 struct bnx2_tx_ring_info *txr = &bnapi->tx_ring;
2811 u16 hw_cons, sw_cons, sw_ring_cons; 2811 u16 hw_cons, sw_cons, sw_ring_cons;
2812 int tx_pkt = 0, index; 2812 int tx_pkt = 0, index;
2813 unsigned int tx_bytes = 0;
2813 struct netdev_queue *txq; 2814 struct netdev_queue *txq;
2814 2815
2815 index = (bnapi - bp->bnx2_napi); 2816 index = (bnapi - bp->bnx2_napi);
@@ -2864,6 +2865,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2864 2865
2865 sw_cons = NEXT_TX_BD(sw_cons); 2866 sw_cons = NEXT_TX_BD(sw_cons);
2866 2867
2868 tx_bytes += skb->len;
2867 dev_kfree_skb(skb); 2869 dev_kfree_skb(skb);
2868 tx_pkt++; 2870 tx_pkt++;
2869 if (tx_pkt == budget) 2871 if (tx_pkt == budget)
@@ -2873,6 +2875,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2873 hw_cons = bnx2_get_hw_tx_cons(bnapi); 2875 hw_cons = bnx2_get_hw_tx_cons(bnapi);
2874 } 2876 }
2875 2877
2878 netdev_tx_completed_queue(txq, tx_pkt, tx_bytes);
2876 txr->hw_tx_cons = hw_cons; 2879 txr->hw_tx_cons = hw_cons;
2877 txr->tx_cons = sw_cons; 2880 txr->tx_cons = sw_cons;
2878 2881
@@ -5393,6 +5396,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp)
5393 } 5396 }
5394 dev_kfree_skb(skb); 5397 dev_kfree_skb(skb);
5395 } 5398 }
5399 netdev_tx_reset_queue(netdev_get_tx_queue(bp->dev, i));
5396 } 5400 }
5397} 5401}
5398 5402
@@ -6546,6 +6550,8 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
6546 } 6550 }
6547 txbd->tx_bd_vlan_tag_flags |= TX_BD_FLAGS_END; 6551 txbd->tx_bd_vlan_tag_flags |= TX_BD_FLAGS_END;
6548 6552
6553 netdev_tx_sent_queue(txq, skb->len);
6554
6549 prod = NEXT_TX_BD(prod); 6555 prod = NEXT_TX_BD(prod);
6550 txr->tx_prod_bseq += skb->len; 6556 txr->tx_prod_bseq += skb->len;
6551 6557