[ee122] weird MNL behavior

Amit Matani amitmatani at berkeley.edu
Sun Dec 9 13:43:18 PST 2007

So, I got the MNL system setup and working on both the receiver and sender
side with the correct ports.  When I run the program with the basic sample
config: dnone0.txt I have issues sometimes.

I am using select to wake me up on a timeout or if there is data ready to be
received.  Towards the end of the transfer, select returns before a timeout
and FD_ISSET returns true implying that there is data to be read, so I call
recvfrom which ends up blocking which would imply that there is nothing
there.  I read online that select does not guarantee that recvfrom wont
block because the packet may have been corrupted.  So I changed my socket to
work in non-blocking mode.  Now, though, my program goes in an infinite loop
because select thinks something is reader queue but recvfrom does not
returning anything.  Also, since I am simulating high load, the ACK for this
packet was never sent by the receiver.

I also do a FD_ZERO before calling FD_SET everytime in my loop, so it could
not be that there is initialization error.  The program works flawlessly
while running regular sendto and recvfrom commands even when I manually drop
random packets and use timers to increase RTTs.

Any ideas why this is happening?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/ee122/attachments/20071209/30d98c82/attachment.html 

More information about the ee122 mailing list