Looks Good. Ethan
On Wed, Apr 27, 2011 at 14:37, Ben Pfaff <[email protected]> wrote: > There's no reason not to implement this trivial function in ofproto-dpif, > especially since it makes less sense once multiple table support is > implemented (which table should be searched?). > --- > ofproto/ofproto-dpif.c | 3 ++- > ofproto/ofproto.c | 6 ------ > ofproto/private.h | 1 - > 3 files changed, 2 insertions(+), 8 deletions(-) > > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index f163ff4..33cefe3 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -2420,7 +2420,8 @@ flow_push_stats(const struct rule_dpif *rule, > static struct rule_dpif * > rule_dpif_lookup(struct ofproto_dpif *ofproto, const struct flow *flow) > { > - return rule_dpif_cast(ofproto_rule_lookup(&ofproto->up, flow)); > + return rule_dpif_cast(rule_from_cls_rule( > + classifier_lookup(&ofproto->up.cls, flow))); > } > > static struct rule * > diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c > index 67f271e..5e270d8 100644 > --- a/ofproto/ofproto.c > +++ b/ofproto/ofproto.c > @@ -1289,12 +1289,6 @@ rule_has_out_port(const struct rule *rule, ovs_be16 > out_port) > return false; > } > > -struct rule * > -ofproto_rule_lookup(struct ofproto *ofproto, const struct flow *flow) > -{ > - return rule_from_cls_rule(classifier_lookup(&ofproto->cls, flow)); > -} > - > /* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s > * statistics appropriately. 'packet' must have at least sizeof(struct > * ofp_packet_in) bytes of headroom. > diff --git a/ofproto/private.h b/ofproto/private.h > index c6c18f1..67893ba 100644 > --- a/ofproto/private.h > +++ b/ofproto/private.h > @@ -96,7 +96,6 @@ rule_from_cls_rule(const struct cls_rule *cls_rule) > return cls_rule ? CONTAINER_OF(cls_rule, struct rule, cr) : NULL; > } > > -struct rule *ofproto_rule_lookup(struct ofproto *, const struct flow *); > void ofproto_rule_expire(struct rule *, uint8_t reason); > void ofproto_rule_destroy(struct rule *); > > -- > 1.7.4.4 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
