On Sun, 14 Jan 2007, Kolbjørn Barmen wrote:
I'm missing TX bytes from my a2065: daneel ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:80:10:00:14:18 inet addr:158.38.152.229 Bcast:158.38.152.255 Mask:255.255.255.0 inet6 addr: fe80::280:10ff:fe00:1418/64 Scope:Link inet6 addr: 2001:700:1:2::a:1200/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5236233 errors:0 dropped:0 overruns:0 frame:0 TX packets:3035691 errors:0 dropped:0 overruns:0 carrier:0 collisions:6063 txqueuelen:1000 RX bytes:2341484260 (2233.0 Mb) TX bytes:0 (0.0 b) ^^^^^^^^^ Base address:0x4000 Memory:80e98000-80ea0000 It's there for the apne: chetter plugins # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:40:F4:1C:67:2F inet addr:158.38.152.232 Bcast:158.38.152.255 Mask:255.255.255.0 inet6 addr: fe80::240:f4ff:fe1c:672f/64 Scope:Link inet6 addr: 2001:700:1:2::a:1260/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:161691 errors:0 dropped:3 overruns:0 frame:6 TX packets:53139 errors:0 dropped:0 overruns:0 carrier:0 collisions:51 txqueuelen:1000 RX bytes:11991040 (11.4 Mb) TX bytes:12477459 (11.8 Mb) Interrupt:2 Base address:0x300 Driver bug perhaps? Anyone alse with a2065 perhaps that see this?
Both the A2065 and Ariadne driver seem to miss code to update net_device_stats.tx_bytes. The patch below (compile-tested only) may fix that. Please give it a try and report back. Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index d76548e..7217ff3 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c @@ -563,7 +563,6 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) volatile struct lance_init_block *ib = lp->init_block; int entry, skblen, len; int status = 0; - static int outs; unsigned long flags; skblen = skb->len; @@ -608,8 +607,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) /* Now, give the packet to the lance */ ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN); lp->tx_new = (lp->tx_new+1) & lp->tx_ring_mod_mask; - - outs++; + lp->stats.tx_bytes += skblen; if (TX_BUFFS_AVAIL <= 0) netif_stop_queue(dev); diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index 9dfc09b..fd1d990 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c @@ -677,6 +677,7 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev) priv->cur_tx -= TX_RING_SIZE; priv->dirty_tx -= TX_RING_SIZE; } + priv->stats.tx_bytes += len; /* Trigger an immediate send poll. */ lance->RAP = CSR0; /* PCnet-ISA Controller Status */ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds