Prof. Max Fischer wrote:
> 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).

Yes, you re-confirmed a known RTAI 3.3 bug [1].

> 
> 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...

I would suggest to update to 3.3-cv, or directly 3.4 (due to another
RTAI issue with semaphore timeouts). With the 3.4 release and RTnet
0.9.5 you will run into this bug [2]. That one is now fixed in RTAI's
magma CVS AFAIK.

Jan


[1]https://mail.rtai.org/pipermail/rtai/2006-March/014518.html
[2]http://sourceforge.net/mailarchive/forum.php?thread_id=30604610&forum_id=24610

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
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