Signed-off-by: Johnson Li <johnson...@intel.com> diff --git a/lib/match.c b/lib/match.c index db78831..f12c802 100644 --- a/lib/match.c +++ b/lib/match.c @@ -1046,6 +1046,40 @@ format_ct_label_masked(struct ds *s, const ovs_u128 *key, const ovs_u128 *mask) } } +static void +format_flow_nsh(struct ds *s, const struct match *match) +{ + const struct flow_wildcards *wc = &match->wc; + const struct flow_nsh *nsh = &match->flow.nsh; + + if (nsh->md_type) { + format_be32_masked(s, "nsp", nsh->nsp, wc->masks.nsh.nsp); + ds_put_format(s, "nsi=%"PRIu8",", nsh->nsi); + + if (wc->masks.nsh.flags) { + format_be32_masked(s, "flags", nsh->flags, wc->masks.nsh.flags); + } + if (wc->masks.nsh.md_type) { + ds_put_format(s, "md_type=%"PRIu8",", nsh->md_type); + } + if (wc->masks.nsh.next_proto) { + ds_put_format(s, "next_proto=%"PRIu8",", nsh->next_proto); + } + if (wc->masks.nsh.nshc1) { + format_be32_masked(s, "nshc1", nsh->nshc1, wc->masks.nsh.nshc1); + } + if (wc->masks.nsh.nshc2) { + format_be32_masked(s, "nshc2", nsh->nshc2, wc->masks.nsh.nshc2); + } + if (wc->masks.nsh.nshc3) { + format_be32_masked(s, "nshc3", nsh->nshc3, wc->masks.nsh.nshc3); + } + if (wc->masks.nsh.nshc4) { + format_be32_masked(s, "nshc4", nsh->nshc4, wc->masks.nsh.nshc4); + } + } +} + /* Appends a string representation of 'match' to 's'. If 'priority' is * different from OFP_DEFAULT_PRIORITY, includes it in 's'. */ void @@ -1187,6 +1221,8 @@ match_format(const struct match *match, struct ds *s, int priority) format_be64_masked(s, "metadata", f->metadata, wc->masks.metadata); + format_flow_nsh(s, match); + if (wc->masks.in_port.ofp_port) { ds_put_format(s, "%sin_port=%s", colors.param, colors.end); ofputil_format_port(f->in_port.ofp_port, s); -- 1.8.4.2
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev