[ovs-dev] [next2 4/7] ofproto: Update some comments.
Ben Pfaff
blp at nicira.com
Tue Apr 26 20:51:28 UTC 2011
---
ofproto/ofproto.c | 18 ++++++------------
ofproto/pinsched.c | 6 +++---
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 554e6f6..5a36ca6 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -102,7 +102,7 @@ static const struct ofproto_class **ofproto_classes;
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);
@@ -1270,8 +1270,7 @@ ofproto_rule_destroy__(struct rule *rule)
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
@@ -1309,8 +1308,8 @@ ofproto_rule_lookup(struct ofproto *ofproto, const struct flow *flow)
}
/* 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.
@@ -1327,13 +1326,8 @@ rule_execute(struct rule *rule, uint16_t in_port, struct ofpbuf *packet)
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 free up the associated memory. Removes
+ * 'rule' from the classifier. */
void
ofproto_rule_remove(struct rule *rule)
{
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index 934140b..695d9b4 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -209,9 +209,9 @@ pinsched_send(struct pinsched *ps, uint16_t port_no,
/* 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);
--
1.7.4.4
More information about the dev
mailing list