From: Andy Zhou Date: Fri, 28 Jun 2013 22:20:49 +0000 (-0700) Subject: ovs-appctl: allow ofproto/trace to take mega flow input X-Git-Tag: v1.11.0~50 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=039ebcf1ec5ca2da59c5d22a1782dc04835c3dce ovs-appctl: allow ofproto/trace to take mega flow input ofproto/trace command was not updated to take mega flow input, which made it hard to use by cutting and pasting output from "ovs-dpctl dump-flows". (The mask is not actually used for tracing.) Bug #18267. Signed-off-by: Andy Zhou Signed-off-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3cdb88435..ff46e46e6 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -8240,7 +8240,7 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, int argc, const char *argv[], { const char *dpname = argv[1]; struct ofproto_dpif *ofproto; - struct ofpbuf odp_key; + struct ofpbuf odp_key, odp_mask; struct ofpbuf *packet; struct initial_vals initial_vals; struct ds result; @@ -8250,6 +8250,7 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, int argc, const char *argv[], packet = NULL; ofpbuf_init(&odp_key, 0); ds_init(&result); + ofpbuf_init(&odp_mask, 0); ofproto = ofproto_dpif_lookup(dpname); if (!ofproto) { @@ -8277,7 +8278,7 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, int argc, const char *argv[], /* Convert string to datapath key. */ ofpbuf_init(&odp_key, 0); - error = odp_flow_from_string(flow_s, NULL, &odp_key, NULL); + error = odp_flow_from_string(flow_s, NULL, &odp_key, &odp_mask); if (error) { unixctl_command_reply_error(conn, "Bad flow syntax"); goto exit; @@ -8352,6 +8353,7 @@ exit: ds_destroy(&result); ofpbuf_delete(packet); ofpbuf_uninit(&odp_key); + ofpbuf_uninit(&odp_mask); } static void