odd behavior with r8169 and pcap
From: Terry Griffin
Date: Mon Nov 29 2004 - 13:14:20 EST
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/