static size_t n_ofproto_classes;
static size_t allocated_ofproto_classes;
-/* Map from dpif name to struct ofproto, for use by unixctl commands. */
+/* Map from datapath name to struct ofproto, for use by unixctl commands. */
static struct hmap all_ofprotos = HMAP_INITIALIZER(&all_ofprotos);
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
rule->ofproto->ofproto_class->rule_dealloc(rule);
}
-/* Destroys 'rule' and iterates through all of its facets and revalidates them,
- * destroying any that no longer has a rule (which is probably all of them).
+/* Destroys 'rule' and removes it from the datapath.
*
* The caller must have already removed 'rule' from the classifier. */
void
}
/* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s
- * statistics (or the statistics for one of its facets) appropriately.
- * 'packet' must have at least sizeof(struct ofp_packet_in) bytes of headroom.
+ * statistics appropriately. 'packet' must have at least sizeof(struct
+ * ofp_packet_in) bytes of headroom.
*
* 'packet' doesn't necessarily have to match 'rule'. 'rule' will be credited
* with statistics for 'packet' either way.
return rule->ofproto->ofproto_class->rule_execute(rule, &flow, packet);
}
-/* Remove 'rule' from 'ofproto' and free up the associated memory:
- *
- * - Removes 'rule' from the classifier.
- *
- * - If 'rule' has facets, revalidates them (and possibly uninstalls and
- * destroys them), via rule_destroy().
- */
+/* Removes 'rule' from 'ofproto' and frees up the associated memory. Removes
+ * 'rule' from the classifier. */
void
ofproto_rule_remove(struct rule *rule)
{
/* Otherwise queue it up for the periodic callback to drain out. */
struct pinqueue *q;
- /* We are called with a buffer obtained from dpif_recv() that has much
- * more allocated space than actual content most of the time. Since
- * we're going to store the packet for some time, free up that
+ /* We might be called with a buffer obtained from dpif_recv() that has
+ * much more allocated space than actual content most of the time.
+ * Since we're going to store the packet for some time, free up that
* otherwise wasted space. */
ofpbuf_trim(packet);