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 <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
{
const struct dpif_backer *backer;
struct ofproto_dpif *ofproto;
{
const struct dpif_backer *backer;
struct ofproto_dpif *ofproto;
+ struct ofpbuf odp_key, odp_mask;
struct ofpbuf *packet;
struct ds result;
struct flow flow;
struct ofpbuf *packet;
struct ds result;
struct flow flow;
backer = NULL;
ds_init(&result);
ofpbuf_init(&odp_key, 0);
backer = NULL;
ds_init(&result);
ofpbuf_init(&odp_key, 0);
+ ofpbuf_init(&odp_mask, 0);
/* Handle "-generate" or a hex string as the last argument. */
if (!strcmp(argv[argc - 1], "-generate")) {
/* Handle "-generate" or a hex string as the last argument. */
if (!strcmp(argv[argc - 1], "-generate")) {
* bridge is specified. If function odp_flow_key_from_string()
* returns 0, the flow is a odp_flow. If function
* parse_ofp_exact_flow() returns 0, the flow is a br_flow. */
* bridge is specified. If function odp_flow_key_from_string()
* returns 0, the flow is a odp_flow. If function
* parse_ofp_exact_flow() returns 0, the flow is a br_flow. */
- if (!odp_flow_from_string(argv[argc - 1], NULL, &odp_key, NULL)) {
+ if (!odp_flow_from_string(argv[argc - 1], NULL, &odp_key, &odp_mask)) {
/* If the odp_flow is the second argument,
* the datapath name is the first argument. */
if (argc == 3) {
/* If the odp_flow is the second argument,
* the datapath name is the first argument. */
if (argc == 3) {
ds_destroy(&result);
ofpbuf_delete(packet);
ofpbuf_uninit(&odp_key);
ds_destroy(&result);
ofpbuf_delete(packet);
ofpbuf_uninit(&odp_key);
+ ofpbuf_uninit(&odp_mask);