[haiku-development] Re: Debugging networking pointers

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 04 Oct 2008 12:33:24 +0200 CEST

"Fredrik Holmqvist" <fredrik.holmqvist@xxxxxxxxx> wrote:
> My rtl8169 seems to stop responding from time to time and I'd like to
> track down why.It usually helps with ifconfig down / up, but it is a
> problem.
> I also tested the new re driver, but while it is listed in ifconfig 
> it
> doesn't get dhcp address and don't work with static ip.
> Any pointers how I figure out why/where it fails?

This is most probably an interrupt problem. What kind of device do you 
To be sure, you can add tracing whenever the driver gets a packet, and 
whenever it acknowledges a transmit (via interrupt) - best with header 
information to differentiate the data. That should also help to see if 
the device gets any interrupts afterwards anymore.
If you have a second system, you can use Wireshark or tcpdump or 
something similar to see what packets actually got into the network, 
and at which point the driver decided to stop.

Since network data and interrupts are high frequency, I would use the 
kernel tracing mechanism instead of syslog or serial debug output via 
To enable it, you can customize build/config_headers/tracing_config.h 
to your needs (a large log size will help) - the customized header 
should go into build/user_config_headers/, though (so that you don't 
mix it up, or accidently commit changes to it). Please read Ingo's KDL 
article for further info on how to use the "traced" command.


Other related posts: