All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Daniel Egger <degger@fhm.edu>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	jgarzik@pobox.com
Subject: [PATCH] Re: rtl8169 problem and 2.4.23
Date: Sun, 25 Jan 2004 23:07:53 +0100	[thread overview]
Message-ID: <20040125230753.A20686@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1075059124.13750.38.camel@sonja>; from degger@fhm.edu on Sun, Jan 25, 2004 at 08:32:05PM +0100

Daniel Egger <degger@fhm.edu> :
[r8169 stats broken]
> Furthermore the performance is really scary slow: I'm not even getting 
> 100Base-T speeds from an Athlon XP to my G4 PowerBook under MacOS X over
> a PtP connection.

Try the patch above. If it compiles, it should fix the stats and you get a
bugfix as an extra.

Please Cc: netdev@oss.sgi.com on followup.

--- linux-2.4.23.orig/drivers/net/r8169.c	Sun Jan 25 21:00:51 2004
+++ linux-2.4.23/drivers/net/r8169.c	Sun Jan 25 22:58:17 2004
@@ -874,7 +874,6 @@
 		     void *ioaddr)
 {
 	unsigned long dirty_tx, tx_left = 0;
-	int entry = tp->cur_tx % NUM_TX_DESC;
 
 	assert(dev != NULL);
 	assert(tp != NULL);
@@ -884,14 +883,18 @@
 	tx_left = tp->cur_tx - dirty_tx;
 
 	while (tx_left > 0) {
+		int entry = dirty_tx % NUM_TX_DESC;
+
 		if ((tp->TxDescArray[entry].status & OWNbit) == 0) {
-			dev_kfree_skb_irq(tp->
-					  Tx_skbuff[dirty_tx % NUM_TX_DESC]);
-			tp->Tx_skbuff[dirty_tx % NUM_TX_DESC] = NULL;
+			struct sk_buff *skb = tp->Tx_skbuff[entry];
+
+			tp->stats.tx_bytes += skb->len >= ETH_ZLEN ?
+					      skb->len : ETH_ZLEN;
 			tp->stats.tx_packets++;
+			dev_kfree_skb_irq(skb);
+			tp->Tx_skbuff[entry] = NULL;
 			dirty_tx++;
 			tx_left--;
-			entry++;
 		}
 	}
 

  reply	other threads:[~2004-01-25 22:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25 19:32 rtl8169 problem and 2.4.23 Daniel Egger
2004-01-25 22:07 ` Francois Romieu [this message]
2004-02-20 12:11   ` [PATCH] " Daniel Egger
  -- strict thread matches above, loose matches on Subject: below --
2004-02-21 13:43 Francois Romieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040125230753.A20686@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=degger@fhm.edu \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.