Re: [RTnet-developers] Patch for multicast support for RTnet
Brought to you by:
bet-frogger,
kiszka
|
From: amine <am...@an...> - 2005-07-25 16:40:37
|
On Monday 25 July 2005 16:37, Jan Kiszka wrote: > Hi Amine, > > > hi , > > > > Here the first realise of patch for multicast support in RTnet , This > > realise support : > > * IGMP V2 > > > > I have only adapt the NIC drivers for : > > *RT_8139too : Tested > > *RT_eepro100 : Not Tested > > > > -HOW TO USE IT ; > > 1- Apply the patch to rtnet : (0.8.1 - 0.8.2 - 0.8.3) > > 2- Patch the NIC driver > > 3- Execute the autogen.sh scritp to generate a new configure file. > > (a new config option will added "--enable-multicast" ) > > 4-execute configure "./configure --with-rtai=<RTAI-DIR> > > --enable-multicast " > > > > Now in your application if you want to receive multicast packets you > > must use setsockopt " RT_IP_ADD_MEMBERSHIP " , to stop the reception of > > multicast packet you can use "RT_IP_DROP_MEMBERSHIP" > > > > Don't forget when sending multicast packet to specify the local IP > > adress, don't use INADDR_ANY (Only way I've fount to locate the device) . > > > > for more detail about use of multicast in RTNET please see the sample > > attached to this mail. > > > > I hope if any body can test this patch ,and if you have any idea to > > improve it. > > > > Im working now on a new realize of this patch , I will add : > > * the possiblity to modify the TLL value( new IOCTL in the socketopt). > > * IGMP V1 Support. > > * A random response to the query request (IGMP V1 & V2). > > Great! Thanks for the patch, it looks very good. So far I only > cross-read parts of it. Let's see if you got the implications of this > multicast patch correctly: > > o Joining or leaving a multicast group can be performed from > non-real-time context. Are those IOCTLs (or should they once become > socket options?) compatible with the linux multicast interface, or > does that one work differently? I have just use IOCTL for testing , but to be compatible with linux we must use socket options . We can use socket otions to ADD or DROP member .IOCTL can become socket option without a big change. > > o Routing is as simple as finding the NIC a socket is bound to via its > source address. Yes . Im traying to find other solution to do that to avoid the hook in UDP send message > > o It take a periodic rt-task to send some "keep-alive" igmp message > every 500 ms with low priority (how long may this message be delayed > until switches start to drop the membership?). Is this also required > in case I'm connected to hubs or an unmanaged switches? With hub its not required , only with managed switches. I think i will change that by using simple task activated by sem event when reciving IGMP query. normaly we receive an IGMP query from switch every 125 s. The message can be delayed in 10s. > The patch is very unintrusive to the core, especially when > CONFIG_RTNET_MULTICAST is not selected. Therefore, I will see if we can > merge into SVN soon. But I have two tiny criticisms: I hope so. > > o The handling of RT_IP_ADD_MEMBERSHIP and RT_IP_DROP_MEMBERSHIP should > check for the correct context (non-RT), and it should be moved to the > IP subsystem (rt_ip_ioctl or even rt_ip_setsockopt). I can move it to rt_ip_ioctl or rt_ip_setsockopt as you like. > o Please review your driver patches if changing multicast addresses > does not clash with the real-time operation of the NIC. At least > the multicast set funtion of the rt_8139 does not seem to use the > correct locking functions yet and uses printks within critical > sections (note that it has not been used in parallel with RT-parts of > the driver so far). Let me know if you need some hints in this > respect. Ok I will check it. > Thanks again, > Jan > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > RTnet-developers mailing list > RTn...@li... > https://lists.sourceforge.net/lists/listinfo/rtnet-developers -- EL HEDADI Amine R&D phone : Email : am...@an... |