Hi Marko,

Well, the OpenFlow Spec does not clarify though...
In general, status value 0 means "up", no status flag is set = normal state.

Thanks,
Iwase


On 2018年01月26日 20:35, Marko Eremija wrote:
Hello Iwase,

I might have sent the previous mail a bit too quick. :) I have now implemented 
the EventOFPPortStatus, but what I don't understand now is how to map status to 
the OpenFlow message. There is this definition in ofproto.py:

# enum ofp_port_state
OFPPS_LINK_DOWN = 1 << 0        # No physical link present.
OFPPS_BLOCKED = 1 << 1          # Port is blocked.
OFPPS_LIVE = 1 << 2             # Live for Fast Failover Group.

But, when I am testing using Mininet, the output displays status values 0 (when 
link is up) and 1 (when link is down). So, basically, status value of 0 means 
that link is up?

I guess that other two OpenFlow messages are reserved for other use cases.

Best regards,

Marko


-----Original Message-----
From: Marko Eremija [mailto:marko.erem...@amres.ac.rs]
Sent: Friday, January 26, 2018 9:28 AM
To: ryu-devel@lists.sourceforge.net
Subject: Re: [Ryu-devel] Link status

Hello Iwase,

Thank you for your reply. I am already using this for port status, but is there 
a way to extract the OFPPS_LINK_DOWN message, or to somehow map between the 
port status messages and link status messages, like if the message is 
OFPPR_DELETE it is the same as OFPPS_LINK_DOWN? Or to be more precise, how to 
use OFPPort class to extract information about link status?

Best regards,

Marko

-----Original Message-----
From: Iwase Yusuke [mailto:iwase.yusu...@gmail.com]
Sent: Friday, January 26, 2018 1:28 AM
To: marko.erem...@amres.ac.rs
Cc: ryu-devel@lists.sourceforge.net
Subject: Re: [Ryu-devel] Link status

Hi Marko,

How about the following?
http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#port-status-message

You can use;
      @set_ev_cls(ofp_event.EventOFPPortStatus, MAIN_DISPATCHER) to detect link 
state changes.

Thanks,
Iwase

On 2018年01月26日 05:48, Marko Eremija wrote:
Hello,

I am trying to write a Ryu app that will be able to get link status. I
would like to find a way to notify the controller about the reason why
link is down (e.g. by using OFPPS_LINK_DOWN message), and trigger
actions if that is the case. If I understand correctly, I cannot use
the Port class from ofproto_v1_3_parser.py to get the link status, like this 
e.g.:

@set_ev_cls(ofp_event.EventOFPPSLinkDown, [MAIN_DISPATCHER])

If someone would just tell me where to find this information, that
would be much appreciated.

Best regards,

Marko



----------------------------------------------------------------------
-------- Check out the vibrant tech community on one of the world's
most engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to