When flow_get fails (in this case flow does not exist) simply log
the key part of the get and erase the rest of the flow because it
is invalid.

verified the fix by doing ovs-ofctl del-flows when traffic is running

2014-10-18T20:12:13.785Z|00011|dpif(revalidator20)|WARN|system@ovs-system: 
failed to flow_get (No such file or directory) 
dp_hash(0),recirc_id(0),skb_priority(0),in_port(2),skb_mark(0),eth(src=00:13:72:0b:52:fa,dst=00:14:72:0b:52:fa),eth_type(0x0800),ipv4(src=10.0.0.164,dst=11.0.0.164,proto=6,tos=0,ttl=4,frag=no),tcp(src=1651,dst=6095),tcp_flags(ack),
 packets:0, bytes:0, used:never
---
 lib/dpif.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/dpif.c b/lib/dpif.c
index d088f68..64e6a0e 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -1155,11 +1155,11 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, 
size_t n_ops)
                     struct dpif_flow_get *get = &op->u.flow_get;
 
                     COVERAGE_INC(dpif_flow_get);
-                    log_flow_get_message(dpif, get, error);
-
                     if (error) {
                         memset(get->flow, 0, sizeof *get->flow);
                     }
+                    log_flow_get_message(dpif, get, error);
+
                     break;
                 }
 
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to