[ovs-dev] [nxm 25/42] ofproto: Generalize tun_id_from_cookie into flow_format.
Justin Pettit
jpettit at nicira.com
Fri Nov 5 17:47:55 UTC 2010
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.
> @@ -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.
> @@ -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.
--Justin
More information about the dev
mailing list