CPqD/RouteFlow — pull request #1 by joestringer (2011-12-14 02:45:59+00:00)
Title: rf-server refactor; rf-slave stability; misc bugfixes & cleanups

RouteFlow Modifications
=======================

General
-------

VM ids and Datapath ids are now universally formatted as "0x%llx" (Debug output was previously a mix of hex and decimal, which made it hard to keep track)

rf-server
---------

I've done some fairly invasive work in rf-server to refactor duplicate code into some handy functions. These take the form of "ofm_foo()", and are currently inside rfserver.cc, but could be spun out into a seperate library for OF-mod creation, if need be.

I also refactored most code that previously used send_ovs_flow() to send messages to the RFOVS datapath so that it makes use of send_flow_msg() instead. The remaining places where send_ovs_flow() is used are for specifying physical port mappings. This method now takes an ofp_flow_mod_command to specify whether it is adding or deleting a port map.

Lastly, there is now also commandline argument parsing for rf-server. Perhaps at a later date, a config file would be preferred, but at the moment the only thing that I needed to configure was whether or not L2 matching was done, so I thought config file parsing would be a bit over-the-top.

Changelist:

* Refactored OpenFlow mod creation code:- *
* Wildcards are added by the various ofm_match_foo() functions
* Actions are added by ofm_set_action() calls
* Commands are added by ofm_set_command() calls
* Almost all calls to send_ovs_flow() are replaced with send_flow_msg() calls
* send_ovs_flow() now only handles sending ADD and DELETE OFM commands for physical ports

* General bugfixes/modifications:- *
* Typo in rf-server/main.cc that caused VMs to not associate with an idle DP
* Install flows into DP (when VM joins) to forward ICMP,BGP messages to the controller
* Added commandline argument parsing; To do L2 matching, specify -m
* Add function RouteFlowServer::set_l2_match(bool) for setting whether to match L2 or not
* All RF Operations such as DROP_ALL, CLEAR_FLOW_TABLE, and matching different protocols are now specified as RFO_foo

rf-slave
--------

One of the bigger problems I previously had with rf-slave is that when any kind of network issue occurred, rf-slave would print a message and exit out. I've changed this so that it will only exit if there are troubles with ioctl() on the sockets. All debug output is now standardised also.

Changelist:

* General bugfixes/modifications:- *
* Don't die when connection to rf-server is lost -- go back to looking for the server again
* Change all output to one standard format, using syslog