[pox-dev] listen to ECHO_REPLY info,raise events

Murphy McCauley murphy.mccauley at gmail.com
Thu Feb 14 15:39:54 PST 2013


On Feb 14, 2013, at 2:18 PM, Weiyang Mo wrote:

> Just wonder how to listen to OFPT_ECHO_REPLY information, and raise event similar to handle_PacketIn, handle_ConnectionUp. I know that this event is not in the Eventmixin_events in of_01.py.
>  
> I saw there're some definations in of_01.py as follows:
>  
> def handle_ECHO_REPLY (con, msg):
>   #con.msg("Got echo reply")
>   pass
>  
> This seems not complete. Does that mean I should rewrite this function?  I'm trying to write similar codes such as def handle_Flow_Removed but I don't know whether I'm on the right direction..


Just a couple quick thoughts...

I guess you are worried about testing switch liveness.  In which case, I don't think that having echo reply events is actually useful.  I don't think the interesting question is so much "have I received an echo reply?" as much as it is, "have I received *anything*?"  Echo replies are only useful as sort of a no-op way to make sure you get a reply of some sort.  The reason these are different is because if a switch is backed up for example sending packet_ins and therefore is slow to reply to an echo (arguably a problem with the switch's implementation, but that's another issue), I'm not sure it's clear that disconnecting the switch is the right thing to do.

Given that, it seems like the most reasonable way to implement it is by keeping a timestamp of the most recent read in the Connection object (though I am not entirely certain that I want to do this...).

-- Murphy


More information about the pox-dev mailing list