Without this change a monitor update will be sent when a flow mod changes
a rules cookie but not if only the actions are updated. This appears
to be a logic error.
I noticed this while working on implementing OpenFlow1.4 flow monitor
as an OpenFlow1.4 flow mod does not update a rules cookie.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
if (!(op->error
|| ofproto_rule_is_hidden(rule)
|| (op->type == OFOPERATION_MODIFY
if (!(op->error
|| ofproto_rule_is_hidden(rule)
|| (op->type == OFOPERATION_MODIFY
&& rule->flow_cookie == op->flow_cookie))) {
/* Check that we can just cast from ofoperation_type to
* nx_flow_update_event. */
&& rule->flow_cookie == op->flow_cookie))) {
/* Check that we can just cast from ofoperation_type to
* nx_flow_update_event. */
ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=0,actions=output:21
ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=1,actions=output:22
ovs-ofctl add-flow br0 in_port=0,actions=output:23
ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=0,actions=output:21
ovs-ofctl add-flow br0 in_port=0,dl_vlan_pcp=1,actions=output:22
ovs-ofctl add-flow br0 in_port=0,actions=output:23
+ovs-ofctl mod-flows br0 dl_vlan=123,actions=output:3
ovs-ofctl mod-flows br0 cookie=5,dl_vlan=123,actions=output:3
ovs-ofctl del-flows br0 dl_vlan=123
ovs-ofctl del-flows br0
ovs-ofctl mod-flows br0 cookie=5,dl_vlan=123,actions=output:3
ovs-ofctl del-flows br0 dl_vlan=123
ovs-ofctl del-flows br0
event=ADDED table=0 cookie=0 in_port=0,dl_vlan_pcp=1 actions=output:22
NXST_FLOW_MONITOR reply (xid=0x0):
event=ADDED table=0 cookie=0 in_port=0 actions=output:23
event=ADDED table=0 cookie=0 in_port=0,dl_vlan_pcp=1 actions=output:22
NXST_FLOW_MONITOR reply (xid=0x0):
event=ADDED table=0 cookie=0 in_port=0 actions=output:23
+NXST_FLOW_MONITOR reply (xid=0x0):
+ event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123 actions=output:3
+ event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3
+ event=MODIFIED table=0 cookie=0 in_port=0,dl_vlan=123,dl_vlan_pcp=1 actions=output:3
NXST_FLOW_MONITOR reply (xid=0x0):
event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123 actions=output:3
event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3
NXST_FLOW_MONITOR reply (xid=0x0):
event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123 actions=output:3
event=MODIFIED table=0 cookie=0x5 in_port=0,dl_vlan=123,dl_vlan_pcp=0 actions=output:3