The field in question is not used since the cited commit changed the
way recirculation is tracked for MPLS and only creates confusion
around the lifetime of recirculation IDs. Let's remove it.
Fixes: e672ff9b4d22 ("ofproto-dpif: Restore metadata and registers on
recirculation.")
Signed-off-by: Ilya Maximets <[email protected]>
---
ofproto/ofproto-dpif.c | 29 -----------------------------
ofproto/ofproto-dpif.h | 8 --------
2 files changed, 37 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 5251bab56..a166dbabf 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4538,31 +4538,6 @@ rule_dpif_credit_stats(struct rule_dpif *rule,
ovs_mutex_unlock(&rule->stats_mutex);
}
-/* Sets 'rule''s recirculation id. */
-static void
-rule_dpif_set_recirc_id(struct rule_dpif *rule, uint32_t id)
- OVS_REQUIRES(rule->up.mutex)
-{
- ovs_assert(!rule->recirc_id || rule->recirc_id == id);
- if (rule->recirc_id == id) {
- /* Release the new reference to the same id. */
- recirc_free_id(id);
- } else {
- rule->recirc_id = id;
- }
-}
-
-/* Sets 'rule''s recirculation id. */
-void
-rule_set_recirc_id(struct rule *rule_, uint32_t id)
-{
- struct rule_dpif *rule = rule_dpif_cast(rule_);
-
- ovs_mutex_lock(&rule->up.mutex);
- rule_dpif_set_recirc_id(rule, id);
- ovs_mutex_unlock(&rule->up.mutex);
-}
-
ovs_version_t
ofproto_dpif_get_tables_version(struct ofproto_dpif *ofproto)
{
@@ -4948,7 +4923,6 @@ rule_construct(struct rule *rule_)
rule->stats.n_packets = 0;
rule->stats.n_bytes = 0;
rule->stats.used = rule->up.modified;
- rule->recirc_id = 0;
rule->new_rule = NULL;
rule->forward_counts = false;
@@ -5000,9 +4974,6 @@ rule_destruct(struct rule *rule_)
if (rule->new_rule) {
ofproto_rule_unref(&rule->new_rule->up);
}
- if (rule->recirc_id) {
- recirc_free_id(rule->recirc_id);
- }
}
static void
diff --git a/ofproto/ofproto-dpif.h b/ofproto/ofproto-dpif.h
index f8d3df5ab..a90ac6f23 100644
--- a/ofproto/ofproto-dpif.h
+++ b/ofproto/ofproto-dpif.h
@@ -88,12 +88,6 @@ struct rule_dpif {
struct rule_dpif *new_rule OVS_GUARDED;
bool forward_counts OVS_GUARDED; /* Forward counts? 'used' time will be
* forwarded in all cases. */
-
- /* If non-zero then the recirculation id that has
- * been allocated for use with this rule.
- * The recirculation id and associated internal flow should
- * be freed when the rule is freed */
- uint32_t recirc_id;
};
struct rule_dpif *rule_dpif_lookup_from_table(struct ofproto_dpif *,
@@ -110,8 +104,6 @@ struct rule_dpif *rule_dpif_lookup_from_table(struct
ofproto_dpif *,
void rule_dpif_credit_stats(struct rule_dpif *,
const struct dpif_flow_stats *, bool);
-void rule_set_recirc_id(struct rule *, uint32_t id);
-
/* Returns true if 'rule' is an internal rule, false otherwise. */
static inline bool
rule_dpif_is_internal(const struct rule_dpif *rule)
--
2.53.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev