[ovs-dev] [nxm 25/42] ofproto: Generalize tun_id_from_cookie into flow_format.

Ben Pfaff blp at nicira.com
Fri Nov 5 18:07:35 UTC 2010


On Fri, Nov 05, 2010 at 10:47:55AM -0700, Justin Pettit wrote:
> On Oct 28, 2010, at 10:27 AM, Ben Pfaff wrote:
> 
> > @@ -3266,7 +3267,7 @@ handle_flow_stats_request(struct ofproto *p, struct ofconn *ofconn,
> >     cbdata.ofconn = ofconn;
> >     cbdata.out_port = fsr->out_port;
> >     cbdata.msg = start_stats_reply(osr, 1024);
> > -    cls_rule_from_match(&fsr->match, 0, false, 0, &target);
> > +    cls_rule_from_match(&fsr->match, 0, p->flow_format, 0, &target);
> 
> Did you want to be passing "p->flow_format" in here or
> "NXFF_OPENFLOW10"?  The latter would be more consistent with what was
> previously defined, and I think is more correct.

You're right, thanks.

> > @@ -3380,7 +3381,7 @@ handle_aggregate_stats_request(struct ofproto *p, struct ofconn *ofconn,
> >     cbdata.packet_count = 0;
> >     cbdata.byte_count = 0;
> >     cbdata.n_flows = 0;
> > -    cls_rule_from_match(&asr->match, 0, false, 0, &target);
> > +    cls_rule_from_match(&asr->match, 0, p->flow_format, 0, &target);
> 
> Same here.

Ditto, thanks again.

> > @@ -3327,7 +3328,7 @@ ofproto_get_all_flows(struct ofproto *p, struct ds *results)
> >     cbdata.ofproto = p;
> >     cbdata.results = results;
> > 
> > -    cls_rule_from_match(&match, 0, false, 0, &target);
> > +    cls_rule_from_match(&match, 0, NXFF_OPENFLOW10, 0, &target);
> 
> The functionality shouldn't be any different since OVSFW_ALL is used,
> so I think using "p->flow_format" would be more consistent with the
> intent, which is to dump all flows.

I disagree in this case: we don't have a cookie to pass in, so why would
we claim that we do?  Either way, though, the result will be the same
(as you say).




More information about the dev mailing list