The old version of the function actually freed the remaining IDs, but
it's not the case since the cited commit. Let's change the name and
the description to better reflect what this function is doing.
Fixes: e672ff9b4d22 ("ofproto-dpif: Restore metadata and registers on
recirculation.")
Signed-off-by: Ilya Maximets <[email protected]>
---
ofproto/ofproto-dpif-rid.c | 8 +++++---
ofproto/ofproto-dpif-rid.h | 3 ++-
ofproto/ofproto-dpif.c | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c
index 1f9746f93..820de1417 100644
--- a/ofproto/ofproto-dpif-rid.c
+++ b/ofproto/ofproto-dpif-rid.c
@@ -347,12 +347,14 @@ recirc_free_id(uint32_t id)
}
}
-/* Called when 'ofproto' is destructed. Checks for and clears any
- * recirc_id leak.
+/* Called when 'ofproto' is destructed. Checks for any recirc_id leaks
+ * and logs an error if found.
+ *
* No other thread may have access to the 'ofproto' being destructed.
* All related datapath flows must be deleted before calling this. */
void
-recirc_free_ofproto(struct ofproto_dpif *ofproto, const char *ofproto_name)
+recirc_leak_check_ofproto(struct ofproto_dpif *ofproto,
+ const char *ofproto_name)
{
struct recirc_id_node *n;
diff --git a/ofproto/ofproto-dpif-rid.h b/ofproto/ofproto-dpif-rid.h
index 21f32b935..8e9a16503 100644
--- a/ofproto/ofproto-dpif-rid.h
+++ b/ofproto/ofproto-dpif-rid.h
@@ -192,7 +192,8 @@ uint32_t recirc_alloc_id(struct ofproto_dpif *);
uint32_t recirc_alloc_id_ctx(const struct frozen_state *);
uint32_t recirc_find_id(const struct frozen_state *);
void recirc_free_id(uint32_t recirc_id);
-void recirc_free_ofproto(struct ofproto_dpif *, const char *ofproto_name);
+void recirc_leak_check_ofproto(struct ofproto_dpif *,
+ const char *ofproto_name);
const struct recirc_id_node *recirc_id_node_find(uint32_t recirc_id);
bool recirc_id_node_find_and_ref(uint32_t id);
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 46c6c27bc..5251bab56 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1982,7 +1982,7 @@ destruct(struct ofproto *ofproto_, bool del)
/* Wait for all the meter destroy work to finish. */
ovsrcu_barrier();
close_dpif_backer(ofproto->backer, del);
- recirc_free_ofproto(ofproto, ofproto->up.name);
+ recirc_leak_check_ofproto(ofproto, ofproto->up.name);
}
static int
--
2.53.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev