Mcast packet loss 2.6.8.1 kernel

From: Ahmed Kadwa
Date: Wed Nov 14 2007 - 08:34:42 EST


Hi,

I have a peculiar problem which I hope someone can shed some light on.
I have the following setup:
Linux box running 2.6.8.1 kernel
2 ethernet cards (eth0 (local eth backplane between 3 processors), eth1
to rest of external network) + my own multicast program waiting for
packets.

I encounter packet loss in the order of about 10 packets per 1000
messages sent. (Remote node sending 1000 byte packets at about every
100ms).

However, when I run TCPDUMP 3.9.8 on the listener box as well, I get no
packet loss. This is repeatable.

running tcpdump on linux box that is the sink for mcast packets seems to
cause no loss of packets.
{
tcpdump dst host 231.10.11.1
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on eth0, link-type EN10MB (Ethernet), capture size 68 bytes
20:16:08.417072 IP p0e0.localdomain > 231.10.11.1: igmp v2 report
231.10.11.1
20:16:08.500188 IP 192.168.57.11.12441 > 231.10.11.1.12441: UDP, length
1112
//For 200 packets sent:
202 packets captured
202 packets received by filter
0 packets dropped by kernel
}

running tcpdump -p dst host 231.10.11.1 (promiscuous mode off) cause 13
packets lost (987 received by tcpdump)

I have looked at the /proc/net/dev, and the multicast packet count ties
up to the number of packets I sent from the remote node, but the
listener reports packets are lost when tcpdump is not running. Hence my
assumption is that the au1000 eth driver (Not NAPI) is reading all the
packets, but a higher level kernel process drops some packets when the
processor is under load.

What does tcpdump do that fixes my problem of packets being lost? i.e
What do I need to do to my application (setsockopt()? or otherwise) that
is being done by tcpdump?

I setup my listener socket as O_NONBLOCK, with SO_RCVBUF set to 512000.
I then poll the socket with select() to receive data.

I tried to set the promiscuous mode option in my multicast listener
program, but I still get packet loss.

cat /proc/sys/net/ipv4/conf/eth0/rp_filter = 0

Any help would be much appreciated.

TIA
A. Kadwa

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html