Subject: Bug in sbmac.c?
To: NetBSD Kernel <tech-kern@NetBSD.org>
From: Markus Mayer <mmayer@redback.com>
List: tech-kern
Date: 03/06/2007 14:20:04
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,
-Markus

-- 
Markus Mayer
Redback Networks Inc.