From: Alex Wang <ee07b...@gmail.com>

In the push_dump_ops__(), when flow_del operation returns error, the 'struct
stats' passed to the operation function will be set to all zero.  And we
should not use it to calculate the delta (i.e. minus the zero stats by the
cached stats causes overflow).

Even though this should rarely happen, it is still good to make
push_ukey_ops__() just ignore the operation when it fails.

This is a backport of commit e83c935 to branch-2.3.

Signed-off-by: Alex Wang <ee07b...@gmail.com>
Acked-by: Daniele Di Proietto <diproiet...@vmware.com>
Signed-off-by: Jarno Rajahalme <ja...@ovn.org>
---
 ofproto/ofproto-dpif-upcall.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 0e72a3a..16dd655 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1417,6 +1417,10 @@ push_dump_ops__(struct udpif *udpif, struct dump_op 
*ops, size_t n_ops)
             goto next;
         }
 
+        if (op->op.error) {
+            /* flow_del error, no flow stats. */
+            goto next;
+        }
         stats = op->op.u.flow_del.stats;
 
         if (op->ukey) {
-- 
2.1.4

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

Reply via email to