summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2016-01-30Typo fixes in lib/packet/bgp.pyVictor Orlikowski
A couple of minor typo fixes. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30Fix: "AddrFormatError: address '...' is not an EUIv48"Jan Keler
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30packet/bgp: Gaurd against extra data in the bufferJason Kölker
While attempting to peer with a vendor switch, parsing its BGPOptParamCapabilityGracefulRestart excepted due to the length of the identifier tuples not being a multiple of 4 octets. It appears that this might be common as other implementations also stop when the buffer is < 4. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30protocols/ovsdb: Forcably kill the main_threadJason Kölker
Should allow AppManager.run_apps to terminate. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30protocols/ovsdb: Handle accept() errorsJason Kölker
An exception during server.accept() should not cause the server thread to terminate. Log the exception and continue instead. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30protocols/ovsdb: Handle disconnects gracefullyJason Kölker
If the client closes the connection during setup, the socket's FD is closed out automatically, ignore the errors while forcably shuting down the socket. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-30test: disable rpc unittest with large file for nowFUJITA Tomonori
disable the rpc unittest with large file for now because it doesn't work with eventlet 0.18 and later. Ryu doesn't have any use cases like this test but should be investigated. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-21ofproto/NXAction: Fix NXActionUnknown parsingMinoru TAKAHASHI
Exception error occurs when NXActionUnknown parsing, because _subtype(NXActionUnknown class member variable) is not defined. This patch fixes this problem. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-21of14_parser: unify OFPActionExperimenter implementationMinoru TAKAHASHI
Currently, there is different OFPActionExperimenter implementation of between of_parser_v14 and v13/5. Because the implementation of v13/5 is better than v14, this patch fixes to of_parser_v14 for unification the implementation. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19test_ofctl: Update json representationsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19test_ofctl_utils: Add unit tests for ofctl_utils.pyIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19lib/ofctl: Add utility library for ofctl_v1_*.pyIWASE Yusuke
This patch enables ofctl_v1_*.py to use the reserved OpenFlow numbers (e.g. port numbering such as "OFPP_CONTROLLER") in the request and reply parameters of ofctl_rest.py. Example: - When adding a flow entry: $ curl -X POST -d '{ "dpid": 1, "actions":[ { "type": "OUTPUT", "port": "CONTROLLER" } ] }' http://localhost:8080/stats/flowentry/add - When getting flows stats: $ curl -X GET http://localhost:8080/stats/flow/1 { "1": [ { ... "actions": [ "OUTPUT:CONTROLLER" ], ... } ] } Suggested-by: Sergio Andres Rivera Polanco <sergiorivera88@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19doc: Add Nicira Extension Structures referencesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19doc: ofproto_ref: Update supported actions/matches listIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19packet_data: regenIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19test_parser: Add expected json representationsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19packet_data_generator2: Add some OFP13/15 messagesIWASE Yusuke
Add the following OFP13/15 Messages. - OFP13/15 Handshake Implemented: OFPT_FEATURES_REPLY TODO: OFPT_FEATURES_REQUEST - OFP13/15 Switch Configuration Messages Implemented: OFPT_SET_CONFIG, OFPT_GET_CONFIG_REPLY TODO: OFPT_GET_CONFIG_REQUEST Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19lib/ofctl_v1_*: Confirm hw_addr is str in mod_port_behaviorIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19test_ofctl: Compare sent messages in json representationIWASE Yusuke
Currently, test_ofctl compares the sent messages in binary, so it is difficult to figure out the differences of the sent messages and the expected messages. This patch fixes to compare the sent messages in json representation in order to make easy to debug. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19Remove old link when link updatesChia-Lin Cho
Signed-off-by: Chia-Lin Cho <fox91119@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-19fixes for mutable default argumentsMinoru TAKAHASHI
modify the default argument from list to None, because default value {}/[] as argument is dangerous. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-08Cleanup variable name for clarityVictor Orlikowski
Just cleaning up where the patch you previously applied for me is the original version, and not the corrected version. Thanks for applying the original! Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-01-08cap oslo.config version only in python2.6FUJITA Tomonori
https://bugs.launchpad.net/neutron/+bug/1531837 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
2016-01-04Ryu 3.29FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-30Generate new datapath event for switch connecting multiple timesVictor Orlikowski
If a switch connects multiple times, there are a number of potential causes. A potential cause is that the OF agent on the switch crashed, and was re-launched - but, because of the crash, Ryu believes that the switch is still connected. Should this occur, the newly re-launched OF agent on the switch often clears the flow tables on the switch, before connecting to the controller. When the switch agent re-connects to Ryu, the state of the flow tables on the switch may not match what Ryu expects. As a result, I suggest generating a new event: EventDPReconnected Extending the existing EventDP would change semantics, and would break apps others have written that rely on those semantics. Applications registering a handler for EventDPReconnected would then be able to choose whether to wipe the flow tables on the switch and re-send flow rules, or whether to probe the switch with a flow-stats message, and re-send rules more carefully. Adding EventDPReconnected is the best solution to not break existing apps, and to implement the following portion of section 6.3.3 (“Connection Interruption”) of the OpenFlow 1.3.4 specification, for switches that have connected multiple times: " When the OpenFlow channel is reestablished, the flow entries present in the flow tables at that time are preserved and normal OpenFlow operation resumes. If desired, the controller has then the option of reading all flow entries with a flow-stats request (see 7.3.5.2), to re-synchronise its state with the switch state. Alternatively, the controller then has the option of deleting all flow entries with a flow-mod request (see 6.4), to start from a clean state on the switch. " Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-30Fix handling of state transition to config modeVictor Orlikowski
We have found, in production usage, a race condition in the transition to config mode. If a sufficient number of events is being received, the reply to the FeaturesRequest may be received before the datapath is able to move into CONFIG_DISPATCHER state. As a result, the EventOFPSwitchFeatures handler may never fire (because the reply is received before the datapath has changed state). This patch also includes a minor typo fix. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-30Clean up for stability patch submitted previouslyVictor Orlikowski
While continuing to run our application with the stability patch I submitted earlier, I discovered additional failure modes for some of our hardware switches were causing unexpected exceptions. This revision better handles these situations. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25Ensure to terminate threads where RyuApp.start() gives a thread objectIWAMOTO Toshihiro
Otherwise, AppManager.run_apps fails to terminate. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25ofctl_v1/2/3: Some improvementsMinoru TAKAHASHI
* modify from "flow" to "meter" the argument of meter_mod * modify the default argument from {} to None of the following methods because default value []/{} as argument is dangerous. - get_flow_stats - get_aggregate_flow_stats - mod_meter_entry * fix some log messages for better readability Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25of14: Add action experimenter to flow stats reply unit testMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25test_tcp: Update test cases for tcp optionIWASE Yusuke
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25lib/packet/tcp: Parse TCP Option fieldIWASE Yusuke
Suggested-by: Ramana Reddy <gtvrreddy@gmail.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-25bgp: fix handling unknown and unsupported transitive pathISHIDA Wataru
attributes we must forward optional transitive path attributes. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22ofp_handler: Remove sending SET_CONFIG messageIWASE Yusuke
Because Ryu always sends SET_CONFIG message when a datapath connecting, the switch configurations of user applications will be overwritten by the default values of Ryu when the datapath re-connecting. This patch removes sending SET_CONFIG message from ofp_handler and avoids this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Add test cases for ofctl_v1_0IWASE Yusuke
TODO: Add test cases for the other messages after adding test cases for ofproto/test_parser. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Add test cases for ofctl_v1_2IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Add test cases for ofctl_v1_3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Implement unit test for sending messagesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Rename unit test for action/matchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Confirm UTF-8 in binary fieldsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22ofproto_v1_[23]_parser: Add default arguments in OFPQueuePropIWASE Yusuke
When loading OFPQueueGetConfigReply message from json dict, ofproto_parser can not set the property field in OFPQueueProp, because __init__() of OFPQueueProp sub-classes do not pass any argument to its own super-class. This patch fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22test_parser: Add some expected json representationsIWASE Yusuke
This patch adds expected json representations for: - ofp_group_stats_request - fp_group_stats_reply Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22packet_data: RegenIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22packet_data_generator: Add ofp_group_stats messages for OF1.2IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22ofproto_v1_[2345]_parser: Set default length fieldIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08avoid oslo.config 3.1.0 and later for python2.6 supportFUJITA Tomonori
oslo.config v3.1.0 dropped python2.6 support: https://github.com/openstack/oslo.config/commit/9470f19eacb99425055946bd4a6079b71406ff1b Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08test_controller: Add unit test for _recv_loop()IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08controller: Split received message bufferIWASE Yusuke
When Ryu getting multiple OpenFlow messages in a single packet, _recv_loop() can pass the messages data including the subsequent OpenFlow message binary data to ofproto_parser.msg(). If the received OpenFlow message containing a binary data field (e.g. Echo-Reply, Packet-In), the parser may compose messages class with the subsequent messages data into the data field. This patch splits the received message buffer by the recieved OpenFlow message lenght and passes it to the parser. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-02Fix a stability issue relating to switch disconnection/re-connection events.Victor J. Orlikowski
If a switch gets disconnected via a network interruption on the control plane (or a similar event), the datapath associated with that switch might not be properly cleaned up. At the same time, the socket associated with that datapath can get leaked. This ultimately results in file descriptor resource exhaustion for Ryu, as a socket had the potential to be leaked on each reconnect. Also, a small typo was corrected in a method name in DPSet.
2015-12-02Ryu 3.28FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>