Discussion:
UDP packets dropping
(too old to reply)
Vishal
2006-11-10 13:00:22 UTC
Permalink
Hi,
I am facing a problem which anyone who has worked on any UDP
application might have faced.
UDP by itself is unreliable. If packets are lost, no acknowledgements
are sent.

I have a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) is not able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .

So a number of packets simply drop with out any intimation to the
receiver/sender.

I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.

I have implemented polling with poll parameter as POLLIN or
POLLRDNORM.( I have tried both parameters)
Both implementation works that is gives me a poll status implying
socket buffer is full.

In my test set up I can control the rate at which packets are
generated.
When the packets are sent at a very high rate and my socket buffer is
not able to handle them, polling status tells me that
buffer is full.

when the rate of sending packets is slow, I get an intimation that
buffer space is available.

But in some cases ( when the rate of sending packets is slow ), I get a
poll status that buffer is full ( which is wrong ). Even though
these are corner cases but it made me think.( and caused worry) .

I have following queries..

a) Do we have any mechanism/ way in which we can find that udp socket
buffer is full and packets are being dropped.
b) Can polling be actually be used. My corner cases made me think that.
Is my approach totally wrong.
c) If not Polling then what ?
d) If polling can be used, which other parameters I can use to avoid
these corner case.

e) Is my implementation of polling wrong, Is it possible that I am
misunderstanding the polling status to tell whether
buffer is full.

if you have some idea about this issue please let me know.
If you need some more input from my end let me know.
You can mail me at ***@gmail.com
Ben Voigt
2006-11-10 17:04:52 UTC
Permalink
Post by Vishal
Hi,
I am facing a problem which anyone who has worked on any UDP
application might have faced.
UDP by itself is unreliable. If packets are lost, no acknowledgements
are sent.
I have a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) is not able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .
So a number of packets simply drop with out any intimation to the
receiver/sender.
I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.
Packets can be dropped by overflowing queues in network routers as well as
on the destination host, so it would be far better to use sequence numbers
to detect dropped packets.
guddu
2006-11-13 05:50:42 UTC
Permalink
Hi Ben,
In my case each packet is independant. Each packet is unique and comes
from different sources. So I cannot have sequencing.

Regards,
Vishal
Post by Ben Voigt
Post by Vishal
Hi,
I am facing a problem which anyone who has worked on any UDP
application might have faced.
UDP by itself is unreliable. If packets are lost, no acknowledgements
are sent.
I have a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) is not able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .
So a number of packets simply drop with out any intimation to the
receiver/sender.
I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.
Packets can be dropped by overflowing queues in network routers as well as
on the destination host, so it would be far better to use sequence numbers
to detect dropped packets.
Ben Voigt
2006-11-20 23:46:58 UTC
Permalink
Post by guddu
Hi Ben,
In my case each packet is independant. Each packet is unique and comes
from different sources. So I cannot have sequencing.
Then you will need acknowledgement, timeout, and retry. Since the
acknowledgement could be dropped in the network, you still need a unique
(per-connection) transaction number on each packet, but no need to
synchronize between different senders.
Post by guddu
Regards,
Vishal
Post by Ben Voigt
Post by Vishal
Hi,
I am facing a problem which anyone who has worked on any UDP
application might have faced.
UDP by itself is unreliable. If packets are lost, no acknowledgements
are sent.
I have a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) is not able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .
So a number of packets simply drop with out any intimation to the
receiver/sender.
I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.
Packets can be dropped by overflowing queues in network routers as well as
on the destination host, so it would be far better to use sequence numbers
to detect dropped packets.
Loading...