From 34799871bf18ce7d6124e137dcca31ef88af9156 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Apr 2014 14:06:12 +0900 Subject: [PATCH] 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 Signed-off-by: Ben Pfaff --- tests/run-ryu | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/run-ryu b/tests/run-ryu index 94fe6bbb5..f63123ee6 100755 --- a/tests/run-ryu +++ b/tests/run-ryu @@ -66,11 +66,11 @@ run ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \ # Add bridges for Ryu to use, and configure them to connect to Ryu. for config in \ - 'br0 0000000000000001 a c b d' \ - 'br1 0000000000000002 c a d b' + 'br0 0000000000000001 a b pstream=punix' \ + 'br1 0000000000000002 c d stream=unix' do set $config - bridge=$1 dpid=$2 port1=$3 peer1=$4 port2=$5 peer2=$6 + bridge=$1 dpid=$2 port1=$3 port2=$4 stream_mode=$5 run ovs-vsctl --no-wait \ -- add-br $bridge \ -- set bridge $bridge \ @@ -81,9 +81,11 @@ do -- set controller $bridge connection-mode=out-of-band \ max-backoff=1000 \ -- add-port $bridge $port1 \ - -- set interface $port1 ofport_request=1 type=patch options:peer=$peer1 \ + -- set interface $port1 ofport_request=1 type=dummy \ + options:${stream_mode}:"$sandbox"/p1.sock \ -- add-port $bridge $port2 \ - -- set interface $port2 ofport_request=2 type=patch options:peer=$peer2 + -- set interface $port2 ofport_request=2 type=dummy \ + options:${stream_mode}:"$sandbox"/p2.sock done logs= -- 2.43.0