diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2013-09-23 22:58:46 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2013-10-01 18:09:38 -0700 |
commit | 0a37839c03307cc4cc726d27a7348c05d469c5eb (patch) | |
tree | 6bf284bda19f723cc29f152af5e95a247d0cde3c /tests | |
parent | 363591508db8f17045c9159522ad9511e63cba2e (diff) | |
download | openvswitch-0a37839c03307cc4cc726d27a7348c05d469c5eb.tar.gz |
ovs-dpctl, ofproto/trace: Show and handle the in_port name in flows.
With this commit, whenever the verbosity is enabled with '-m'
option, the ovs-dpctl dump-flows command will display the flows with
in_port field showing the name instead of a port number.
Conversely, one can also use a name in the in_port field with del-flow,
add-flow and mod-flow commands of ovs-dpctl. One should also be able
to use the port name when supplying the datapath flow as an input
to ofproto/trace command.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ofproto-dpif.at | 17 | ||||
-rw-r--r-- | tests/test-odp.c | 2 |
2 files changed, 13 insertions, 6 deletions
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 205044364..ea3602016 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -1161,8 +1161,15 @@ in_port=2 actions=output:1 ]) AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) -odp_flow="in_port(1)" +odp_flow="in_port(p1)" br_flow="in_port=1" +# Test command: ofproto/trace odp_flow with in_port as a name. +AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout]) +AT_CHECK([tail -1 stdout], [0], [dnl +Datapath actions: 2 +]) + +odp_flow="in_port(1)" # Test command: ofproto/trace odp_flow AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], [dnl @@ -1307,7 +1314,7 @@ m4_foreach( [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option], [2], [], [stderr]) AT_CHECK([tail -2 stderr], [0], [dnl -Cannot find datapath of this name +Cannot find the datapath ovs-appctl: ovs-vswitchd: server returned an error ])]) @@ -1320,7 +1327,7 @@ m4_foreach( [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option], [2], [], [stderr]) AT_CHECK([tail -2 stderr], [0], [dnl -Cannot find datapath of this name +Cannot find the datapath ovs-appctl: ovs-vswitchd: server returned an error ])]) @@ -1333,7 +1340,7 @@ m4_foreach( [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option], [2], [], [stderr]) AT_CHECK([tail -2 stderr], [0], [dnl -Cannot find datapath of this name +Cannot find the datapath ovs-appctl: ovs-vswitchd: server returned an error ])]) @@ -1346,7 +1353,7 @@ m4_foreach( [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option], [2], [], [stderr]) AT_CHECK([tail -2 stderr], [0], [dnl -Cannot find datapath of this name +Cannot find the datapath ovs-appctl: ovs-vswitchd: server returned an error ])]) diff --git a/tests/test-odp.c b/tests/test-odp.c index 45605e4b9..183a3b3cd 100644 --- a/tests/test-odp.c +++ b/tests/test-odp.c @@ -86,7 +86,7 @@ parse_keys(bool wc_keys) ds_init(&out); if (wc_keys) { odp_flow_format(odp_key.data, odp_key.size, - odp_mask.data, odp_mask.size, &out, false); + odp_mask.data, odp_mask.size, NULL, &out, false); } else { odp_flow_key_format(odp_key.data, odp_key.size, &out); } |