[ovs-dev] [nxm 31/42] ofproto: Change ofproto_add_flow(), ofproto_delete_flow() to take cls_rule.

Ben Pfaff blp at nicira.com
Mon Nov 8 18:21:25 UTC 2010


On Sat, Nov 06, 2010 at 12:52:57AM -0700, Justin Pettit wrote:
> On Oct 28, 2010, at 10:28 AM, Ben Pfaff wrote:
> 
> > diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> > index ccc4e32..a1ca841 100644
> > --- a/vswitchd/bridge.c
> > +++ b/vswitchd/bridge.c
> > ...
> > @@ -1770,14 +1771,14 @@ bridge_reconfigure_remotes(struct bridge *br,
> >     if (!n_controllers
> >         && ofproto_get_fail_mode(br->ofproto) == OFPROTO_FAIL_STANDALONE) {
> >         union ofp_action action;
> > -        struct flow flow;
> > +        struct cls_rule rule;
> 
> The fact that "rule" is used in some files to mean classifier's
> "struct cls_rule" and ofproto's "struct rule" elsewhere is confusing.
> It would be nice at some point to disambiguate both the variable and
> structure names consistently.  Maybe "cls_rule" and "ofp_rule" or
> something.

Well, it can only be confusing in ofproto.c, since that is the only
place that struct rule is declared and used.

This brings up a new discussion, though.  I've been trying to figure out
a better name for "ofproto".  Really this code is just a switch now, it
doesn't have much of a direct relationship to OpenFlow any longer.  So
I'd like a new name and a new prefix (other than "of").  But so far I
don't have one I like.  When we come up with one, then "struct rule"
would naturally want to use that prefix.




More information about the dev mailing list