Skip to content

Commit

Permalink
ofproto/trace: Fix "unchanged" output for Final flow
Browse files Browse the repository at this point in the history
Clear actset_output so that it can be compared via flow_equal.
Note: trace->key has actset_output == 0.

Found by OVS flow tests under development for Neutron. [1]

[1] https://review.openstack.org/#/c/235155/10/neutron/tests/functional/agent/test_ovs_flows.py@399

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Acked-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
yamt committed Mar 23, 2016
1 parent 3b70d8f commit 8c0b419
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions ofproto/ofproto-dpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -5063,6 +5063,7 @@ ofproto_trace(struct ofproto_dpif *ofproto, struct flow *flow,

error = xlate_actions(&trace.xin, &trace.xout);
ds_put_char(ds, '\n');
trace.xin.flow.actset_output = 0;
trace_format_flow(ds, 0, "Final flow", &trace);
trace_format_megaflow(ds, 0, "Megaflow", &trace);

Expand Down
11 changes: 11 additions & 0 deletions tests/ofproto-dpif.at
Original file line number Diff line number Diff line change
Expand Up @@ -7216,3 +7216,14 @@ dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0xf063/0x1000,dl_type=0
])
OVS_VSWITCHD_STOP
AT_CLEANUP

AT_SETUP([ofproto-dpif - trace (unchanged)])
OVS_VSWITCHD_START
AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged
])
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100)'], [0], [stdout])
AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged
])
OVS_VSWITCHD_STOP
AT_CLEANUP

0 comments on commit 8c0b419

Please sign in to comment.