mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* odd behavior with r8169 and pcap
@ 2004-11-29 18:11 Terry Griffin
  2004-11-29 21:02 ` Francois Romieu
  0 siblings, 1 reply; 6+ messages in thread
From: Terry Griffin @ 2004-11-29 18:11 UTC (permalink / raw)
  To: linux-kernel

Hi all,

I'm seeing some very strange behavior with the r8169 driver
in 2.6.9. (Also observed in FC2's 2.6.5-1).

Throughput is generally dog slow, less than 100Mb/s. But if
I fire up any libpcap-based monitoring utility (ethereal,
iftop, etc) the throughput suddenly jumps an order of magnitude
to near 1Gb/s. As soon as I quit from the monitoring utility
the throughput drops back back to where it was before. This can
be repeated over an over.

I created a dummy libpcap monitoring program (below). This
is enough to trigger the behavior.

So the obvious questions are: Is this a known problem? Why the
heck does it do this? Is there a fix or workaround to get the
high rate all the time other than running a pcap utility 24x7?

Thanks,
Terry Griffin

-- dummy-monitor.c -----------------

#include <pcap.h>
#define CAPTURE_LENGTH 68

void null_handler(u_char *user, const struct pcap_pkthdr *pkt_header,
                  const u_char *pkt_data)
{
}

int main( int argc, char *argv[] )
{
    char *iface;
    pcap_t* pd;
    char errbuf[PCAP_ERRBUF_SIZE];

    if( argc == 1 )
        iface = "eth0";
    else
        iface = argv[1];

    pd = pcap_open_live(iface,CAPTURE_LENGTH,0,1000,errbuf);
    pcap_loop(pd,-1,(pcap_handler)null_handler,NULL);

    return 0;
}



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-30  0:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 18:11 odd behavior with r8169 and pcap Terry Griffin
2004-11-29 21:02 ` Francois Romieu
2004-11-29 22:07   ` Terry Griffin
2004-11-29 23:18     ` Francois Romieu
2004-11-30  0:01       ` Terry Griffin
2004-11-30  0:21         ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®