On 19/05/2011 2:40 PM, Ben Greear wrote: > On 05/19/2011 11:29 AM, Philip Hugg wrote: >> On 19/05/2011 12:32 PM, Ben Greear wrote: >>> On 05/19/2011 08:24 AM, Philip Hugg wrote: >>>> Hello everyone, >>>> >>>> I'm currently working on Xorp-OLSR. >>>> >>>> The problem with OLSR is the route flapping. >>>> I've managed to find a few obvious bugs up to now however this one >>>> involves the interface to the XRL. I'm not sure how to fix. >>>> >>>> The problem I found is in file 'xrl_port.cc' where OLSR is sending the >>>> packets >>> >>>> >>>> Now what I'm seeing is the debug message "PortOutput ...: send skipped >>>> (pending XRL)". >>>> It doesn't happen all the time but it's just enough to cause route >>>> flapping. >>>> >>>> My question is how could I fix the pending issue without causing a >>>> race >>>> condition in the code? >>> >>> I took a look at that code, and it looks quite fragile. >>> As the code exists currently, I suppose you'd >>> need to check the results of send_to and queue up pkts for retransmit >>> if sending failed. >>> >>> Maybe it was to make sure some initial config logic completed before >>> send_to started functioning? >>> >>> Maybe use a different flag like _setup_complete that is set in >>> socket_setup_complete() and have send_to fail to send until >>> setup is complete? >>> >>> It doesn't look like an general XRL problem to me, by the way. >>> >>> Thanks, >>> Ben >>> >> Hi Ben, >> >> Thank you for answering so quickly. >> >> I presume the socket setup is done when xorp is started and is done >> only once. >> In my case, the socket has been setup and is currently sending and >> receiving packets. >> >> The problem I'm seeing is that when a send-to call is made it becomes >> busy (pending=true) >> for a short while. It is freed (pending=false) when the callback >> 'send_cb' is returned from cl.send_send_to(...). >> >> It just sometimes happens that OLSR is sending packets in that short >> busy state. >> >> To me, this is a problem! >> >> A queuing mechanism on the OLSR side would probably mean implementing >> a new thread >> of code just spinning and waiting for the XRL to become free. >> This will take a while but I'll take a look at the other protocols >> (BGP, OSPF) to see how >> they are handling the XRL pending. > > I don't think there is any real reason sending while 'busy'. > > Please post your existing patches, and for your testing, try just > commenting out this code: > > if (success) > _pending = true; > > in send_to() > > Thanks, > Ben > >> >> again thanks, >> Phil. >> > > Ben, the testing is working great! The OLSR topology table is very stable now! However, I will continue testing. I have other OLSR topologies I would like to try.
I guess this means the sendto() doesn't need the pending flag after all. About the patches- I've only made changes to the OLSR and in XORP-1.5. Did you want the patches for that? Thanks, Phil. _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
