Hi,

I am using rtnet-0.9.5 with rtai3.3 on kernel 2.6.15. I would like to 
implement an application using raw sockets with somewhat special 
requirements:
There are situations where a few subsequent packets arrive very fast. 
This means, that I would like to loop receiving already arrived packets.
Unfortunately, I only get one packet, subsequent receives time out.

e.g., when I do

send_packet (1)
send_packet (2)
recv_packet (3)
recv_packet (4)

on a (hardware) loopback device, (3) is ok, but 4 times out (even after 
a delay). After another send_packet, I get the packet from (2), but I'm 
never able to recv all the packets that arrived.
I tracked down the situation and found out the following:

In rt_packet_rcv (af_packet.c)

after

rtdm_sem_up(&sock->pending_sem);

pending_sem->count doesn't increase with subsequent arriving packets. 
This comes from pending_sem->type being a binary semaphore where I hoped 
pending_sem might be counting.
As packets seem to be buffered correctly (when a new packet arrives 
after a recv on my side, I get the right packet in the sequence), I 
would like to ask, if this is a desired
behavior or if it would be a good idea to change pending_sem to be 
counting (although RTDM doesn't offer counting semas in my opinion).

Any proposals? Did I get the situation wrong and there is a user level 
solution? Would be changing pending_sem to counting be acceptable or 
would it break something else?
Any help appreciated...

Thanks

    Max

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to