run-ryu: Use unix socket rather than patch ports
authorSimon Horman <horms@verge.net.au>
Wed, 23 Apr 2014 05:06:12 +0000 (14:06 +0900)
committerBen Pfaff <blp@nicira.com>
Wed, 23 Apr 2014 16:34:24 +0000 (09:34 -0700)
commit34799871bf18ce7d6124e137dcca31ef88af9156
treedd02e2492c123acdf06b4e1c5f66c35143998a62
parentfd9164cd5aa087e1acc671aad36d66b4ba267c34
run-ryu: Use unix socket rather than patch ports

My understanding of the implementation of patch ports is that they
are rather special, being handled as a special case inside
compose_output_action__() and do not exist in the datapath.

A side effect of the implementation of patch ports (though perhaps not the
portion mentioned above) is that the OFPUTIL_PC_PORT_DOWN bit may not be
set via a port mod message. In particular, the call to
netdev_turn_flags_on() in update_port_config() fails.

There is a test provided by Ryu that test this via port mod and thus fails.

While that test could be modified or the results ignored it seems to me
that it would be best if ryu-check used ports which were more fully
featured and not special cases.

Thus this patch moves run-ryu to use unix socket backed ports rather than
patch ports.

I believe a more significant problem with the use of patch ports
is that they will require (more) special case code in order to correctly
handle recirculation. As Ryu provides many tests that exercise
recirculation for MPLS it would be nice if they could be used to exercise
recirculation for MPLS (which I have provided patches for separately[1])
without the need to add more special-case code for that purpose.

I believe that patch ports are also incompatible with recirculation for
bonding, which has already been merged, though I have not verified that
and it is not strictly related to this patch as I do not believe that Ryu
provides any tests to exercise that case.

The key problem with patch ports in the context of recirculation is that
the ofproto and in_port may change during translation.  And this
information is lost by the time that execution occurs.

Furthermore the new in_port will not exist in the datapath as it is a
patch port. That particular problem may be addressed by executing the
actions in user-space, I have posted patches to provide infrastructure
for that[1].

Overall it is not clear to me that the complexity of supporting
recirculation for patch-ports would have sufficient pay-off.

[1] [PATCH v3 00/16] Flow-Based Recirculation for MPLS

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/run-ryu