You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(9) |
Feb
(11) |
Mar
(22) |
Apr
(73) |
May
(78) |
Jun
(146) |
Jul
(80) |
Aug
(27) |
Sep
(5) |
Oct
(14) |
Nov
(18) |
Dec
(27) |
2005 |
Jan
(20) |
Feb
(30) |
Mar
(19) |
Apr
(28) |
May
(50) |
Jun
(31) |
Jul
(32) |
Aug
(14) |
Sep
(36) |
Oct
(43) |
Nov
(74) |
Dec
(63) |
2006 |
Jan
(34) |
Feb
(32) |
Mar
(21) |
Apr
(76) |
May
(106) |
Jun
(72) |
Jul
(70) |
Aug
(175) |
Sep
(130) |
Oct
(39) |
Nov
(81) |
Dec
(43) |
2007 |
Jan
(81) |
Feb
(36) |
Mar
(20) |
Apr
(43) |
May
(54) |
Jun
(34) |
Jul
(44) |
Aug
(55) |
Sep
(44) |
Oct
(54) |
Nov
(43) |
Dec
(41) |
2008 |
Jan
(42) |
Feb
(84) |
Mar
(73) |
Apr
(30) |
May
(119) |
Jun
(54) |
Jul
(54) |
Aug
(93) |
Sep
(173) |
Oct
(130) |
Nov
(145) |
Dec
(153) |
2009 |
Jan
(59) |
Feb
(12) |
Mar
(28) |
Apr
(18) |
May
(56) |
Jun
(9) |
Jul
(28) |
Aug
(62) |
Sep
(16) |
Oct
(19) |
Nov
(15) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(36) |
Mar
(37) |
Apr
(30) |
May
(33) |
Jun
(53) |
Jul
(42) |
Aug
(50) |
Sep
(67) |
Oct
(66) |
Nov
(69) |
Dec
(36) |
2011 |
Jan
(52) |
Feb
(45) |
Mar
(49) |
Apr
(21) |
May
(34) |
Jun
(13) |
Jul
(19) |
Aug
(37) |
Sep
(43) |
Oct
(10) |
Nov
(23) |
Dec
(30) |
2012 |
Jan
(42) |
Feb
(36) |
Mar
(46) |
Apr
(25) |
May
(96) |
Jun
(146) |
Jul
(40) |
Aug
(28) |
Sep
(61) |
Oct
(45) |
Nov
(100) |
Dec
(53) |
2013 |
Jan
(79) |
Feb
(24) |
Mar
(134) |
Apr
(156) |
May
(118) |
Jun
(75) |
Jul
(278) |
Aug
(145) |
Sep
(136) |
Oct
(168) |
Nov
(137) |
Dec
(439) |
2014 |
Jan
(284) |
Feb
(158) |
Mar
(231) |
Apr
(275) |
May
(259) |
Jun
(91) |
Jul
(222) |
Aug
(215) |
Sep
(165) |
Oct
(166) |
Nov
(211) |
Dec
(150) |
2015 |
Jan
(164) |
Feb
(324) |
Mar
(299) |
Apr
(214) |
May
(111) |
Jun
(109) |
Jul
(105) |
Aug
(36) |
Sep
(58) |
Oct
(131) |
Nov
(68) |
Dec
(30) |
2016 |
Jan
(46) |
Feb
(87) |
Mar
(135) |
Apr
(174) |
May
(132) |
Jun
(135) |
Jul
(149) |
Aug
(125) |
Sep
(79) |
Oct
(49) |
Nov
(95) |
Dec
(102) |
2017 |
Jan
(104) |
Feb
(75) |
Mar
(72) |
Apr
(53) |
May
(18) |
Jun
(5) |
Jul
(14) |
Aug
(19) |
Sep
(2) |
Oct
(13) |
Nov
(21) |
Dec
(67) |
2018 |
Jan
(56) |
Feb
(50) |
Mar
(148) |
Apr
(41) |
May
(37) |
Jun
(34) |
Jul
(34) |
Aug
(11) |
Sep
(52) |
Oct
(48) |
Nov
(28) |
Dec
(46) |
2019 |
Jan
(29) |
Feb
(63) |
Mar
(95) |
Apr
(54) |
May
(14) |
Jun
(71) |
Jul
(60) |
Aug
(49) |
Sep
(3) |
Oct
(64) |
Nov
(115) |
Dec
(57) |
2020 |
Jan
(15) |
Feb
(9) |
Mar
(38) |
Apr
(27) |
May
(60) |
Jun
(53) |
Jul
(35) |
Aug
(46) |
Sep
(37) |
Oct
(64) |
Nov
(20) |
Dec
(25) |
2021 |
Jan
(20) |
Feb
(31) |
Mar
(27) |
Apr
(23) |
May
(21) |
Jun
(30) |
Jul
(30) |
Aug
(7) |
Sep
(18) |
Oct
|
Nov
(15) |
Dec
(4) |
2022 |
Jan
(3) |
Feb
(1) |
Mar
(10) |
Apr
|
May
(2) |
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(9) |
Dec
(2) |
2023 |
Jan
(4) |
Feb
(4) |
Mar
(5) |
Apr
(10) |
May
(29) |
Jun
(17) |
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2024 |
Jan
|
Feb
(6) |
Mar
|
Apr
(1) |
May
(6) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Stephen H. <she...@os...> - 2004-04-29 20:40:21
|
Overall TIPC 1.3 comments: * README seems out of date * Configuration by module parameters is bad because in most standard environments, module loading is done automatically. * Need 2.6 only, no standalone build environment No extra CFLAGS in Makefile please * Hard coding clusters, zones, nodes maximum makes it impossible for distro vendors to ship a standard kernel. * having own caching allocator, if you insist on caching then use kmem_cache_alloc. * it links to network devices, but does not handle up/down/unregister notifications. THIS IS A SHOWSTOPPER * holds references to network devices without holding reference counts. THIS IS A SHOWSTOPPER * why own version of wait_event_interruptible? * excessive use of /proc to provide interface. /proc is okay as a statistical interface, not a control channel! * your socket locking is a mess. What is wrong with lock_sock()? * you invent your own socket queues, there are standard macros to do that. * get rid of all the macros in tipc_adapt.h err, warn, info, dbg, ... use the standard macros in kernel.h * hardcoding device names 'eth0,eth1,eth2,...' in code and configuration is unacceptable. What about other media types and netdevice names can be anything the administrator wants. tipc.h - cplusplus support not usually done in linux header files - get rid of typedef's for tipc_net_addr_t, tipc_ref_t kernel standard is to not use typedef's if possible - tipc_addr,zone,cluster,node using inline instead would gain type checking - no IPV6 support, would probably be a show stopper for many people addr.c * global variable, buffers's waiting to be overwritten, ugh. * k_time_ms == jiffies_to_clock_t * The whole TIPC_MAGIC in header crap looks a trap waiting to happen That is enough for now, that is just what I found in a 15min quick look. If Viro saw it, he wouldn't be as nice ;-) |
From: Jon M. <jon...@er...> - 2004-04-29 18:17:11
|
Thanks. I will take care of the rest, and continue trouble-shooting on parallel-link communication, which is still a little shaky. /jon Mark Haverkamp wrote: On Thu, 2004-04-29 at 10:28, Jon Maloy wrote: Ok, I think we should do the following: - Remove the 2.4/2.6 directory, and put everything back in one directory. I talked to some people from MontaVista a few days ago, and it seems like the 2.4 support is not that important for them, so we can skip that altogether. - Remove all "placeholder" code, like the whole contents of proc.c, and the inter-cluster configuration code in cfg.c. This code can be re-introduced once it is redesigned and functional. We get rid of almost all the #ifdefs this way. The MODULE flag can also easily be removed, as Mark pointed out. If there is more we should consider each case. - We go systematically through the code and replace (where possible) the linear linked lists with the Linux supported ditto. The exceptions are places in the core where we have queues (there are two such, I think) of sk_buffs. To retain a minimum level of OS portability for the core code I still insist that sk_buffs should only be accessed via macros/inlines, inclusive any next/prev pointers. - Re-run Lindent on everything. Anything more ? I will delay the announcment at LKML until this is done. (-Anything to avoid being welcomed by flames from the community ;-) ) Can I hope to get any help with this ? I can help out with the linked list conversion. Mark. Regards /Jon |
From: Mark H. <ma...@os...> - 2004-04-29 17:39:45
|
On Thu, 2004-04-29 at 10:28, Jon Maloy wrote: > Ok, I think we should do the following: > > - Remove the 2.4/2.6 directory, and put everything back in one > directory. > I talked to some people from MontaVista a few days ago, and it > seems like > the 2.4 support is not that important for them, so we can skip that > altogether. > - Remove all "placeholder" code, like the whole contents of proc.c, > and the > inter-cluster configuration code in cfg.c. This code can be > re-introduced once > it is redesigned and functional. We get rid of almost all the > #ifdefs this way. > The MODULE flag can also easily be removed, as Mark pointed out. If > there is > more we should consider each case. > - We go systematically through the code and replace (where possible) > the linear > linked lists with the Linux supported ditto. > The exceptions are places in the core where we have queues (there > are two such, > I think) of sk_buffs. To retain a minimum level of OS portability > for the core > code I still insist that sk_buffs should only be accessed via > macros/inlines, inclusive > any next/prev pointers. > - Re-run Lindent on everything. > > Anything more ? > > I will delay the announcment at LKML until this is done. (-Anything to > avoid being > welcomed by flames from the community ;-) ) > > Can I hope to get any help with this ? I can help out with the linked list conversion. Mark. > > Regards /Jon -- Mark Haverkamp <ma...@os...> |
From: Jon M. <jon...@er...> - 2004-04-29 17:29:44
|
Ok, I think we should do the following: - Remove the 2.4/2.6 directory, and put everything back in one directory. I talked to some people from MontaVista a few days ago, and it seems like the 2.4 support is not that important for them, so we can skip that altogether. - Remove all "placeholder" code, like the whole contents of proc.c, and the inter-cluster configuration code in cfg.c. This code can be re-introduced once it is redesigned and functional. We get rid of almost all the #ifdefs this way. The MODULE flag can also easily be removed, as Mark pointed out. If there is more we should consider each case. - We go systematically through the code and replace (where possible) the linear linked lists with the Linux supported ditto. The exceptions are places in the core where we have queues (there are two such, I think) of sk_buffs. To retain a minimum level of OS portability for the core code I still insist that sk_buffs should only be accessed via macros/inlines, inclusive any next/prev pointers. - Re-run Lindent on everything. Anything more ? I will delay the announcment at LKML until this is done. (-Anything to avoid being welcomed by flames from the community ;-) ) Can I hope to get any help with this ? Regards /Jon Mark Haverkamp wrote: On Thu, 2004-04-29 at 08:15, Jon Maloy wrote: Do you suggest that we delay the LKML-announcement until we have done these changes ? To replace all the linked lists is intrusive, and it may take weeks re-stabilize the code. Otherwise, see my comments below. Regards /jon Steve Hemminger said to send to lin...@vg... <mailto:lin...@vg...> also. [...] Also, I think that in the long run, that the 2.4/2.6 ifdef code will I see there is one I forgot to remove in driver.c, otherwise I think this is already done. I talked with a couple people here about the 2.4/2.6 code directories. They said that code submitted for review should be for 2.6 only and not have it set up for both versions of the kernel. |
From: Mark H. <ma...@os...> - 2004-04-29 17:00:54
|
On Thu, 2004-04-29 at 08:15, Jon Maloy wrote: > Do you suggest that we delay the LKML-announcement until we have done > these changes ? To replace all the linked lists is intrusive, and it > may > take weeks re-stabilize the code. Otherwise, see my comments below. > > Regards /jon Steve Hemminger said to send to lin...@vg... also. > [...] > > Also, I think that in the long run, that the 2.4/2.6 ifdef code will > I see there is one I forgot to remove in driver.c, otherwise I think > this is already > done. I talked with a couple people here about the 2.4/2.6 code directories. They said that code submitted for review should be for 2.6 only and not have it set up for both versions of the kernel. > > -- Mark Haverkamp <ma...@os...> |
From: Daniel M. <da...@os...> - 2004-04-29 15:56:48
|
On Thu, 2004-04-29 at 08:15, Jon Maloy wrote: > Do you suggest that we delay the LKML-announcement until we have done > these changes ? To replace all the linked lists is intrusive, and it > may > take weeks re-stabilize the code. Otherwise, see my comments below. > > Regards /jon > It is difficult to say what the reaction will be, but I suggest you look over the links Mark sent and see what you think. It is your code after all. Using the common list code does make it easy to follow the code and we did find a bug recently. Using the standard list macros would have prevented that bug. Daniel |
From: Mark H. <ma...@os...> - 2004-04-29 15:31:50
|
On Thu, 2004-04-29 at 08:15, Jon Maloy wrote: > Do you suggest that we delay the LKML-announcement until we have done > these changes ? To replace all the linked lists is intrusive, and it > may > take weeks re-stabilize the code. Otherwise, see my comments below. > > Regards /jon > [ ... ] > > There shouldn't be ifdefs in .c code > The ones that are there now are for excluding code that should be > configurable > from the Kconfig file. Is there any other way ? I think that this is supposed to be done in header files. Or in some cases they aren't needed. I don't think that the ifdef MODULE code is needed, for instance, since module.h contains the ifdef inside to do the right thing. > > You may have seen documents like these already, but I found a few > > style/how-to documents on the web for linux kernel/driver code that may > > be helpful: > > > > http://graphics.cs.ucdavis.edu/~brettw/insight/linuxcodingstyle.html > > http://www.linuxjournal.com/article.php?sid=5780 > > http://www.linuxdevices.com/articles/AT5340618290.html > > http://people.redhat.com/arjanv/olspaper.pdf > > > > Also, I think that in the long run, that the 2.4/2.6 ifdef code will > I see there is one I forgot to remove in driver.c, otherwise I think > this is already > done. You are right. I didn't count how many there were. -- Mark Haverkamp <ma...@os...> |
From: Jon M. <jon...@er...> - 2004-04-29 15:15:53
|
Do you suggest that we delay the LKML-announcement until we have done these changes ? To replace all the linked lists is intrusive, and it may take weeks re-stabilize the code. Otherwise, see my comments below. Regards /jon Mark Haverkamp wrote: On Tue, 2004-04-27 at 16:58, Jon Maloy wrote: Hi all, I just uploaded a new file release to SourceForge. I have corrected several bug related to message bundling and link changeover, plus a very serious lock bug that sometimes caused my processors to hang when they lost contact with each other. I also corrected a bug in the name/network subscription code, so you will now receive an event for all overlapping, already existing publications, not only the first one found ;-). Some left-out symbols were finally exported as they should. [ ... ] Also, I plan to announce TIPC at the LKML by the end of this week. We must admit that the code is still in beta status, but as I understand it this should be no problem. There are still a few things that I think will have to be addressed from a style/structure point of view before requesting that tipc be considered for inclusion in the main kernel tree. Some files still have non-standard indentation (name_table.c for instance). There is a shell script in the kernel tree called Lindent that runs indent to format source files. I ran Lindent over all the code a couple of months ago, but some code has been added since then. This should be an easy task. The style documents that I have seen say to use the list_head macros everywhere and not use other methods of linked lists. I generally use linear linked lists, with a zero "prev" pointer for the first element and a zero "next" pointer for the last, while the the macros support only circular lists, as far as I have seen. I have accepted that we may use this list support, but have been reluctant to change it in already working code, because of the hazard such a redesign involves. In some cases, like the link's send queue, I think this is impractical and will cost performance. Let's put this on our TODO list, but fuurther stabilization must have first priority now. There shouldn't be ifdefs in .c code The ones that are there now are for excluding code that should be configurable from the Kconfig file. Is there any other way ? You may have seen documents like these already, but I found a few style/how-to documents on the web for linux kernel/driver code that may be helpful: http://graphics.cs.ucdavis.edu/~brettw/insight/linuxcodingstyle.html <http://graphics.cs.ucdavis.edu/~brettw/insight/linuxcodingstyle.html> http://www.linuxjournal.com/article.php?sid=5780 <http://www.linuxjournal.com/article.php?sid=5780> http://www.linuxdevices.com/articles/AT5340618290.html <http://www.linuxdevices.com/articles/AT5340618290.html> http://people.redhat.com/arjanv/olspaper.pdf <http://people.redhat.com/arjanv/olspaper.pdf> Also, I think that in the long run, that the 2.4/2.6 ifdef code will I see there is one I forgot to remove in driver.c, otherwise I think this is already done. have to be removed and the macro wrappers for things like kmalloc(k_malloc) will have to be removed. When you send an announcement, You should also send to ne...@os... <mailto:ne...@os...> where linux network code is discussed. |
From: Mark H. <ma...@os...> - 2004-04-29 14:47:32
|
On Tue, 2004-04-27 at 16:58, Jon Maloy wrote: > Hi all, > I just uploaded a new file release to SourceForge. > I have corrected several bug related to message bundling and > link changeover, plus a very serious lock bug that sometimes > caused my processors to hang when they lost contact with each > other. > I also corrected a bug in the name/network subscription code, > so you will now receive an event for all overlapping, already > existing publications, not only the first one found ;-). > Some left-out symbols were finally exported as they should. [ ... ] > Also, I plan to announce TIPC at the LKML by the end of this week. We must > admit that the code is still in beta status, but as I understand it this > should > be no problem. There are still a few things that I think will have to be addressed from a style/structure point of view before requesting that tipc be considered for inclusion in the main kernel tree. Some files still have non-standard indentation (name_table.c for instance). There is a shell script in the kernel tree called Lindent that runs indent to format source files. The style documents that I have seen say to use the list_head macros everywhere and not use other methods of linked lists. There shouldn't be ifdefs in .c code You may have seen documents like these already, but I found a few style/how-to documents on the web for linux kernel/driver code that may be helpful: http://graphics.cs.ucdavis.edu/~brettw/insight/linuxcodingstyle.html http://www.linuxjournal.com/article.php?sid=5780 http://www.linuxdevices.com/articles/AT5340618290.html http://people.redhat.com/arjanv/olspaper.pdf Also, I think that in the long run, that the 2.4/2.6 ifdef code will have to be removed and the macro wrappers for things like kmalloc(k_malloc) will have to be removed. When you send an announcement, You should also send to ne...@os... where linux network code is discussed. -- Mark Haverkamp <ma...@os...> |
From: Mark H. <ma...@os...> - 2004-04-28 21:53:16
|
On Wed, 2004-04-28 at 13:01, Jon Maloy wrote: > /jon > > Mark Haverkamp wrote: > > On Tue, 2004-04-27 at 16:58, Jon Maloy wrote: > > > > > Hi all, > > > I just uploaded a new file release to SourceForge. > > > > > > > > Has anybody tested the management interface all the way (Mark?) > > > > > I've been trying it out. I'm still having trouble in some > > circumstances. Sometimes, while the tipc benchmark program is running, > > and I try to get information from the management interface I'll get > > stuck waiting in poll. If I kill the server side while stuck, the > > client side will freeze and requires a reboot. If I kill the program > > waiting on the management interface first and then kill the server side > > program, I have no problems. I haven't gotten too far into figuring out > > what is going on with this one yet but it sounds like a lock problem. > > Especially since it only seems to happen with SMP. > This may be one of the problems I solved in tipc-1.3.10: If you kill a > node while > there are pending connections to it, the auto-disconnect at the other > end will hit > the node-lock a second time in the same thread, in > "nodesub_unsubscribe()". > I fixed this by making it unecessary to unlink the node-subscriber > objects > within the "handle_node_down()" upcall, -all such subscriptions are > one-shot > anyway. > The solution is not totally satisfactory, because the "abort_self" > call and > consequenctly the dispatcher upcall is called with the node lock set. > I found no better solution right now, and it works. > > Do you still have this problem with tipc-1.3.10 ? I am seeing this with the latest cvs code. Mark. -- Mark Haverkamp <ma...@os...> |
From: Jon M. <jon...@er...> - 2004-04-28 20:01:38
|
/jon Mark Haverkamp wrote: On Tue, 2004-04-27 at 16:58, Jon Maloy wrote: Hi all, I just uploaded a new file release to SourceForge. Has anybody tested the management interface all the way (Mark?) I've been trying it out. I'm still having trouble in some circumstances. Sometimes, while the tipc benchmark program is running, and I try to get information from the management interface I'll get stuck waiting in poll. If I kill the server side while stuck, the client side will freeze and requires a reboot. If I kill the program waiting on the management interface first and then kill the server side program, I have no problems. I haven't gotten too far into figuring out what is going on with this one yet but it sounds like a lock problem. Especially since it only seems to happen with SMP. This may be one of the problems I solved in tipc-1.3.10: If you kill a node while there are pending connections to it, the auto-disconnect at the other end will hit the node-lock a second time in the same thread, in "nodesub_unsubscribe()". I fixed this by making it unecessary to unlink the node-subscriber objects within the "handle_node_down()" upcall, -all such subscriptions are one-shot anyway. The solution is not totally satisfactory, because the "abort_self" call and consequenctly the dispatcher upcall is called with the node lock set. I found no better solution right now, and it works. Do you still have this problem with tipc-1.3.10 ? Has anybody tried the SOCK_STREAM interface yet ? What is the status of the multicast code ? (there were some discussions about who should receive the messages last week, -has this been followed up with corrections) ? The reliable broadcast code ? Are there any known bugs/problems that have not been corrected yet. I have enclosed a couple small patches that were found while debugging access to the management interface while running the tipc benchmark program. It looks like a lock is not dropped sometimes in nametbl_withdraw. Also we ran into a situation where a port is dropped from the congested list but is still referenced in the chain. This was causing us to panic if the referenced port was deleted, and then the referencing port was deleted while still congested. Good. I am pretty sure I have seen that problem, but only once. Let's hope it is solved now. cvs diff -u name_table.c Index: name_table.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/name_table.c,v retrieving revision 1.13 diff -u -r1.13 name_table.c --- name_table.c 27 Apr 2004 22:44:43 -0000 1.13 +++ name_table.c 28 Apr 2004 17:50:36 -0000 @@ -907,6 +907,7 @@ kfree(publ); return 1; } + write_unlock_bh(&nametbl_lock); return 0; } cvs diff -u link.c Index: link.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/link.c,v retrieving revision 1.18 diff -u -r1.18 link.c --- link.c 27 Apr 2004 22:35:25 -0000 1.18 +++ link.c 28 Apr 2004 17:51:02 -0000 @@ -474,6 +474,14 @@ port = next; } this->first_waiting_port = port; + + /* + * Make sure that this port isn't pointing at + * any port just removed from congestion + */ + if (port) { + port->prev_waiting = 0; + } exit: spin_unlock_bh(&port_lock); } |
From: Mark H. <ma...@os...> - 2004-04-28 18:13:01
|
On Tue, 2004-04-27 at 16:58, Jon Maloy wrote: > Hi all, > I just uploaded a new file release to SourceForge. > Has anybody tested the management interface all the way (Mark?) I've been trying it out. I'm still having trouble in some circumstances. Sometimes, while the tipc benchmark program is running, and I try to get information from the management interface I'll get stuck waiting in poll. If I kill the server side while stuck, the client side will freeze and requires a reboot. If I kill the program waiting on the management interface first and then kill the server side program, I have no problems. I haven't gotten too far into figuring out what is going on with this one yet but it sounds like a lock problem. Especially since it only seems to happen with SMP. > Has anybody tried the SOCK_STREAM interface yet ? > What is the status of the multicast code ? (there were some discussions > about who should receive the messages last week, -has this been followed up > with corrections) ? > The reliable broadcast code ? > Are there any known bugs/problems that have not been corrected yet. I have enclosed a couple small patches that were found while debugging access to the management interface while running the tipc benchmark program. It looks like a lock is not dropped sometimes in nametbl_withdraw. Also we ran into a situation where a port is dropped from the congested list but is still referenced in the chain. This was causing us to panic if the referenced port was deleted, and then the referencing port was deleted while still congested. cvs diff -u name_table.c Index: name_table.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/name_table.c,v retrieving revision 1.13 diff -u -r1.13 name_table.c --- name_table.c 27 Apr 2004 22:44:43 -0000 1.13 +++ name_table.c 28 Apr 2004 17:50:36 -0000 @@ -907,6 +907,7 @@ kfree(publ); return 1; } + write_unlock_bh(&nametbl_lock); return 0; } cvs diff -u link.c Index: link.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/link.c,v retrieving revision 1.18 diff -u -r1.18 link.c --- link.c 27 Apr 2004 22:35:25 -0000 1.18 +++ link.c 28 Apr 2004 17:51:02 -0000 @@ -474,6 +474,14 @@ port = next; } this->first_waiting_port = port; + + /* + * Make sure that this port isn't pointing at + * any port just removed from congestion + */ + if (port) { + port->prev_waiting = 0; + } exit: spin_unlock_bh(&port_lock); } -- Mark Haverkamp <ma...@os...> |
From: Daniel M. <da...@os...> - 2004-04-28 17:40:33
|
Jon, Thanks for the update. Mark and I have been testing TIPC and been been hitting a few problems when sending large packets and then sending to the management report. If the returned data was larger than a packet, the machine would reboot. This was caused by an incorrect fragment number. Your latest update fixed this problem. Mark has couple small patches coming that fixes a couple of other things we found. Daniel |
From: Jon M. <jon...@er...> - 2004-04-27 23:58:30
|
Hi all, I just uploaded a new file release to SourceForge. I have corrected several bug related to message bundling and link changeover, plus a very serious lock bug that sometimes caused my processors to hang when they lost contact with each other. I also corrected a bug in the name/network subscription code, so you will now receive an event for all overlapping, already existing publications, not only the first one found ;-). Some left-out symbols were finally exported as they should. There are still problems, and strange behaviour that puzzles me, but it is getting stabler by the day. Among the problems I see: ---When I run the benchmark program, there seems to be a much wider time lapse between the termination of the first process and the last one for a certain message size than I would expect. The benchmark runs to the end without problems, but this does not look right, and influences the benchmark result. --- Even apart from the above, performance seems to be poorer than in the old version (the 1.2-line) , for no obvious reason. With the code changes I have done, I would expect about the same performence. At least on SMP the figures look bad, despite the fine lock granularity we have now. This must be investigated. I have not done any comparative measurements on the same hardware and same kernel with the two TIPC versions, so this is just an impression I have, but the figures worry me. Anybody feeling a vocation here ? Also, I plan to announce TIPC at the LKML by the end of this week. We must admit that the code is still in beta status, but as I understand it this should be no problem. In relation to this, I would like to have a better overview of the code status. Has anybody tested the management interface all the way (Mark?) Has anybody tried the SOCK_STREAM interface yet ? What is the status of the multicast code ? (there were some discussions about who should receive the messages last week, -has this been followed up with corrections) ? The reliable broadcast code ? Are there any known bugs/problems that have not been corrected yet. Regards /jon |
From: Guo, M. <mi...@in...> - 2004-04-23 02:14:34
|
Index: recvbcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v retrieving revision 1.15 diff -u -r1.15 recvbcast.c --- recvbcast.c 22 Apr 2004 07:06:59 -0000 1.15 +++ recvbcast.c 23 Apr 2004 02:09:55 -0000 @@ -233,7 +233,7 @@ */ static void recaculate_gap(struct link* this) { - struct sk_buff *buf; + struct sk_buff *buf,*buf_next; struct node *owner; owner =3D this->owner; @@ -242,8 +242,9 @@ while(buf && msg_seqno(buf_msg(buf)) =3D=3D owner->last_in_bcast = + 1) { owner->last_in_bcast++; owner->deferred_inqueue_sz--; + buf_next =3D buf_next(buf); bcast_port_recv(buf); - buf =3D buf_next(buf); + buf =3D buf_next; } if(buf){ owner->deferred_in =3D buf; Thanks Guo Min=20 The content of this email message solely contains my own personal views, and not those of my employer. |
From: Guo, M. <mi...@in...> - 2004-04-22 08:01:00
|
Hi,Jon The attached is the bug fix and code clean up for retransmission, but we still need more investigation and debug. You can open the retransmission debug code in recvbcast.c and do the testing. It is more stable! + Add one bcastlink member in link structure. + release the buf in bcastlink if needed in tipc_recv_msg + Bug fix in recv part + Bug fix in send part. =09 Thanks Guo Min=20 The content of this email message solely contains my own personal views, and not those of my employer. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: recvbcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v retrieving revision 1.11 retrieving revision 1.14 diff -u -r1.11 -r1.14 --- recvbcast.c 16 Apr 2004 04:03:46 -0000 1.11 +++ recvbcast.c 21 Apr 2004 02:34:41 -0000 1.14 @@ -166,7 +179,7 @@ * Input: ackno: the acked packet seqno * Return: void */ -static void bnode_outqueue_release(int ackno) +void bnode_outqueue_release(int ackno) { struct sk_buff *buf; =09 @@ -295,34 +308,30 @@ exp_seq =3D owner->last_in_bcast + 1;=09 defered_size =3D owner->deferred_inqueue_sz; gap =3D owner->gap;=09 - dbg("-------recv bcast data seqno %d\n",msg_seqno(msg));=09 - if(exp_seq !=3D msg_seqno(msg)) { - dbg("recv bcast data exp_seq is %d\n",exp_seq); - dbg("recv bcast data seqno %d\n",msg_seqno(msg));=09 - buf_safe_discard(buf); - return; =09 - } + printk("-------recv bcast data seqno %d\n",msg_seqno(msg));=09 + printk("recv bcast data exp_seq is %d\n",exp_seq); + printk("recv bcast data seqno %d\n",msg_seqno(msg));=09 =09 if (msg_seqno(msg) =3D=3D exp_seq) { spin_lock_bh(&owner->lock);=09 owner->last_in_bcast =3D exp_seq; spin_unlock_bh(&owner->lock);=09 - exp_seq++; if(gap !=3D 0) { recaculate_gap(this); } bcast_port_recv(buf); =09 - //if (match_address_4(msg, tipc_own_addr)) - request_retransmit(this, gap); + if (match_address_4(msg, tipc_own_addr)) + request_retransmit(this, gap); =09 } - /*else if(msg_seqno(msg) < exp_seq) { + else if(msg_seqno(msg) < exp_seq) { dbg("discard duplicate message, seq:%d", msg_seqno(msg)); buf_discard(buf); return;=09 =09 }else{ + return; if(bcast_deferred_queue_add(this,buf)) { recaculate_gap(this); if(match_address_3(msg, tipc_own_addr) && defered_size =3D=3D 1 ) {=20 @@ -331,7 +340,7 @@ request_retransmit(this, gap); } } - }*/=09 + }=09 =20 } /** @@ -344,11 +353,15 @@ static void recv_bcast_restransmit(struct link* this,struct sk_buff *buf) { struct sk_buff *obuf; + struct tipc_msg *msg; uint pos =3D INT_H_SIZE;=09 struct node* owner; - + printk("recv_bcast_retransmit\n"); owner =3D this->owner; obuf =3D buf_extract(buf, pos);=09 + printk("buf_extract"); + msg =3D buf_msg(obuf); + printk("the size is %d\n", msg_hdr_sz(msg)); recv_bcast_data(this, obuf); buf_safe_discard(buf); } @@ -370,7 +383,6 @@ int ackno =3D msg_bcast_ack(buf_msg(buf)); int gap; dbg("---recv bcast state ack no=3D %d\n ",ackno); -// bnode_outqueue_release(ackno); this->owner->acked_bcast =3D ackno; btlink =3D find_blink(this->bearer);=09 if (btlink) @@ -450,7 +462,7 @@ for (crs =3D &nodes;*crs;crs =3D &(*crs)->next) { if (!in_own_cluster((*crs)->addr))=20 continue; -// dbg("the crs's acked number %d\n",(*crs) ->acked_bcast); + if ( less((*crs) ->acked_bcast, min_acked_bcast)) min_acked_bcast =3D (*crs) ->acked_bcast; =09 @@ -490,8 +502,6 @@ recv_bcast_restransmit(this,buf); break; case STATE_MSG: - dbg("BCAST_MSG"); - tipc_dump_head(msg); recv_bcast_state(this,buf); break; =09 default: @@ -519,7 +529,7 @@ if (false =3D=3D nametbl_self_translate(&mc_head,msg_nametype(msg),\ msg_namelower(msg),msg_nameupper(msg))) { buf_safe_discard(buf); - dbg("get TIPC_ERR_NO_PORT\n"); =09 + printk("get TIPC_ERR_NO_PORT\n"); return TIPC_ERR_NO_PORT; } res =3D nameseq_deliver(buf,&mc_head); Index: bcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v retrieving revision 1.14 retrieving revision 1.18 diff -u -r1.14 -r1.18 --- bcast.c 16 Apr 2004 04:03:46 -0000 1.14 +++ bcast.c 21 Apr 2004 02:34:41 -0000 1.18 @@ -136,6 +152,9 @@ =20 for (;i<MAX_BEARERS;i++) linkset[i] =3D NULL; + for(i=3D0;i<MAX_NODES;i++) + retrans_nodes[i] =3D NULL; + } =20 =20 @@ -310,7 +329,7 @@ blink->bitmap[i] =3D 0; INIT_LIST_HEAD(&blink->list); blink->mask =3D (tipc_addr(tipc_zone(tipc_own_addr),tipc_cluster(tipc_own_addr),0));=09 - memset(blink->bitmap, 0, MAX_NODES*sizeof(unsigned long)); + memset(blink->bitmap, 0, sizeof(blink->bitmap)); list_add_tail(&(blink->list),&blink_head); return blink; =09 @@ -366,7 +385,7 @@ buf_set_next(buf,tbuf); node->deferred_in =3D buf;=09 node->deferred_inqueue_sz++; - }else if(msg_seqno(buf_msg(tbuf)) =3D=3D msg_seqno(buf_msg(buf))){ + }else if(msg_seqno(buf_msg(pbuf)) =3D=3D msg_seqno(buf_msg(buf))){ buf_safe_discard(buf); return false; }else{ @@ -427,8 +446,8 @@ int i =3D 0,prev_destnode;=09 struct mc_identity* mid; =09 + prev_destnode =3D 0; list_for_each(pos,mc_head) { - prev_destnode =3D 0; mid =3D list_entry(pos,struct mc_identity,list); if (mid !=3D NULL && (prev_destnode !=3D mid->node)){ prev_destnode =3D mid->node; @@ -795,7 +814,6 @@ void bcast_recv_timeout() { - return; send_timer_ref =3D 0; check_bcast_outqueue(); timeout_retransmit(); @@ -832,59 +850,59 @@ =20 void datamsghead_dump(struct tipc_msg * p) { - dbg("Version:%d\n", msg_version(p)); - dbg( "User:%d \n", msg_user(p)); - dbg( "Headsize:%d\n", msg_hdr_sz(p)); - dbg( "Message Size:%d\n", msg_size(p)); - dbg( "Link level ack Seq no:%d\n", msg_ack(p)); - dbg( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); - dbg( "Send Seq:%d\n", msg_seqno(p)); - dbg( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); - dbg( "Orignate Port:%X\n", msg_origport(p)); - dbg( "Desting Port:%X\n", msg_destport(p)); + printk("Version:%d\n", msg_version(p)); + printk( "User:%d \n", msg_user(p)); + printk( "Headsize:%d\n", msg_hdr_sz(p)); + printk( "Message Size:%d\n", msg_size(p)); + printk( "Link level ack Seq no:%d\n", msg_ack(p)); + printk( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); + printk( "Send Seq:%d\n", msg_seqno(p)); + printk( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); + printk( "Orignate Port:%X\n", msg_origport(p)); + printk( "Desting Port:%X\n", msg_destport(p)); if (msg_hdr_sz(p) <=3D 24) return; - dbg( "Message Type:%d\n", msg_type(p)); - dbg( "Error Code:%d\n", msg_errcode(p)); - dbg( "Reroute Count:%d\n", msg_reroute_cnt(p)); - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); + printk( "Message Type:%d\n", msg_type(p)); + printk( "Error Code:%d\n", msg_errcode(p)); + printk( "Reroute Count:%d\n", msg_reroute_cnt(p)); + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); + printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); if (msg_hdr_sz(p) <=3D 32) return; - dbg( "Port Name Type:%d\n", msg_nametype(p)); - dbg( "Port Name Instance:%d\n", msg_namelower(p)); + printk( "Port Name Type:%d\n", msg_nametype(p)); + printk( "Port Name Instance:%d\n", msg_namelower(p)); if (msg_hdr_sz(p) <=3D 40) return; - dbg( "Port Name Instance:%d\n", msg_nameupper(p)); + printk( "Port Name Instance:%d\n", msg_nameupper(p)); } =20 =20 void intermsghead_dump(struct tipc_msg* p) { - dbg( "Version:%d\n", msg_version(p)); - dbg( "User:%d \n", msg_user(p)); - dbg( "Headsize:%d\n", msg_hdr_sz(p)); - dbg( "Broadcast ack no:%d\n", msg_bcast_ack(p)); - dbg( "Message Size:%d\n", msg_size(p)); - dbg( "Link Ack Seq:%d\n", msg_ack(p)); - dbg( "Send Seq:%d\n", msg_seqno(p)); - dbg( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); - dbg( "importance :%d\n", msg_importance(p)); - dbg( "Link selector :%d\n", msg_link_selector(p)); - dbg( "Message Count :%d\n", msg_msgcnt(p)); - dbg( "Probe:%d\n", msg_probe(p)); - dbg( "Bearer identity:%d\n", msg_bearer_id(p)); - dbg( "Link selector :%d\n", msg_link_selector(p)); + printk( "Version:%d\n", msg_version(p)); + printk( "User:%d \n", msg_user(p)); + printk( "Headsize:%d\n", msg_hdr_sz(p)); + printk( "Broadcast ack no:%d\n", msg_bcast_ack(p)); + printk( "Message Size:%d\n", msg_size(p)); + printk( "Link Ack Seq:%d\n", msg_ack(p)); + printk( "Send Seq:%d\n", msg_seqno(p)); + printk( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); + printk( "importance :%d\n", msg_importance(p)); + printk( "Link selector :%d\n", msg_link_selector(p)); + printk( "Message Count :%d\n", msg_msgcnt(p)); + printk( "Probe:%d\n", msg_probe(p)); + printk( "Bearer identity:%d\n", msg_bearer_id(p)); + printk( "Link selector :%d\n", msg_link_selector(p)); if (msg_hdr_sz(p) < 20) return; - dbg( "Message Type:%d\n", msg_type(p)); - dbg( "Sequence Gap:%d\n", msg_seq_gap(p)); =20 - dbg( "Next Send Packet:%d\n", msg_next_bcast(p)); - dbg( "Next Send Packet:%d\n", msg_next_sent(p)); + printk( "Message Type:%d\n", msg_type(p)); + printk( "Sequence Gap:%d\n", msg_seq_gap(p)); =20 + printk( "Next Send Packet:%d\n", msg_next_bcast(p)); + printk( "Next Send Packet:%d\n", msg_next_sent(p)); if (msg_hdr_sz(p) <=3D 32 ) return; - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); + printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); =20 } void tipc_dump_head(struct tipc_msg *pmsg) Index: sendbcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/sendbcast.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- sendbcast.c 16 Apr 2004 04:03:46 -0000 1.11 +++ sendbcast.c 20 Apr 2004 06:52:54 -0000 1.12 @@ -296,15 +299,9 @@ } =09 for (i =3D 0; i < blinkset->linkcount ; i++) { -// copybuf =3D buf_clone(buf); res =3D blink_send_buf_fast(buf, &(blinkset->blink[i]->link)); =20 - =09 -// if (res<0) -// buf_discard(copybuf);=09 } -// buf_discard(buf); =09 - // res =3D tipc_bsend_buf_fast(buf, &(blinkset->blink[i]->link)); return res; } =20 @@ -529,8 +526,8 @@ if (!in_own_cluster((*crs)->addr))=20 continue; if ( less((*crs) ->acked_bcast,lastseq)){ - count++; retrans_nodes[count] =3D *crs; + count++; }=09 =09 } @@ -555,30 +552,49 @@ struct tipc_msg *msg =3D buf_msg(buf); =20 printk("=3D=3Dretransmit:%d\n", lastseq); - return; firstseq =3D msg_seqno(msg); count =3D retrans_member_count(lastseq); - if (count =3D=3D 0) - return; -=09 - if(count > REPLICA_NODES){ + + if(count > 8){ for(i =3D 0; i < MAX_BEARERS; i++) { if (linkset[i] !=3D NULL) blinksets =3D linkset[i]; - for( j =3D 0;j < blinksets->linkcount;j++) - broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); }=09 + for( j =3D 0;j < blinksets->linkcount;j++) + broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); + =09 } else { for (i=3D0;i<count;i++){ - pnode =3D retrans_nodes[i]; + pnode =3D retrans_nodes[i];=09 + if (!likely(pnode) ) + { + printk("pnode is null\n"); + continue; + } + else + printk("pnode is %d\n",pnode->addr); + =09 + if (!likely(msg)){ + printk("bcast_send_retransmits port=3D%d\n",msg_origport(msg)); + return; + } + else + printk("bcast_send_retransmits port=3D%d\n",msg_origport(msg)); + read_lock_bh(&net_lock); this =3D link_lock_select(pnode->addr, msg_origport(msg)); + if (this) + spin_unlock_bh(&this->owner->lock); =20 + read_unlock_bh(&net_lock); if (unlikely(!this)) + { + printk("no link found\n"); continue; + }=09 bcast_link_retransmit(this, buf, lastseq); =09 } - }=09 + } =09 =09 } =20 @@ -620,6 +636,50 @@ this->retransm_queue_head =3D this->retransm_queue_size =3D 0; } =20 +void +blink_tunnel(struct link *this,=20 + struct tipc_msg *tunnel_hdr,=20 + struct tipc_msg *msg) +{ + struct link *tunnel; + struct sk_buff *buf; + uint length =3D msg_size(msg); + int res =3D 0; +=09 + tunnel =3D this->owner->active_links[msg_link_selector(msg)];=09 + if (!likely(tunnel)){ + printk("the tunnel is null\n"); + return; + }=09 + if (!link_is_up(this)) + return; + msg_set_size(tunnel_hdr, length + INT_H_SIZE); + buf =3D buf_acquire(length + INT_H_SIZE); + msg_set_seqno(tunnel_hdr, mod(tunnel->next_out_no++)); + msg_set_ack(tunnel_hdr, mod(tunnel->next_in_no - 1)); + msg_set_bcast_ack(tunnel_hdr,tunnel->owner->last_in_bcast);=20 + msg_set_user(tunnel_hdr,BCAST_PROTOCOL);=09 + buf_copy_append(buf,0, (unchar *) tunnel_hdr, INT_H_SIZE); + buf_copy_append(buf,INT_H_SIZE,(unchar*)msg, length); + printk("%c->%c:",this->bearer->net_plane,tunnel->bearer->net_plane);=09 + printk("the link name is :%s\n" , tunnel->name); + + printk( "the queue_size is %d\n", tunnel->out_queue_size); + printk("the queue limit is %d\n",tunnel->queue_limit[0]); + //assert(tunnel); + if (tunnel){ + if (bearer_send(tunnel->bearer, buf, &tunnel->media_addr)) { + printk("bearer send\n"); + tunnel->stats.retransmitted++; + } else { + printk("bearer scheule\n"); + bearer_schedule(tunnel->bearer, this); + return; + } + }=09 + printk("link tunnel--tunnel_hdr\n"); +} + /** * Tunel the buffer in the broadcast packet and retransmit it * Input parameters: this: link @@ -633,18 +693,21 @@ =20 int ackseq; struct tipc_msg tunnel_hdr; - + struct tipc_msg *msg =3D buf_msg(buf); +=09 ackseq =3D this->owner->last_in_bcast; =20 msg_init(&tunnel_hdr,BCAST_PROTOCOL, BCAST_MSG, TIPC_OK,INT_H_SIZE, this->addr); =20 + spin_lock_bh(&bcast_outqueue.lock); msg_set_msgcnt(&tunnel_hdr, 1); for (; less_eq(msg_seqno(buf_msg(buf)), lastseq);buf =3D buf->next) { if(less_eq(msg_seqno(buf_msg(buf)), ackseq)) continue; + blink_tunnel(this,&tunnel_hdr,buf_msg(buf)); link_tunnel(this, &tunnel_hdr, buf_msg(buf)); /* The link may reset here, if extreme overload */ if(likely(this->owner)) { <<retransmit_bug_fix.patch>>=20 |
From: Guo, M. <mi...@in...> - 2004-04-22 00:00:50
|
Yes, I will do some code clean up later and wish can fix a critical BUG found in yesterday! Jon Maloy wrote: > Hi, > To avoid code duplication, I suggest that you use the existing > msg_print() in msg.c, instead og defining your own dump functions. > Her you get almost everything you want already, but you may > have to extend the function with a couple of switches. > Then you will have a function that will dump the header > correctly from anywhere within the code, without having to > know the message type in advance. This also makes it possible > to use the internal log, which is useful for long-time tests. >=20 > If you only want to print to the console, and don't want to > use my debug macros, just type e.g. msg_print(CONS,msg,"Your text"); >=20 > otherwise the standard usage is >=20 > #define DBG_OUTPUT CONS > (at the beginning of the file, or just before the function you want > to debug) ..... > msg_dbg(msg,"Your text"); > ..... > #define DBG_OUTPUT 0 > (if you want to shut off debugging for the rest of the file) >=20 > Cheers /jon >=20 > Guo, Min wrote: >=20 >> the tipc retransmit patch for RM. >>=20 >> Index: recvbcast.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v >> retrieving revision 1.11 retrieving revision 1.14 >> diff -u -r1.11 -r1.14 >> --- recvbcast.c 16 Apr 2004 04:03:46 -0000 1.11 >> +++ recvbcast.c 21 Apr 2004 02:34:41 -0000 1.14 >> @@ -166,7 +179,7 @@ >> * Input: ackno: the acked packet seqno >> * Return: void >> */ >> -static void bnode_outqueue_release(int ackno) >> +void bnode_outqueue_release(int ackno) >> { >> struct sk_buff *buf; >>=20 >> @@ -295,34 +308,30 @@ >> exp_seq =3D owner->last_in_bcast + 1; >> defered_size =3D owner->deferred_inqueue_sz; >> gap =3D owner->gap; >> - dbg("-------recv bcast data seqno %d\n",msg_seqno(msg)); >> - if(exp_seq !=3D msg_seqno(msg)) { >> - dbg("recv bcast data exp_seq is %d\n",exp_seq); >> - dbg("recv bcast data seqno %d\n",msg_seqno(msg)); >> - buf_safe_discard(buf); >> - return; >> - } >> + printk("-------recv bcast data seqno %d\n",msg_seqno(msg)); >> + printk("recv bcast data exp_seq is %d\n",exp_seq); >> + printk("recv bcast data seqno %d\n",msg_seqno(msg)); >>=20 >> if (msg_seqno(msg) =3D=3D exp_seq) { >> spin_lock_bh(&owner->lock); >> owner->last_in_bcast =3D exp_seq; >> spin_unlock_bh(&owner->lock); >> - exp_seq++; >> if(gap !=3D 0) { >> recaculate_gap(this); >> } >> bcast_port_recv(buf); >>=20 >> - //if (match_address_4(msg, tipc_own_addr)) >> - request_retransmit(this, gap); >> + if (match_address_4(msg, tipc_own_addr)) >> + request_retransmit(this, gap); >>=20 >> } >> - /*else if(msg_seqno(msg) < exp_seq) { >> + else if(msg_seqno(msg) < exp_seq) { >> dbg("discard duplicate message, seq:%d", msg_seqno(msg)); >> buf_discard(buf); return; >>=20 >> }else{ >> + return; >> if(bcast_deferred_queue_add(this,buf)) { >> recaculate_gap(this); >> if(match_address_3(msg, tipc_own_addr) > && defered_size =3D=3D 1 ) { @@ >> -331,7 +340,7 @@ >> request_retransmit(this, gap); >> } >> } >> - }*/ >> + } >>=20 >> } >> /** >> @@ -344,11 +353,15 @@ >> static void recv_bcast_restransmit(struct link* this,struct sk_buff >> *buf) { >> struct sk_buff *obuf; >> + struct tipc_msg *msg; >> uint pos =3D INT_H_SIZE; >> struct node* owner; >> - >> + printk("recv_bcast_retransmit\n"); >> owner =3D this->owner; >> obuf =3D buf_extract(buf, pos); >> + printk("buf_extract"); >> + msg =3D buf_msg(obuf); >> + printk("the size is %d\n", msg_hdr_sz(msg)); >> recv_bcast_data(this, obuf); >> buf_safe_discard(buf); >> } >> @@ -370,7 +383,6 @@ >> int ackno =3D msg_bcast_ack(buf_msg(buf)); >> int gap; >> dbg("---recv bcast state ack no=3D %d\n ",ackno); >> -// bnode_outqueue_release(ackno); >> this->owner->acked_bcast =3D ackno; >> btlink =3D find_blink(this->bearer); >> if (btlink) >> @@ -450,7 +462,7 @@ >> for (crs =3D &nodes;*crs;crs =3D &(*crs)->next) { >> if (!in_own_cluster((*crs)->addr)) >> continue; >> -// dbg("the crs's acked number %d\n",(*crs) ->acked_bcast); + >> if ( less((*crs) ->acked_bcast, min_acked_bcast)) >> min_acked_bcast =3D (*crs) ->acked_bcast; >>=20 >> @@ -490,8 +502,6 @@ >> recv_bcast_restransmit(this,buf); >> break; >> case STATE_MSG: >> - dbg("BCAST_MSG"); >> - tipc_dump_head(msg); >> recv_bcast_state(this,buf); >> break; >> default: >> @@ -519,7 +529,7 @@ >> if (false =3D=3D nametbl_self_translate(&mc_head,msg_nametype(msg),\ >> msg_namelower(msg),msg_nameupper(msg))) { >> buf_safe_discard(buf); >> - dbg("get TIPC_ERR_NO_PORT\n"); >> + printk("get TIPC_ERR_NO_PORT\n"); >>=20 >> return TIPC_ERR_NO_PORT; >> } >> res =3D nameseq_deliver(buf,&mc_head); >> Index: bcast.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v >> retrieving revision 1.14 retrieving revision 1.18 >> diff -u -r1.14 -r1.18 >> --- bcast.c 16 Apr 2004 04:03:46 -0000 1.14 >> +++ bcast.c 21 Apr 2004 02:34:41 -0000 1.18 >> @@ -136,6 +152,9 @@ >>=20 >> for (;i<MAX_BEARERS;i++) >> linkset[i] =3D NULL; >> + for(i=3D0;i<MAX_NODES;i++) >> + retrans_nodes[i] =3D NULL; >> + >> } >>=20 >>=20 >> @@ -310,7 +329,7 @@ >> blink->bitmap[i] =3D 0; >> INIT_LIST_HEAD(&blink->list); >> blink->mask =3D >> (tipc_addr(tipc_zone(tipc_own_addr),tipc_cluster(tipc_own_addr),0)); >> - memset(blink->bitmap, 0, MAX_NODES*sizeof(unsigned long)); >> + memset(blink->bitmap, 0, sizeof(blink->bitmap)); >> list_add_tail(&(blink->list),&blink_head); >> return blink; >>=20 >> @@ -366,7 +385,7 @@ >> buf_set_next(buf,tbuf); >> node->deferred_in =3D buf; >> node->deferred_inqueue_sz++; >> - }else if(msg_seqno(buf_msg(tbuf)) =3D=3D msg_seqno(buf_msg(buf))){ >> + }else if(msg_seqno(buf_msg(pbuf)) =3D=3D msg_seqno(buf_msg(buf))){ >> buf_safe_discard(buf); return false; >> }else{ >> @@ -427,8 +446,8 @@ >> int i =3D 0,prev_destnode; >> struct mc_identity* mid; >>=20 >> + prev_destnode =3D 0; >> list_for_each(pos,mc_head) { >> - prev_destnode =3D 0; >> mid =3D list_entry(pos,struct mc_identity,list); >> if (mid !=3D NULL && (prev_destnode !=3D mid->node)){ prev_destnode >> =3D mid->node; @@ -795,7 +814,6 @@ >> void >> bcast_recv_timeout() >> { >> - return; >> send_timer_ref =3D 0; >> check_bcast_outqueue(); >> timeout_retransmit(); >> @@ -832,59 +850,59 @@ >>=20 >> void datamsghead_dump(struct tipc_msg * p) { >> - dbg("Version:%d\n", msg_version(p)); >> - dbg( "User:%d \n", msg_user(p)); >> - dbg( "Headsize:%d\n", msg_hdr_sz(p)); >> - dbg( "Message Size:%d\n", msg_size(p)); >> - dbg( "Link level ack Seq no:%d\n", msg_ack(p)); >> - dbg( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); >> - dbg( "Send Seq:%d\n", msg_seqno(p)); >> - dbg( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); >> - dbg( "Orignate Port:%X\n", msg_origport(p)); >> - dbg( "Desting Port:%X\n", msg_destport(p)); >> + printk("Version:%d\n", msg_version(p)); >> + printk( "User:%d \n", msg_user(p)); >> + printk( "Headsize:%d\n", msg_hdr_sz(p)); >> + printk( "Message Size:%d\n", msg_size(p)); >> + printk( "Link level ack Seq no:%d\n", msg_ack(p)); >> + printk( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); >> + printk( "Send Seq:%d\n", msg_seqno(p)); >> + printk( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); >> + printk( "Orignate Port:%X\n", msg_origport(p)); >> + printk( "Desting Port:%X\n", msg_destport(p)); if >> (msg_hdr_sz(p) <=3D 24) return; >> - dbg( "Message Type:%d\n", msg_type(p)); >> - dbg( "Error Code:%d\n", msg_errcode(p)); >> - dbg( "Reroute Count:%d\n", msg_reroute_cnt(p)); >> - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >> - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); >> + printk( "Message Type:%d\n", msg_type(p)); >> + printk( "Error Code:%d\n", msg_errcode(p)); >> + printk( "Reroute Count:%d\n", msg_reroute_cnt(p)); >> + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >> + printk( "Destination Processor:%d\n", >> tipc_node(msg_destnode(p))); if (msg_hdr_sz(p) <=3D 32) >> return;=20 >> - dbg( "Port Name Type:%d\n", msg_nametype(p)); >> - dbg( "Port Name Instance:%d\n", msg_namelower(p)); >> + printk( "Port Name Type:%d\n", msg_nametype(p)); >> + printk( "Port Name Instance:%d\n", msg_namelower(p)); if >> (msg_hdr_sz(p) <=3D 40) return; >> - dbg( "Port Name Instance:%d\n", msg_nameupper(p)); >> + printk( "Port Name Instance:%d\n", msg_nameupper(p)); } >>=20 >>=20 >> void intermsghead_dump(struct tipc_msg* p) { >> - dbg( "Version:%d\n", msg_version(p)); >> - dbg( "User:%d \n", msg_user(p)); >> - dbg( "Headsize:%d\n", msg_hdr_sz(p)); >> - dbg( "Broadcast ack no:%d\n", msg_bcast_ack(p)); >> - dbg( "Message Size:%d\n", msg_size(p)); >> - dbg( "Link Ack Seq:%d\n", msg_ack(p)); >> - dbg( "Send Seq:%d\n", msg_seqno(p)); >> - dbg( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); >> - dbg( "importance :%d\n", msg_importance(p)); >> - dbg( "Link selector :%d\n", msg_link_selector(p)); >> - dbg( "Message Count :%d\n", msg_msgcnt(p)); >> - dbg( "Probe:%d\n", msg_probe(p)); >> - dbg( "Bearer identity:%d\n", msg_bearer_id(p)); >> - dbg( "Link selector :%d\n", msg_link_selector(p)); >> + printk( "Version:%d\n", msg_version(p)); >> + printk( "User:%d \n", msg_user(p)); >> + printk( "Headsize:%d\n", msg_hdr_sz(p)); >> + printk( "Broadcast ack no:%d\n", msg_bcast_ack(p)); >> + printk( "Message Size:%d\n", msg_size(p)); >> + printk( "Link Ack Seq:%d\n", msg_ack(p)); >> + printk( "Send Seq:%d\n", msg_seqno(p)); >> + printk( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); >> + printk( "importance :%d\n", msg_importance(p)); >> + printk( "Link selector :%d\n", msg_link_selector(p)); >> + printk( "Message Count :%d\n", msg_msgcnt(p)); >> + printk( "Probe:%d\n", msg_probe(p)); >> + printk( "Bearer identity:%d\n", msg_bearer_id(p)); >> + printk( "Link selector :%d\n", msg_link_selector(p)); if >> (msg_hdr_sz(p) < 20) return; >> - dbg( "Message Type:%d\n", msg_type(p)); >> - dbg( "Sequence Gap:%d\n", msg_seq_gap(p)); >> - dbg( "Next Send Packet:%d\n", msg_next_bcast(p)); >> - dbg( "Next Send Packet:%d\n", msg_next_sent(p)); >> + printk( "Message Type:%d\n", msg_type(p)); >> + printk( "Sequence Gap:%d\n", msg_seq_gap(p)); >> + printk( "Next Send Packet:%d\n", msg_next_bcast(p)); >> + printk( "Next Send Packet:%d\n", msg_next_sent(p)); if >> (msg_hdr_sz(p) <=3D 32 ) return; >> - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >> - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); >> + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >> + printk( "Destination Processor:%d\n", >> tipc_node(msg_destnode(p)));=20 >>=20 >> } >> void tipc_dump_head(struct tipc_msg *pmsg) >> Index: sendbcast.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvsroot/tipc/source/unstable/net/tipc/sendbcast.c,v >> retrieving revision 1.11 retrieving revision 1.12 >> diff -u -r1.11 -r1.12 >> --- sendbcast.c 16 Apr 2004 04:03:46 -0000 1.11 >> +++ sendbcast.c 20 Apr 2004 06:52:54 -0000 1.12 >> @@ -296,15 +299,9 @@ >> } >>=20 >> for (i =3D 0; i < blinkset->linkcount ; i++) { >> -// copybuf =3D buf_clone(buf); >> res =3D blink_send_buf_fast(buf, &(blinkset->blink[i]->link)); >>=20 >> - >> -// if (res<0) >> -// buf_discard(copybuf); >> } >> -// buf_discard(buf); >> - // res =3D tipc_bsend_buf_fast(buf, &(blinkset->blink[i]->link)); = >> return res; } >>=20 >> @@ -529,8 +526,8 @@ >> if (!in_own_cluster((*crs)->addr)) >> continue; >> if ( less((*crs) ->acked_bcast,lastseq)){ >> - count++; >> retrans_nodes[count] =3D *crs; >> + count++; >> } >>=20 >> } >> @@ -555,30 +552,49 @@ >> struct tipc_msg *msg =3D buf_msg(buf); >>=20 >> printk("=3D=3Dretransmit:%d\n", lastseq); >> - return; >> firstseq =3D msg_seqno(msg); >> count =3D retrans_member_count(lastseq); >> - if (count =3D=3D 0) >> - return; >> - >> - if(count > REPLICA_NODES){ >> + >> + if(count > 8){ >> for(i =3D 0; i < MAX_BEARERS; i++) { >> if (linkset[i] !=3D NULL) >> blinksets =3D linkset[i]; >> - for( j =3D 0;j < blinksets->linkcount;j++) >> - >> broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); >>=20 >> } >> + for( j =3D 0;j < blinksets->linkcount;j++) >> + >> broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); >>=20 >> + >> } >> else { >> for (i=3D0;i<count;i++){ >> - pnode =3D retrans_nodes[i]; >> + pnode =3D retrans_nodes[i]; >> + if (!likely(pnode) ) >> + { >> + printk("pnode is null\n"); >> + continue; >> + } >> + else >> + printk("pnode is %d\n",pnode->addr); >> + >> + if (!likely(msg)){ >> + printk("bcast_send_retransmits >> port=3D%d\n",msg_origport(msg)); >> + return; >> + } >> + else >> + printk("bcast_send_retransmits >> port=3D%d\n",msg_origport(msg)); >> + read_lock_bh(&net_lock); >> this =3D link_lock_select(pnode->addr, msg_origport(msg)); + if >> (this) + spin_unlock_bh(&this->owner->lock); >> + read_unlock_bh(&net_lock); >> if (unlikely(!this)) >> + { >> + printk("no link found\n"); >> continue; >> + } >> bcast_link_retransmit(this, buf, lastseq); >>=20 >> } >> - } >> + } >>=20 >> } >>=20 >> @@ -620,6 +636,50 @@ >> this->retransm_queue_head =3D this->retransm_queue_size =3D 0; } >>=20 >> +void >> +blink_tunnel(struct link *this, >> + struct tipc_msg *tunnel_hdr, >> + struct tipc_msg *msg) >> +{ >> + struct link *tunnel; >> + struct sk_buff *buf; >> + uint length =3D msg_size(msg); >> + int res =3D 0; >> + >> + tunnel =3D this->owner->active_links[msg_link_selector(msg)]; + if >> (!likely(tunnel)){ + printk("the tunnel is null\n"); >> + return; >> + } >> + if (!link_is_up(this)) >> + return; >> + msg_set_size(tunnel_hdr, length + INT_H_SIZE); >> + buf =3D buf_acquire(length + INT_H_SIZE); >> + msg_set_seqno(tunnel_hdr, mod(tunnel->next_out_no++)); >> + msg_set_ack(tunnel_hdr, mod(tunnel->next_in_no - 1)); >> + msg_set_bcast_ack(tunnel_hdr,tunnel->owner->last_in_bcast); >> + msg_set_user(tunnel_hdr,BCAST_PROTOCOL); >> + buf_copy_append(buf,0, (unchar *) tunnel_hdr, INT_H_SIZE); >> + buf_copy_append(buf,INT_H_SIZE,(unchar*)msg, length); + >> printk("%c->%c:",this->bearer->net_plane,tunnel->bearer->net_plane); >> + printk("the link name is :%s\n" , tunnel->name); >> + >> + printk( "the queue_size is %d\n", tunnel->out_queue_size); >> + printk("the queue limit is %d\n",tunnel->queue_limit[0]); >> + //assert(tunnel); + if (tunnel){ >> + if (bearer_send(tunnel->bearer, buf, >> &tunnel->media_addr)) { >> + printk("bearer send\n"); >> + tunnel->stats.retransmitted++; >> + } else { >> + printk("bearer scheule\n"); >> + bearer_schedule(tunnel->bearer, this); >> + return; >> + } >> + } >> + printk("link tunnel--tunnel_hdr\n"); >> +} >> + >> /** >> * Tunel the buffer in the broadcast packet and retransmit it >> * Input parameters: this: link >> @@ -633,18 +693,21 @@ >>=20 >> int ackseq; >> struct tipc_msg tunnel_hdr; >> - >> + struct tipc_msg *msg =3D buf_msg(buf); >> + >> ackseq =3D this->owner->last_in_bcast; >>=20 >> msg_init(&tunnel_hdr,BCAST_PROTOCOL, >> BCAST_MSG, TIPC_OK,INT_H_SIZE, this->addr); >>=20 >> + >> spin_lock_bh(&bcast_outqueue.lock); >> msg_set_msgcnt(&tunnel_hdr, 1); >> for (; less_eq(msg_seqno(buf_msg(buf)), lastseq);buf =3D >> buf->next) { >> if(less_eq(msg_seqno(buf_msg(buf)), ackseq)) >> continue; >> + blink_tunnel(this,&tunnel_hdr,buf_msg(buf)); >>=20 >> link_tunnel(this, &tunnel_hdr, buf_msg(buf)); >> /* The link may reset here, if extreme overload */ >> if(likely(this->owner)) { |
From: Jon M. <jon...@er...> - 2004-04-21 17:14:54
|
Hi Mark, It is actually specified, in chapter 2.2.6, page 21.=20 Anyway, your interpretation is correct: all sockets bound to an overlapping sequence should have exactly one copy of the message. This also means that if a socket is bound to more than=20 one sequence overlapping with the multicast address it should still only receive one copy. So you have to look for found entries pointing=20 to the same port, and filter out duplicates, before actually delivering=20 the message. /Jon Mark Haverkamp wrote: On Sat, 2004-04-17 at 10:38, Ling, Xiaofeng wrote: =20 Thanks for your good suggestion. some comments below. =20 -----Original Message----- From: Daniel McNeil [ mailto:da...@os... <mailto:da...@os...> ]=20 Sent: 2004=E5=B9=B44=E6=9C=8816=E6=97=A5 23:14 To: Ling, Xiaofeng; Guo, Min Cc: Jon Maloy; Mark Haverkamp; tipc Subject: RE: [Tipc-discussion] Re: tipc multicast patch Hi, We have not tested > 8 nodes, yet. We could test that code by changing the check (we currently have 4 nodes) to a lower=20 number. Do you want us to do this? How/why was the number '8' chosen for broadcast? =20 8 is just a suggested number in the RFC, maybe the more feasible way is to make=20 it configurable module parameter. Or a dynamic number adjustable with the total nodes in the cluster. That could be TODO itme. =20 Also, Mark and I notice some interesting behavior of the mulicast: If 2 processes on the same node publish the same port name=20 sequence, a multicast only goes 1 process on the local node=20 (we have not tried remote yet). Is this the intended=20 behavior? Should all processes on all nodes get it? (I do=20 not know if your latest check-in affects this behavior) =20 In TIPCv1, what I understand is 2 processes on one node can not open the same port name sequence, on two or more node, only one node will get the a message sent to this port name, that can be treated as a load balance. As for multicast, maybe this rule can also be applying. Of cause,this also depends on application mode. =20 I tried this out with your updated mcast code and it seems to work OK.=20 I published the same port name sequence from two processes on a node and was able to receive a multicast message to each process. This seems to me like the right thing to do. Jon, I looked at your RFC and didn't see this kind of behavior specified one way or the other. What do you think is the right thing to do? Thanks, Mark. =20 =20 Thanks, Daniel =20 |
From: Jon M. <jon...@er...> - 2004-04-21 14:22:15
|
Hi, To avoid code duplication, I suggest that you use the existing msg_print() in msg.c, instead og defining your own dump functions. Her you get almost everything you want already, but you may have to extend the function with a couple of switches. Then you will have a function that will dump the header correctly from anywhere within the code, without having to know the message type in advance. This also makes it possible to use the internal log, which is useful for long-time tests. If you only want to print to the console, and don't want to use my debug macros, just type e.g. msg_print(CONS,msg,"Your text"); otherwise the standard usage is #define DBG_OUTPUT CONS (at the beginning of the file, or just before the function you want to debug) ..... msg_dbg(msg,"Your text"); ..... #define DBG_OUTPUT 0 (if you want to shut off debugging for the rest of the file) Cheers /jon Guo, Min wrote: >the tipc retransmit patch for RM. > >Index: recvbcast.c >=================================================================== >RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v >retrieving revision 1.11 >retrieving revision 1.14 >diff -u -r1.11 -r1.14 >--- recvbcast.c 16 Apr 2004 04:03:46 -0000 1.11 >+++ recvbcast.c 21 Apr 2004 02:34:41 -0000 1.14 >@@ -166,7 +179,7 @@ > * Input: ackno: the acked packet seqno > * Return: void > */ >-static void bnode_outqueue_release(int ackno) >+void bnode_outqueue_release(int ackno) > { > struct sk_buff *buf; > >@@ -295,34 +308,30 @@ > exp_seq = owner->last_in_bcast + 1; > defered_size = owner->deferred_inqueue_sz; > gap = owner->gap; >- dbg("-------recv bcast data seqno %d\n",msg_seqno(msg)); >- if(exp_seq != msg_seqno(msg)) { >- dbg("recv bcast data exp_seq is %d\n",exp_seq); >- dbg("recv bcast data seqno %d\n",msg_seqno(msg)); >- buf_safe_discard(buf); >- return; >- } >+ printk("-------recv bcast data seqno %d\n",msg_seqno(msg)); >+ printk("recv bcast data exp_seq is %d\n",exp_seq); >+ printk("recv bcast data seqno %d\n",msg_seqno(msg)); > > if (msg_seqno(msg) == exp_seq) { > spin_lock_bh(&owner->lock); > owner->last_in_bcast = exp_seq; > spin_unlock_bh(&owner->lock); >- exp_seq++; > if(gap != 0) { > recaculate_gap(this); > } > bcast_port_recv(buf); > >- //if (match_address_4(msg, tipc_own_addr)) >- request_retransmit(this, gap); >+ if (match_address_4(msg, tipc_own_addr)) >+ request_retransmit(this, gap); > > } >- /*else if(msg_seqno(msg) < exp_seq) { >+ else if(msg_seqno(msg) < exp_seq) { > dbg("discard duplicate message, seq:%d", >msg_seqno(msg)); > buf_discard(buf); > return; > > }else{ >+ return; > if(bcast_deferred_queue_add(this,buf)) { > recaculate_gap(this); > if(match_address_3(msg, tipc_own_addr) && >defered_size == 1 ) { >@@ -331,7 +340,7 @@ > request_retransmit(this, gap); > } > } >- }*/ >+ } > > } > /** >@@ -344,11 +353,15 @@ > static void recv_bcast_restransmit(struct link* this,struct sk_buff >*buf) > { > struct sk_buff *obuf; >+ struct tipc_msg *msg; > uint pos = INT_H_SIZE; > struct node* owner; >- >+ printk("recv_bcast_retransmit\n"); > owner = this->owner; > obuf = buf_extract(buf, pos); >+ printk("buf_extract"); >+ msg = buf_msg(obuf); >+ printk("the size is %d\n", msg_hdr_sz(msg)); > recv_bcast_data(this, obuf); > buf_safe_discard(buf); > } >@@ -370,7 +383,6 @@ > int ackno = msg_bcast_ack(buf_msg(buf)); > int gap; > dbg("---recv bcast state ack no= %d\n ",ackno); >-// bnode_outqueue_release(ackno); > this->owner->acked_bcast = ackno; > btlink = find_blink(this->bearer); > if (btlink) >@@ -450,7 +462,7 @@ > for (crs = &nodes;*crs;crs = &(*crs)->next) { > if (!in_own_cluster((*crs)->addr)) > continue; >-// dbg("the crs's acked number %d\n",(*crs) ->acked_bcast); >+ > if ( less((*crs) ->acked_bcast, min_acked_bcast)) > min_acked_bcast = (*crs) ->acked_bcast; > >@@ -490,8 +502,6 @@ > recv_bcast_restransmit(this,buf); > break; > case STATE_MSG: >- dbg("BCAST_MSG"); >- tipc_dump_head(msg); > recv_bcast_state(this,buf); > break; > default: >@@ -519,7 +529,7 @@ > if (false == nametbl_self_translate(&mc_head,msg_nametype(msg),\ > msg_namelower(msg),msg_nameupper(msg))) { > buf_safe_discard(buf); >- dbg("get TIPC_ERR_NO_PORT\n"); >+ printk("get TIPC_ERR_NO_PORT\n"); > > return TIPC_ERR_NO_PORT; > } > res = nameseq_deliver(buf,&mc_head); >Index: bcast.c >=================================================================== >RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v >retrieving revision 1.14 >retrieving revision 1.18 >diff -u -r1.14 -r1.18 >--- bcast.c 16 Apr 2004 04:03:46 -0000 1.14 >+++ bcast.c 21 Apr 2004 02:34:41 -0000 1.18 >@@ -136,6 +152,9 @@ > > for (;i<MAX_BEARERS;i++) > linkset[i] = NULL; >+ for(i=0;i<MAX_NODES;i++) >+ retrans_nodes[i] = NULL; >+ > } > > >@@ -310,7 +329,7 @@ > blink->bitmap[i] = 0; > INIT_LIST_HEAD(&blink->list); > blink->mask = >(tipc_addr(tipc_zone(tipc_own_addr),tipc_cluster(tipc_own_addr),0)); >- memset(blink->bitmap, 0, MAX_NODES*sizeof(unsigned long)); >+ memset(blink->bitmap, 0, sizeof(blink->bitmap)); > list_add_tail(&(blink->list),&blink_head); > return blink; > >@@ -366,7 +385,7 @@ > buf_set_next(buf,tbuf); > node->deferred_in = buf; > node->deferred_inqueue_sz++; >- }else if(msg_seqno(buf_msg(tbuf)) == msg_seqno(buf_msg(buf))){ >+ }else if(msg_seqno(buf_msg(pbuf)) == msg_seqno(buf_msg(buf))){ > buf_safe_discard(buf); > return false; > }else{ >@@ -427,8 +446,8 @@ > int i = 0,prev_destnode; > struct mc_identity* mid; > >+ prev_destnode = 0; > list_for_each(pos,mc_head) { >- prev_destnode = 0; > mid = list_entry(pos,struct mc_identity,list); > if (mid != NULL && (prev_destnode != mid->node)){ > prev_destnode = mid->node; >@@ -795,7 +814,6 @@ > void > bcast_recv_timeout() > { >- return; > send_timer_ref = 0; > check_bcast_outqueue(); > timeout_retransmit(); >@@ -832,59 +850,59 @@ > > void datamsghead_dump(struct tipc_msg * p) > { >- dbg("Version:%d\n", msg_version(p)); >- dbg( "User:%d \n", msg_user(p)); >- dbg( "Headsize:%d\n", msg_hdr_sz(p)); >- dbg( "Message Size:%d\n", msg_size(p)); >- dbg( "Link level ack Seq no:%d\n", msg_ack(p)); >- dbg( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); >- dbg( "Send Seq:%d\n", msg_seqno(p)); >- dbg( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); >- dbg( "Orignate Port:%X\n", msg_origport(p)); >- dbg( "Desting Port:%X\n", msg_destport(p)); >+ printk("Version:%d\n", msg_version(p)); >+ printk( "User:%d \n", msg_user(p)); >+ printk( "Headsize:%d\n", msg_hdr_sz(p)); >+ printk( "Message Size:%d\n", msg_size(p)); >+ printk( "Link level ack Seq no:%d\n", msg_ack(p)); >+ printk( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); >+ printk( "Send Seq:%d\n", msg_seqno(p)); >+ printk( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); >+ printk( "Orignate Port:%X\n", msg_origport(p)); >+ printk( "Desting Port:%X\n", msg_destport(p)); > if (msg_hdr_sz(p) <= 24) > return; >- dbg( "Message Type:%d\n", msg_type(p)); >- dbg( "Error Code:%d\n", msg_errcode(p)); >- dbg( "Reroute Count:%d\n", msg_reroute_cnt(p)); >- dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >- dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); >+ printk( "Message Type:%d\n", msg_type(p)); >+ printk( "Error Code:%d\n", msg_errcode(p)); >+ printk( "Reroute Count:%d\n", msg_reroute_cnt(p)); >+ printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >+ printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); > if (msg_hdr_sz(p) <= 32) > return; >- dbg( "Port Name Type:%d\n", msg_nametype(p)); >- dbg( "Port Name Instance:%d\n", msg_namelower(p)); >+ printk( "Port Name Type:%d\n", msg_nametype(p)); >+ printk( "Port Name Instance:%d\n", msg_namelower(p)); > if (msg_hdr_sz(p) <= 40) > return; >- dbg( "Port Name Instance:%d\n", msg_nameupper(p)); >+ printk( "Port Name Instance:%d\n", msg_nameupper(p)); > } > > > void intermsghead_dump(struct tipc_msg* p) > { >- dbg( "Version:%d\n", msg_version(p)); >- dbg( "User:%d \n", msg_user(p)); >- dbg( "Headsize:%d\n", msg_hdr_sz(p)); >- dbg( "Broadcast ack no:%d\n", msg_bcast_ack(p)); >- dbg( "Message Size:%d\n", msg_size(p)); >- dbg( "Link Ack Seq:%d\n", msg_ack(p)); >- dbg( "Send Seq:%d\n", msg_seqno(p)); >- dbg( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); >- dbg( "importance :%d\n", msg_importance(p)); >- dbg( "Link selector :%d\n", msg_link_selector(p)); >- dbg( "Message Count :%d\n", msg_msgcnt(p)); >- dbg( "Probe:%d\n", msg_probe(p)); >- dbg( "Bearer identity:%d\n", msg_bearer_id(p)); >- dbg( "Link selector :%d\n", msg_link_selector(p)); >+ printk( "Version:%d\n", msg_version(p)); >+ printk( "User:%d \n", msg_user(p)); >+ printk( "Headsize:%d\n", msg_hdr_sz(p)); >+ printk( "Broadcast ack no:%d\n", msg_bcast_ack(p)); >+ printk( "Message Size:%d\n", msg_size(p)); >+ printk( "Link Ack Seq:%d\n", msg_ack(p)); >+ printk( "Send Seq:%d\n", msg_seqno(p)); >+ printk( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); >+ printk( "importance :%d\n", msg_importance(p)); >+ printk( "Link selector :%d\n", msg_link_selector(p)); >+ printk( "Message Count :%d\n", msg_msgcnt(p)); >+ printk( "Probe:%d\n", msg_probe(p)); >+ printk( "Bearer identity:%d\n", msg_bearer_id(p)); >+ printk( "Link selector :%d\n", msg_link_selector(p)); > if (msg_hdr_sz(p) < 20) > return; >- dbg( "Message Type:%d\n", msg_type(p)); >- dbg( "Sequence Gap:%d\n", msg_seq_gap(p)); >- dbg( "Next Send Packet:%d\n", msg_next_bcast(p)); >- dbg( "Next Send Packet:%d\n", msg_next_sent(p)); >+ printk( "Message Type:%d\n", msg_type(p)); >+ printk( "Sequence Gap:%d\n", msg_seq_gap(p)); >+ printk( "Next Send Packet:%d\n", msg_next_bcast(p)); >+ printk( "Next Send Packet:%d\n", msg_next_sent(p)); > if (msg_hdr_sz(p) <= 32 ) > return; >- dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >- dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); >+ printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); >+ printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); > > } > void tipc_dump_head(struct tipc_msg *pmsg) >Index: sendbcast.c >=================================================================== >RCS file: /cvsroot/tipc/source/unstable/net/tipc/sendbcast.c,v >retrieving revision 1.11 >retrieving revision 1.12 >diff -u -r1.11 -r1.12 >--- sendbcast.c 16 Apr 2004 04:03:46 -0000 1.11 >+++ sendbcast.c 20 Apr 2004 06:52:54 -0000 1.12 >@@ -296,15 +299,9 @@ > } > > for (i = 0; i < blinkset->linkcount ; i++) { >-// copybuf = buf_clone(buf); > res = blink_send_buf_fast(buf, >&(blinkset->blink[i]->link)); > >- >-// if (res<0) >-// buf_discard(copybuf); > } >-// buf_discard(buf); >- // res = tipc_bsend_buf_fast(buf, &(blinkset->blink[i]->link)); > return res; > } > >@@ -529,8 +526,8 @@ > if (!in_own_cluster((*crs)->addr)) > continue; > if ( less((*crs) ->acked_bcast,lastseq)){ >- count++; > retrans_nodes[count] = *crs; >+ count++; > } > > } >@@ -555,30 +552,49 @@ > struct tipc_msg *msg = buf_msg(buf); > > printk("==retransmit:%d\n", lastseq); >- return; > firstseq = msg_seqno(msg); > count = retrans_member_count(lastseq); >- if (count == 0) >- return; >- >- if(count > REPLICA_NODES){ >+ >+ if(count > 8){ > for(i = 0; i < MAX_BEARERS; i++) { > if (linkset[i] != NULL) > blinksets = linkset[i]; >- for( j = 0;j < blinksets->linkcount;j++) >- >broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); > > } >+ for( j = 0;j < blinksets->linkcount;j++) >+ >broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); > >+ > } > else { > for (i=0;i<count;i++){ >- pnode = retrans_nodes[i]; >+ pnode = retrans_nodes[i]; >+ if (!likely(pnode) ) >+ { >+ printk("pnode is null\n"); >+ continue; >+ } >+ else >+ printk("pnode is %d\n",pnode->addr); >+ >+ if (!likely(msg)){ >+ printk("bcast_send_retransmits >port=%d\n",msg_origport(msg)); >+ return; >+ } >+ else >+ printk("bcast_send_retransmits >port=%d\n",msg_origport(msg)); >+ read_lock_bh(&net_lock); > this = link_lock_select(pnode->addr, >msg_origport(msg)); >+ if (this) >+ spin_unlock_bh(&this->owner->lock); >+ read_unlock_bh(&net_lock); > if (unlikely(!this)) >+ { >+ printk("no link found\n"); > continue; >+ } > bcast_link_retransmit(this, buf, lastseq); > > } >- } >+ } > > } > >@@ -620,6 +636,50 @@ > this->retransm_queue_head = this->retransm_queue_size = 0; > } > >+void >+blink_tunnel(struct link *this, >+ struct tipc_msg *tunnel_hdr, >+ struct tipc_msg *msg) >+{ >+ struct link *tunnel; >+ struct sk_buff *buf; >+ uint length = msg_size(msg); >+ int res = 0; >+ >+ tunnel = this->owner->active_links[msg_link_selector(msg)]; >+ if (!likely(tunnel)){ >+ printk("the tunnel is null\n"); >+ return; >+ } >+ if (!link_is_up(this)) >+ return; >+ msg_set_size(tunnel_hdr, length + INT_H_SIZE); >+ buf = buf_acquire(length + INT_H_SIZE); >+ msg_set_seqno(tunnel_hdr, mod(tunnel->next_out_no++)); >+ msg_set_ack(tunnel_hdr, mod(tunnel->next_in_no - 1)); >+ msg_set_bcast_ack(tunnel_hdr,tunnel->owner->last_in_bcast); >+ msg_set_user(tunnel_hdr,BCAST_PROTOCOL); >+ buf_copy_append(buf,0, (unchar *) tunnel_hdr, INT_H_SIZE); >+ buf_copy_append(buf,INT_H_SIZE,(unchar*)msg, length); >+ >printk("%c->%c:",this->bearer->net_plane,tunnel->bearer->net_plane); >+ printk("the link name is :%s\n" , tunnel->name); >+ >+ printk( "the queue_size is %d\n", tunnel->out_queue_size); >+ printk("the queue limit is %d\n",tunnel->queue_limit[0]); >+ //assert(tunnel); >+ if (tunnel){ >+ if (bearer_send(tunnel->bearer, buf, >&tunnel->media_addr)) { >+ printk("bearer send\n"); >+ tunnel->stats.retransmitted++; >+ } else { >+ printk("bearer scheule\n"); >+ bearer_schedule(tunnel->bearer, this); >+ return; >+ } >+ } >+ printk("link tunnel--tunnel_hdr\n"); >+} >+ > /** > * Tunel the buffer in the broadcast packet and retransmit it > * Input parameters: this: link >@@ -633,18 +693,21 @@ > > int ackseq; > struct tipc_msg tunnel_hdr; >- >+ struct tipc_msg *msg = buf_msg(buf); >+ > ackseq = this->owner->last_in_bcast; > > msg_init(&tunnel_hdr,BCAST_PROTOCOL, > BCAST_MSG, TIPC_OK,INT_H_SIZE, this->addr); > >+ > spin_lock_bh(&bcast_outqueue.lock); > msg_set_msgcnt(&tunnel_hdr, 1); > for (; less_eq(msg_seqno(buf_msg(buf)), lastseq);buf = >buf->next) { > if(less_eq(msg_seqno(buf_msg(buf)), ackseq)) > continue; >+ blink_tunnel(this,&tunnel_hdr,buf_msg(buf)); > > link_tunnel(this, &tunnel_hdr, buf_msg(buf)); > /* The link may reset here, if extreme overload */ > if(likely(this->owner)) { > > |
From: Guo, M. <mi...@in...> - 2004-04-21 03:40:54
|
the tipc retransmit patch for RM. Index: recvbcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v retrieving revision 1.11 retrieving revision 1.14 diff -u -r1.11 -r1.14 --- recvbcast.c 16 Apr 2004 04:03:46 -0000 1.11 +++ recvbcast.c 21 Apr 2004 02:34:41 -0000 1.14 @@ -166,7 +179,7 @@ * Input: ackno: the acked packet seqno * Return: void */ -static void bnode_outqueue_release(int ackno) +void bnode_outqueue_release(int ackno) { struct sk_buff *buf; =09 @@ -295,34 +308,30 @@ exp_seq =3D owner->last_in_bcast + 1;=09 defered_size =3D owner->deferred_inqueue_sz; gap =3D owner->gap;=09 - dbg("-------recv bcast data seqno %d\n",msg_seqno(msg));=09 - if(exp_seq !=3D msg_seqno(msg)) { - dbg("recv bcast data exp_seq is %d\n",exp_seq); - dbg("recv bcast data seqno %d\n",msg_seqno(msg));=09 - buf_safe_discard(buf); - return; =09 - } + printk("-------recv bcast data seqno %d\n",msg_seqno(msg));=09 + printk("recv bcast data exp_seq is %d\n",exp_seq); + printk("recv bcast data seqno %d\n",msg_seqno(msg));=09 =09 if (msg_seqno(msg) =3D=3D exp_seq) { spin_lock_bh(&owner->lock);=09 owner->last_in_bcast =3D exp_seq; spin_unlock_bh(&owner->lock);=09 - exp_seq++; if(gap !=3D 0) { recaculate_gap(this); } bcast_port_recv(buf); =09 - //if (match_address_4(msg, tipc_own_addr)) - request_retransmit(this, gap); + if (match_address_4(msg, tipc_own_addr)) + request_retransmit(this, gap); =09 } - /*else if(msg_seqno(msg) < exp_seq) { + else if(msg_seqno(msg) < exp_seq) { dbg("discard duplicate message, seq:%d", msg_seqno(msg)); buf_discard(buf); return;=09 =09 }else{ + return; if(bcast_deferred_queue_add(this,buf)) { recaculate_gap(this); if(match_address_3(msg, tipc_own_addr) && defered_size =3D=3D 1 ) {=20 @@ -331,7 +340,7 @@ request_retransmit(this, gap); } } - }*/=09 + }=09 =20 } /** @@ -344,11 +353,15 @@ static void recv_bcast_restransmit(struct link* this,struct sk_buff *buf) { struct sk_buff *obuf; + struct tipc_msg *msg; uint pos =3D INT_H_SIZE;=09 struct node* owner; - + printk("recv_bcast_retransmit\n"); owner =3D this->owner; obuf =3D buf_extract(buf, pos);=09 + printk("buf_extract"); + msg =3D buf_msg(obuf); + printk("the size is %d\n", msg_hdr_sz(msg)); recv_bcast_data(this, obuf); buf_safe_discard(buf); } @@ -370,7 +383,6 @@ int ackno =3D msg_bcast_ack(buf_msg(buf)); int gap; dbg("---recv bcast state ack no=3D %d\n ",ackno); -// bnode_outqueue_release(ackno); this->owner->acked_bcast =3D ackno; btlink =3D find_blink(this->bearer);=09 if (btlink) @@ -450,7 +462,7 @@ for (crs =3D &nodes;*crs;crs =3D &(*crs)->next) { if (!in_own_cluster((*crs)->addr))=20 continue; -// dbg("the crs's acked number %d\n",(*crs) ->acked_bcast); + if ( less((*crs) ->acked_bcast, min_acked_bcast)) min_acked_bcast =3D (*crs) ->acked_bcast; =09 @@ -490,8 +502,6 @@ recv_bcast_restransmit(this,buf); break; case STATE_MSG: - dbg("BCAST_MSG"); - tipc_dump_head(msg); recv_bcast_state(this,buf); break; =09 default: @@ -519,7 +529,7 @@ if (false =3D=3D nametbl_self_translate(&mc_head,msg_nametype(msg),\ msg_namelower(msg),msg_nameupper(msg))) { buf_safe_discard(buf); - dbg("get TIPC_ERR_NO_PORT\n"); =09 + printk("get TIPC_ERR_NO_PORT\n"); return TIPC_ERR_NO_PORT; } res =3D nameseq_deliver(buf,&mc_head); Index: bcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v retrieving revision 1.14 retrieving revision 1.18 diff -u -r1.14 -r1.18 --- bcast.c 16 Apr 2004 04:03:46 -0000 1.14 +++ bcast.c 21 Apr 2004 02:34:41 -0000 1.18 @@ -136,6 +152,9 @@ =20 for (;i<MAX_BEARERS;i++) linkset[i] =3D NULL; + for(i=3D0;i<MAX_NODES;i++) + retrans_nodes[i] =3D NULL; + } =20 =20 @@ -310,7 +329,7 @@ blink->bitmap[i] =3D 0; INIT_LIST_HEAD(&blink->list); blink->mask =3D (tipc_addr(tipc_zone(tipc_own_addr),tipc_cluster(tipc_own_addr),0));=09 - memset(blink->bitmap, 0, MAX_NODES*sizeof(unsigned long)); + memset(blink->bitmap, 0, sizeof(blink->bitmap)); list_add_tail(&(blink->list),&blink_head); return blink; =09 @@ -366,7 +385,7 @@ buf_set_next(buf,tbuf); node->deferred_in =3D buf;=09 node->deferred_inqueue_sz++; - }else if(msg_seqno(buf_msg(tbuf)) =3D=3D msg_seqno(buf_msg(buf))){ + }else if(msg_seqno(buf_msg(pbuf)) =3D=3D msg_seqno(buf_msg(buf))){ buf_safe_discard(buf); return false; }else{ @@ -427,8 +446,8 @@ int i =3D 0,prev_destnode;=09 struct mc_identity* mid; =09 + prev_destnode =3D 0; list_for_each(pos,mc_head) { - prev_destnode =3D 0; mid =3D list_entry(pos,struct mc_identity,list); if (mid !=3D NULL && (prev_destnode !=3D mid->node)){ prev_destnode =3D mid->node; @@ -795,7 +814,6 @@ void bcast_recv_timeout() { - return; send_timer_ref =3D 0; check_bcast_outqueue(); timeout_retransmit(); @@ -832,59 +850,59 @@ =20 void datamsghead_dump(struct tipc_msg * p) { - dbg("Version:%d\n", msg_version(p)); - dbg( "User:%d \n", msg_user(p)); - dbg( "Headsize:%d\n", msg_hdr_sz(p)); - dbg( "Message Size:%d\n", msg_size(p)); - dbg( "Link level ack Seq no:%d\n", msg_ack(p)); - dbg( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); - dbg( "Send Seq:%d\n", msg_seqno(p)); - dbg( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); - dbg( "Orignate Port:%X\n", msg_origport(p)); - dbg( "Desting Port:%X\n", msg_destport(p)); + printk("Version:%d\n", msg_version(p)); + printk( "User:%d \n", msg_user(p)); + printk( "Headsize:%d\n", msg_hdr_sz(p)); + printk( "Message Size:%d\n", msg_size(p)); + printk( "Link level ack Seq no:%d\n", msg_ack(p)); + printk( "broadcast/link level seq no:%d\n", msg_bcast_ack(p)); + printk( "Send Seq:%d\n", msg_seqno(p)); + printk( "Previsous processor:%d\n", tipc_node(msg_prevnode(p))); + printk( "Orignate Port:%X\n", msg_origport(p)); + printk( "Desting Port:%X\n", msg_destport(p)); if (msg_hdr_sz(p) <=3D 24) return; - dbg( "Message Type:%d\n", msg_type(p)); - dbg( "Error Code:%d\n", msg_errcode(p)); - dbg( "Reroute Count:%d\n", msg_reroute_cnt(p)); - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); + printk( "Message Type:%d\n", msg_type(p)); + printk( "Error Code:%d\n", msg_errcode(p)); + printk( "Reroute Count:%d\n", msg_reroute_cnt(p)); + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); + printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); if (msg_hdr_sz(p) <=3D 32) return; - dbg( "Port Name Type:%d\n", msg_nametype(p)); - dbg( "Port Name Instance:%d\n", msg_namelower(p)); + printk( "Port Name Type:%d\n", msg_nametype(p)); + printk( "Port Name Instance:%d\n", msg_namelower(p)); if (msg_hdr_sz(p) <=3D 40) return; - dbg( "Port Name Instance:%d\n", msg_nameupper(p)); + printk( "Port Name Instance:%d\n", msg_nameupper(p)); } =20 =20 void intermsghead_dump(struct tipc_msg* p) { - dbg( "Version:%d\n", msg_version(p)); - dbg( "User:%d \n", msg_user(p)); - dbg( "Headsize:%d\n", msg_hdr_sz(p)); - dbg( "Broadcast ack no:%d\n", msg_bcast_ack(p)); - dbg( "Message Size:%d\n", msg_size(p)); - dbg( "Link Ack Seq:%d\n", msg_ack(p)); - dbg( "Send Seq:%d\n", msg_seqno(p)); - dbg( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); - dbg( "importance :%d\n", msg_importance(p)); - dbg( "Link selector :%d\n", msg_link_selector(p)); - dbg( "Message Count :%d\n", msg_msgcnt(p)); - dbg( "Probe:%d\n", msg_probe(p)); - dbg( "Bearer identity:%d\n", msg_bearer_id(p)); - dbg( "Link selector :%d\n", msg_link_selector(p)); + printk( "Version:%d\n", msg_version(p)); + printk( "User:%d \n", msg_user(p)); + printk( "Headsize:%d\n", msg_hdr_sz(p)); + printk( "Broadcast ack no:%d\n", msg_bcast_ack(p)); + printk( "Message Size:%d\n", msg_size(p)); + printk( "Link Ack Seq:%d\n", msg_ack(p)); + printk( "Send Seq:%d\n", msg_seqno(p)); + printk( "Previsous processor:%d\n",tipc_node(msg_prevnode(p))); + printk( "importance :%d\n", msg_importance(p)); + printk( "Link selector :%d\n", msg_link_selector(p)); + printk( "Message Count :%d\n", msg_msgcnt(p)); + printk( "Probe:%d\n", msg_probe(p)); + printk( "Bearer identity:%d\n", msg_bearer_id(p)); + printk( "Link selector :%d\n", msg_link_selector(p)); if (msg_hdr_sz(p) < 20) return; - dbg( "Message Type:%d\n", msg_type(p)); - dbg( "Sequence Gap:%d\n", msg_seq_gap(p)); =20 - dbg( "Next Send Packet:%d\n", msg_next_bcast(p)); - dbg( "Next Send Packet:%d\n", msg_next_sent(p)); + printk( "Message Type:%d\n", msg_type(p)); + printk( "Sequence Gap:%d\n", msg_seq_gap(p)); =20 + printk( "Next Send Packet:%d\n", msg_next_bcast(p)); + printk( "Next Send Packet:%d\n", msg_next_sent(p)); if (msg_hdr_sz(p) <=3D 32 ) return; - dbg( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); - dbg( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); + printk( "Orignate Processor:%d\n", tipc_node(msg_orignode(p))); + printk( "Destination Processor:%d\n", tipc_node(msg_destnode(p))); =20 } void tipc_dump_head(struct tipc_msg *pmsg) Index: sendbcast.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tipc/source/unstable/net/tipc/sendbcast.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- sendbcast.c 16 Apr 2004 04:03:46 -0000 1.11 +++ sendbcast.c 20 Apr 2004 06:52:54 -0000 1.12 @@ -296,15 +299,9 @@ } =09 for (i =3D 0; i < blinkset->linkcount ; i++) { -// copybuf =3D buf_clone(buf); res =3D blink_send_buf_fast(buf, &(blinkset->blink[i]->link)); =20 - =09 -// if (res<0) -// buf_discard(copybuf);=09 } -// buf_discard(buf); =09 - // res =3D tipc_bsend_buf_fast(buf, &(blinkset->blink[i]->link)); return res; } =20 @@ -529,8 +526,8 @@ if (!in_own_cluster((*crs)->addr))=20 continue; if ( less((*crs) ->acked_bcast,lastseq)){ - count++; retrans_nodes[count] =3D *crs; + count++; }=09 =09 } @@ -555,30 +552,49 @@ struct tipc_msg *msg =3D buf_msg(buf); =20 printk("=3D=3Dretransmit:%d\n", lastseq); - return; firstseq =3D msg_seqno(msg); count =3D retrans_member_count(lastseq); - if (count =3D=3D 0) - return; -=09 - if(count > REPLICA_NODES){ + + if(count > 8){ for(i =3D 0; i < MAX_BEARERS; i++) { if (linkset[i] !=3D NULL) blinksets =3D linkset[i]; - for( j =3D 0;j < blinksets->linkcount;j++) - broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); }=09 + for( j =3D 0;j < blinksets->linkcount;j++) + broadcast_retransmit(&(blinksets->blink[j]->link), buf, lastseq); + =09 } else { for (i=3D0;i<count;i++){ - pnode =3D retrans_nodes[i]; + pnode =3D retrans_nodes[i];=09 + if (!likely(pnode) ) + { + printk("pnode is null\n"); + continue; + } + else + printk("pnode is %d\n",pnode->addr); + =09 + if (!likely(msg)){ + printk("bcast_send_retransmits port=3D%d\n",msg_origport(msg)); + return; + } + else + printk("bcast_send_retransmits port=3D%d\n",msg_origport(msg)); + read_lock_bh(&net_lock); this =3D link_lock_select(pnode->addr, msg_origport(msg)); + if (this) + spin_unlock_bh(&this->owner->lock); =20 + read_unlock_bh(&net_lock); if (unlikely(!this)) + { + printk("no link found\n"); continue; + }=09 bcast_link_retransmit(this, buf, lastseq); =09 } - }=09 + } =09 =09 } =20 @@ -620,6 +636,50 @@ this->retransm_queue_head =3D this->retransm_queue_size =3D 0; } =20 +void +blink_tunnel(struct link *this,=20 + struct tipc_msg *tunnel_hdr,=20 + struct tipc_msg *msg) +{ + struct link *tunnel; + struct sk_buff *buf; + uint length =3D msg_size(msg); + int res =3D 0; +=09 + tunnel =3D this->owner->active_links[msg_link_selector(msg)];=09 + if (!likely(tunnel)){ + printk("the tunnel is null\n"); + return; + }=09 + if (!link_is_up(this)) + return; + msg_set_size(tunnel_hdr, length + INT_H_SIZE); + buf =3D buf_acquire(length + INT_H_SIZE); + msg_set_seqno(tunnel_hdr, mod(tunnel->next_out_no++)); + msg_set_ack(tunnel_hdr, mod(tunnel->next_in_no - 1)); + msg_set_bcast_ack(tunnel_hdr,tunnel->owner->last_in_bcast);=20 + msg_set_user(tunnel_hdr,BCAST_PROTOCOL);=09 + buf_copy_append(buf,0, (unchar *) tunnel_hdr, INT_H_SIZE); + buf_copy_append(buf,INT_H_SIZE,(unchar*)msg, length); + printk("%c->%c:",this->bearer->net_plane,tunnel->bearer->net_plane);=09 + printk("the link name is :%s\n" , tunnel->name); + + printk( "the queue_size is %d\n", tunnel->out_queue_size); + printk("the queue limit is %d\n",tunnel->queue_limit[0]); + //assert(tunnel); + if (tunnel){ + if (bearer_send(tunnel->bearer, buf, &tunnel->media_addr)) { + printk("bearer send\n"); + tunnel->stats.retransmitted++; + } else { + printk("bearer scheule\n"); + bearer_schedule(tunnel->bearer, this); + return; + } + }=09 + printk("link tunnel--tunnel_hdr\n"); +} + /** * Tunel the buffer in the broadcast packet and retransmit it * Input parameters: this: link @@ -633,18 +693,21 @@ =20 int ackseq; struct tipc_msg tunnel_hdr; - + struct tipc_msg *msg =3D buf_msg(buf); +=09 ackseq =3D this->owner->last_in_bcast; =20 msg_init(&tunnel_hdr,BCAST_PROTOCOL, BCAST_MSG, TIPC_OK,INT_H_SIZE, this->addr); =20 + spin_lock_bh(&bcast_outqueue.lock); msg_set_msgcnt(&tunnel_hdr, 1); for (; less_eq(msg_seqno(buf_msg(buf)), lastseq);buf =3D buf->next) { if(less_eq(msg_seqno(buf_msg(buf)), ackseq)) continue; + blink_tunnel(this,&tunnel_hdr,buf_msg(buf)); link_tunnel(this, &tunnel_hdr, buf_msg(buf)); /* The link may reset here, if extreme overload */ if(likely(this->owner)) { |
From: Guo, M. <mi...@in...> - 2004-04-21 02:39:24
|
I checked in some patches for retransmission, now it seems that retransmission can work, but it still need debug, I marked the code as Tre_tx_work. So, Jon, can the tipc be stable in the coming month? Thanks Guo Min tip...@li... wrote: > On Mon, 2004-04-19 at 17:32, Jon Maloy wrote: >> It looks ok. You will find that it will collide with version 1.4 that >> I just checked in, though, so a merger will be needed. >>=20 >=20 > OK, I merged with your updates and checked it in. cvs > automatically did the merge when I updated the file from the main > view.=20 >=20 > Mark. |
From: Mark H. <ma...@os...> - 2004-04-20 15:38:20
|
On Mon, 2004-04-19 at 17:32, Jon Maloy wrote: > It looks ok. You will find that it will collide with version 1.4 that > I just checked in, though, so a merger will be needed. > OK, I merged with your updates and checked it in. cvs automatically did the merge when I updated the file from the main view. Mark. -- Mark Haverkamp <ma...@os...> |
From: Guo, M. <mi...@in...> - 2004-04-20 01:27:44
|
Cool catch! I have not test the code on the SMP, anyway, go on your excellent work! Thanks Guo Min tip...@li... wrote: > I found a race using tipc_queue_size. Multiple processors > can be accessing the variable at the same time causing it to > become corrupted. > I was seeing places where the tipc_queue_size was already > zero but being decremented. This caused all kinds of strange > things to happen. Anyway, I converted tipc_queue_size to an > atomic_t to protect access to the variable. I can now run > the tipc benchmark client/server test without hanging the > network and/or computer. >=20 > Index: socket.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/tipc/source/unstable/net/tipc/linux-2.6/socket.c,v > retrieving revision 1.3 diff -u -r1.3 socket.c > --- socket.c 15 Apr 2004 18:06:37 -0000 1.3 > +++ socket.c 19 Apr 2004 21:50:19 -0000 > @@ -99,6 +99,7 @@ > #include <linux/version.h> > #include <asm/semaphore.h> > #include <asm/string.h> > +#include <asm/atomic.h> > #include <linux/fcntl.h> > #include "tipc_adapt.h" > #include <tipc_msg.h> > @@ -133,7 +134,7 @@ > int buf_rest; > }; >=20 > -static uint tipc_queue_size =3D 0; > +static atomic_t tipc_queue_size =3D ATOMIC_INIT(0); > extern wait_queue_head_t tipc_signal_wq; static uint > dispatch(struct tipc_port*,struct sk_buff *buf); static void > wakeupdispatch(struct tipc_port *port); @@ -193,8 +194,8 @@ > pmask |=3D pollmask(tsock->queue_head); > tsock->pollmask =3D pmask; > tsock->queue_size--; > - tipc_queue_size--; > spin_unlock_bh(tsock->p->lock); > + atomic_dec(&tipc_queue_size); > if (unlikely(pmask & POLLHUP)) > tipc_disconnect(tsock->p->ref); > } > @@ -284,7 +285,7 @@ > struct sk_buff *next =3D buf_next(buf); > tipc_reject_msg(buf, TIPC_ERR_NO_PORT); > buf =3D next; > - tipc_queue_size--; > + atomic_dec(&tipc_queue_size); > } >=20 > while (tsock->ev_head) { > @@ -371,7 +372,7 @@ > /* Remove for next poll/read */ > tsock->pollmask &=3D ~MSG_ERROR; > /* Empty error msg? */ > - if (!(pmask & TIPC_MSG_PENDING)) > + if (!(pmask & TIPC_MSG_PENDING)) > advance_queue(tsock); > } > return pmask; > @@ -760,14 +761,16 @@ > uint pmask =3D 0; > uint res =3D TIPC_OK;; >=20 > - if (unlikely(tipc_queue_size > OVERLOAD_LIMIT_BASE)) { > - if (overload(tipc_queue_size, > OVERLOAD_LIMIT_BASE, msg)){ > + if (unlikely((uint)atomic_read(&tipc_queue_size) > > + OVERLOAD_LIMIT_BASE)) { > + if (overload(atomic_read(&tipc_queue_size), > + OVERLOAD_LIMIT_BASE, msg)){ > res =3D TIPC_ERR_OVERLOAD; > goto error; > } > } > if (unlikely(tsock->queue_size > OVERLOAD_LIMIT_BASE / 2)) { > - if (overload(tsock->queue_size, > OVERLOAD_LIMIT_BASE / 2, msg)){ > + if (overload(tsock->queue_size, > OVERLOAD_LIMIT_BASE / 2, msg)) { > res =3D TIPC_ERR_OVERLOAD; > goto error; > } > @@ -779,7 +782,7 @@ > } > } > tsock->queue_size +=3D 1; > - tipc_queue_size +=3D 1; > + atomic_inc(&tipc_queue_size); > msg_dbg(msg,"<DISP<: "); > buf_set_next(buf, 0); > if (tsock->queue_head) { |
From: Jon M. <jon...@er...> - 2004-04-20 01:20:59
|
See below. Regards /jon Ling, Xiaofeng wrote: -----Original Message----- From: Jon Maloy [ mailto:jon...@er... <mailto:jon...@er...> ]=20 Sent: 2004=C4=EA4=D4=C220=C8=D5 1:09 To: Ling, Xiaofeng Cc: Daniel McNeil; Guo, Min; Mark Haverkamp; tipc Subject: Re: [Tipc-discussion] Re: tipc multicast patch My comments below. /jon =20 =20 In TIPCv1, what I understand is 2 processes on one node can not open the same port name sequence, This has changed in TIPCv2. Now you can bind more than one socket to the same=20 sequence even on the same node. This may be useful if we want "weighted" load sharing,=20 e.g. we may have 1 binding on one node, and 2 bindings on a second, leading the=20 second node to take twice the load of the first one for this particular function. on two or more node, only one node will get the a message sent to this port name, that can be treated as a load balance. As for multicast, maybe this rule can also be applying. Of cause,this also depends on application mode. =20 =20 No. The semantics of multicast behaviour must be absolute and predictable. Statictical=20 load sharing applies to unicast only. =20 So, in TIPCv2, any process binding to the same instance can take the multicast receiver role? For example, on node 1 A, bind(17777, 20) B, bind(17777, 20) no node 2 C, bind(17777, 20) D, bind(17777, 20) if sendto name (17777, 20, 0),=20 only one process will receive the message. Exactly so. And if you with the third argument mean 'domain =3D 0' you will know that each of the four sockets will receive the same number of calls,=20 following a round-robin schedule. if sendto nameseq (17777, 20, 20),=20 all the processes will received the message. Is this description correct? Yes. =20 =20 =20 |
From: Ling, X. <xia...@in...> - 2004-04-20 01:05:38
|
Great catch, this is really an ugly bug. > -----Original Message----- > From: Mark Haverkamp [mailto:ma...@os...]=20 > Sent: 2004=C4=EA4=D4=C220=C8=D5 5:24 > To: Ling, Xiaofeng; Guo, Min; tipc > Subject: bcast.c patch >=20 >=20 > I found a problem initializing a bcastlink bitmap. Too much=20 > memory was being zeroed out corrupting memory and causing=20 > strange behavior. I changed the memset to only zero out the=20 > size of the bitmap array.=20 > (Using BIT_NODES*sizeof(unsigned long) would have worked too,=20 > but using this method, you are always going to fill the=20 > correct amount even if you change the data type someday). I=20 > have included a patch for review. >=20 > Mark. >=20 >=20 > Index: bcast.c=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v > retrieving revision 1.15 > diff -u -r1.15 bcast.c > --- bcast.c 19 Apr 2004 16:12:28 -0000 1.15 > +++ bcast.c 19 Apr 2004 21:16:18 -0000 > @@ -317,7 +317,7 @@ > blink->bitmap[i] =3D 0; > INIT_LIST_HEAD(&blink->list); > blink->mask =3D=20 > (tipc_addr(tipc_zone(tipc_own_addr),tipc_cluster(tipc_own_addr),0));=09 > - memset(blink->bitmap, 0, MAX_NODES*sizeof(unsigned long)); > + memset(blink->bitmap, 0, sizeof(blink->bitmap)); > list_add_tail(&(blink->list),&blink_head); > return blink; > =09 >=20 > --=20 > Mark Haverkamp <ma...@os...> >=20 >=20 |