On Thu, Oct 17, 2013 at 08:04:10AM -0700, Gurucharan Shetty wrote:
> With mega-flows, many flows in the kernel datapath are wildcarded.
> For someone that is debugging a system and wants to find a particular
> flow and its actions, it is a little hard to zero-in on the flow
> because some fields are wildcarded.
> 
> With the filter='$filter' option, we can now filter on the o/p
> of 'ovs-dpctl dump-flows'.
> 
> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>

I like this a lot better.  Thank you!

I think that parse_ofp_exact_flow() might be better written this way:

            if (!strcmp(key, "in_port")
                && portno_names
                && simap_contains(portno_names, value_s)) {
                flow->in_port.ofp_port = u16_to_ofp(
                    simap_get(portno_names, value_s));
            } else {
                field_error = mf_parse_value(mf, value_s, &value);
                if (field_error) {
                    error = xasprintf("%s: bad value for %s (%s)",
                                      s, key, field_error);
                    free(field_error);
                    goto exit;
                }

                mf_set_flow_value(mf, &value, flow);
                if (mask) {
                    mf_mask_field(mf, mask);
                }
            }

rather than constructing a temporary string for the in_port.

I see a couple of uses of printf() followed by exit() in the utilities
and tests.  Can you use ovs_fatal() instead?

Acked-by: Ben Pfaff <b...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to