Subject: Re: Bug in sbmac.c?
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-kern
Date: 03/07/2007 17:25:06
In article <45EDE914.5080903@redback.com>,
Markus Mayer  <mmayer@redback.com> wrote:
>Running NetBSD 3.0 on a MIPS based board with sbmac compatible eth 
>interface, we noticed that the count of outgoing packets is always shown 
>as 0 (in netstat output) whereas incoming packets are counted.
>
>Upon investigating I found the following:
>
>The driver in question is usr/src/sys/arch/mips/sibyte/dev/sbmac.c. The 
>receive function (sbdma_rx_process()) counts incoming packets
>     ifp->if_ipackets++;
>The send function (sbdma_tx_process()) never counts outgoing packets, in 
>other words
>     ifp->if_opackets++;
>is missing there.
>
>After this discovery, I checked sbmac.c in 3.0.2 and 3.1 and found the 
>same problem. And even NetBSD 4.0 current seems to have the same issue.
>
>Is this actually the bug it seems to be or am I missing something?

Thanks, I committed a change to head.

christos