Issues a ERR log when the 'recirc_id' is not freed by the
owning 'ofproto'.

Signed-off-by: Alex Wang <[email protected]>
---
 ofproto/ofproto-dpif.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index cdd302a..b5fe73f 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5458,6 +5458,13 @@ ofproto_dpif_free_recirc_id(struct ofproto_dpif 
*ofproto, uint32_t recirc_id)
         cmap_remove(&backer->recirc_map, &node->cmap_node, node->recirc_id);
         ovs_mutex_unlock(&backer->recirc_mutex);
         recirc_id_free(backer->rid_pool, node->recirc_id);
+
+        if (node->ofproto != ofproto) {
+            VLOG_ERR("recirc_id %"PRIu32", freed by incorrect ofproto (%s),"
+                     " expect ofproto (%s)", node->recirc_id, ofproto->up.name,
+                     node->ofproto->up.name);
+        }
+
         /* RCU postpone the free, since other threads may be referring
          * to 'node' at same time. */
         ovsrcu_postpone(free, node);
-- 
1.7.9.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to