[PATCH net-next] r8169: Support for byte queue limits

Subsystems: 8169 10/100/1000 gigabit ethernet driver, networking drivers, the rest

STALE5360d

2 messages, 2 authors, 2011-12-19 · open the first message on its own page

[PATCH net-next] r8169: Support for byte queue limits

From: <hidden>
Date: 2011-12-19 10:28:46

From: Igor Maravic <redacted>

Changes to r8169 to use byte queue limits.

Signed-off-by: Igor Maravic <redacted>
---
 drivers/net/ethernet/realtek/r8169.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 36b2a4b..5fefcc3 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -5326,6 +5326,7 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
 {
 	rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
 	tp->cur_tx = tp->dirty_tx = 0;
+	netdev_reset_queue(tp->dev);
 }
 
 static void rtl8169_schedule_work(struct net_device *dev, work_func_t task)
@@ -5535,6 +5536,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 		opts[0] |= FirstFrag | LastFrag;
 		tp->tx_skb[entry].skb = skb;
 	}
+	netdev_sent_queue(dev, skb->len);
 
 	txd->opts2 = cpu_to_le32(opts[1]);
 
@@ -5624,6 +5626,8 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
 				 void __iomem *ioaddr)
 {
 	unsigned int dirty_tx, tx_left;
+	unsigned int bytes_compl = 0;
+	int tx_compl = 0;
 
 	dirty_tx = tp->dirty_tx;
 	smp_rmb();
@@ -5642,14 +5646,18 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
 		rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
 				     tp->TxDescArray + entry);
 		if (status & LastFrag) {
-			dev->stats.tx_packets++;
-			dev->stats.tx_bytes += tx_skb->skb->len;
+			tx_compl++;
+			bytes_compl += tx_skb->skb->len;
 			dev_kfree_skb(tx_skb->skb);
 			tx_skb->skb = NULL;
 		}
 		dirty_tx++;
 		tx_left--;
 	}
+	dev->stats.tx_packets += tx_compl;
+	dev->stats.tx_bytes += bytes_compl;
+
+	netdev_completed_queue(dev, tx_compl, bytes_compl);
 
 	if (tp->dirty_tx != dirty_tx) {
 		tp->dirty_tx = dirty_tx;
-- 
1.7.5.4

Re: [PATCH net-next] r8169: Support for byte queue limits

From: David Miller <davem@davemloft.net>
Date: 2011-12-19 19:19:52

From: igorm@etf.rs
Date: Mon, 19 Dec 2011 11:28:35 +0100
From: Igor Maravic <redacted>

Changes to r8169 to use byte queue limits.

Signed-off-by: Igor Maravic <redacted>
I refuse to consider your work if you keep making such poor submissions
and ignoring the contribution that reviewers are making to your patches.

First of all, you must mention what changes you are making from one
version of your patch to another, so people can tell what is changing.

You also must credit suggestions made by others.  Otherwise peopl,
including me, will start to simply ignore you and all of your work.

Eric even told you these things explicitly, and you flat out ignored
him by submitting this patch again with no indication of what changed
from the last version and no credit to Eric for his tireless feedback
and suggestions.

This cannot continue, and you are on my black list for the rest of
the week and therefore I will ignore all of your patches during this
time.

You've been given many opportunities to correct your ways, yet you
still make extremely poor patch submissions, refuse to credit the
help others give to you, and generally waste our time.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help