From patchwork Wed Mar 2 14:56:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 591002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id C9C7D1402D2 for ; Thu, 3 Mar 2016 01:57:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=6wind-com.20150623.gappssmtp.com header.i=@6wind-com.20150623.gappssmtp.com header.b=YQlCYYEi; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 868AC106A9; Wed, 2 Mar 2016 06:57:20 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 27D8A10694 for ; Wed, 2 Mar 2016 06:57:19 -0800 (PST) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id AEC9F1E0146 for ; Wed, 2 Mar 2016 07:57:18 -0700 (MST) X-ASG-Debug-ID: 1456930637-09eadd2b122b5180001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar5.cudamail.com with ESMTP id F8k0UhHfdbCCEDC9 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 02 Mar 2016 07:57:17 -0700 (MST) X-Barracuda-Envelope-From: quentin.monnet@6wind.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mail-wm0-f46.google.com) (74.125.82.46) by mx3-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 2 Mar 2016 14:57:15 -0000 Received-SPF: none (mx3-pf2.cudamail.com: domain at 6wind.com does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 74.125.82.46 X-Barracuda-RBL-IP: 74.125.82.46 Received: by mail-wm0-f46.google.com with SMTP id n186so89779252wmn.1 for ; Wed, 02 Mar 2016 06:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=ke03JxeLD2Fckj9xNMw0X6XPAMnEWD9Yr9PGisj5W9g=; b=YQlCYYEi4cH3nH1MmbRGRtgE38W+lof1gHkySQJCYsAvAVoLnXbN3O/NMAgsphYv+W 67VxSgfhzOebWihwboHubCoYOZW3S0uKYRG1r6m5B3kHHX+ZvwZibODyT1KzvktcSDb7 SKM3e6GJkG2MM4cYQk9iszuwqJDYeyiLAlvUc8IDnIiAhOPxcTSFd7gbidUpO+DYLEY4 D3xH/m2aS8Qa+6Y3YXL2u6g32DsVIzKn4iyCUPo3H4SBl13bEqXxTlMVw7Exbe+0n/in WuRt6kHIGenr27SOj4NktpJiPISepS3shPy647cCyP6Cwy2lzenF9DJtZiVJk5GH9YKl QIqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ke03JxeLD2Fckj9xNMw0X6XPAMnEWD9Yr9PGisj5W9g=; b=chnu3l9Ra7fkJG7qqTHjJM+L5yGBMuTTx4vIJa54WnuNu+Y4Q5rPyi+Cxz99LdlHv+ kNxn4VY22aHTyZWIOP1bz8D0jcpzLyVLE5AgwFb+qxe3U3Ru3RAoP32aXe7DFAEYPir0 WE6DA7hlOL6JV6HIfZ/03X4Gv7PMapgHMMqNZ1R5hjAdPrKLjP47SU7tQVdnnLuB/dvy +TqPjgA4im3VR7QqTt4ZuhTkkgo1We1fRkrZAA7mR0s/pMxpuMJzqUmfFldrNeMDPdvv C4dZp/SHR8NlmBuU/JI7BQmrm+PKVj4AEq1Ws5YQytOntexDdbNx8CWlvbBENZpY8x76 juQw== X-Gm-Message-State: AD7BkJJUjw/XQxoRwTMofZruej8VupWA7tajomLCZELD3AE/q2Z051uME1uQLg1+OFI3IVOQ X-Received: by 10.28.105.136 with SMTP id z8mr302768wmh.71.1456930633760; Wed, 02 Mar 2016 06:57:13 -0800 (PST) Received: from xspare.dev.6wind.com. (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id az8sm30189181wjc.17.2016.03.02.06.57.12 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Mar 2016 06:57:13 -0800 (PST) X-CudaMail-Envelope-Sender: quentin.monnet@6wind.com From: Quentin Monnet To: dev@openvswitch.org X-CudaMail-MID: CM-V2-301016342 X-CudaMail-DTE: 030216 X-CudaMail-Originating-IP: 74.125.82.46 Date: Wed, 2 Mar 2016 15:56:19 +0100 X-ASG-Orig-Subj: [##CM-V2-301016342##][PATCH v3 4/7] match: color output of match conditions for ovs-ofctl dump-flows Message-Id: <1456930582-8157-5-git-send-email-quentin.monnet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456930582-8157-1-git-send-email-quentin.monnet@6wind.com> References: <1456930582-8157-1-git-send-email-quentin.monnet@6wind.com> X-GBUdb-Analysis: 0, 74.125.82.46, Ugly c=0.44896 p=-0.564103 Source Normal X-MessageSniffer-Rules: 0-0-0-32767-c X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1456930637 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE7568M, BSF_SC5_MJ1963, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.27504 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.50 BSF_RULE7568M Custom Rule 7568M 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH v3 4/7] match: color output of match conditions for ovs-ofctl dump-flows X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Add color output for flow match conditions for ovs-ofctl dump-flows command utility, by inserting color markers in the functions responsible for printing those match condictions. Signed-off-by: Quentin Monnet --- lib/flow.c | 3 +- lib/match.c | 126 ++++++++++++++++++++++++++++++++++-------------------------- 2 files changed, 73 insertions(+), 56 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 2a7116b675da..5e962e231572 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -26,6 +26,7 @@ #include #include #include "byte-order.h" +#include "colors.h" #include "coverage.h" #include "csum.h" #include "dynamic-string.h" @@ -984,7 +985,7 @@ format_flags_masked(struct ds *ds, const char *name, uint32_t mask, uint32_t max_mask) { if (name) { - ds_put_format(ds, "%s=", name); + ds_put_format(ds, "%s%s=%s", colors.param, name, colors.end); } if (mask == max_mask) { diff --git a/lib/match.c b/lib/match.c index 95d34bc7011f..bbcfb4d99435 100644 --- a/lib/match.c +++ b/lib/match.c @@ -18,6 +18,7 @@ #include "match.h" #include #include "byte-order.h" +#include "colors.h" #include "dynamic-string.h" #include "ofp-util.h" #include "packets.h" @@ -868,7 +869,7 @@ format_eth_masked(struct ds *s, const char *name, const struct eth_addr eth, const struct eth_addr mask) { if (!eth_addr_is_zero(mask)) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); eth_format_masked(eth, &mask, s); ds_put_char(s, ','); } @@ -879,7 +880,7 @@ format_ip_netmask(struct ds *s, const char *name, ovs_be32 ip, ovs_be32 netmask) { if (netmask) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); ip_format_masked(ip, netmask, s); ds_put_char(s, ','); } @@ -891,7 +892,7 @@ format_ipv6_netmask(struct ds *s, const char *name, const struct in6_addr *netmask) { if (!ipv6_mask_is_any(netmask)) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); ipv6_format_masked(addr, netmask, s); ds_put_char(s, ','); } @@ -902,7 +903,7 @@ format_uint16_masked(struct ds *s, const char *name, uint16_t value, uint16_t mask) { if (mask != 0) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); if (mask == UINT16_MAX) { ds_put_format(s, "%"PRIu16, value); } else { @@ -917,7 +918,7 @@ format_be16_masked(struct ds *s, const char *name, ovs_be16 value, ovs_be16 mask) { if (mask != htons(0)) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); if (mask == OVS_BE16_MAX) { ds_put_format(s, "%"PRIu16, ntohs(value)); } else { @@ -933,7 +934,7 @@ format_be32_masked(struct ds *s, const char *name, ovs_be32 value, ovs_be32 mask) { if (mask != htonl(0)) { - ds_put_format(s, "%s=", name); + ds_put_format(s, "%s%s=%s", colors.param, name, colors.end); if (mask == OVS_BE32_MAX) { ds_put_format(s, "%"PRIu32, ntohl(value)); } else { @@ -949,7 +950,8 @@ format_uint32_masked(struct ds *s, const char *name, uint32_t value, uint32_t mask) { if (mask) { - ds_put_format(s, "%s=%#"PRIx32, name, value); + ds_put_format(s, "%s%s=%s%#"PRIx32, + colors.param, name, colors.end, value); if (mask != UINT32_MAX) { ds_put_format(s, "/%#"PRIx32, mask); } @@ -962,7 +964,8 @@ format_be64_masked(struct ds *s, const char *name, ovs_be64 value, ovs_be64 mask) { if (mask != htonll(0)) { - ds_put_format(s, "%s=%#"PRIx64, name, ntohll(value)); + ds_put_format(s, "%s%s=%s%#"PRIx64, + colors.param, name, colors.end, ntohll(value)); if (mask != OVS_BE64_MAX) { ds_put_format(s, "/%#"PRIx64, ntohll(mask)); } @@ -1014,7 +1017,7 @@ format_ct_label_masked(struct ds *s, const ovs_u128 *key, const ovs_u128 *mask) { if (!ovs_u128_is_zero(mask)) { ovs_be128 value = hton128(*key); - ds_put_format(s, "ct_label="); + ds_put_format(s, "%sct_label=%s", colors.param, colors.end); ds_put_hex(s, &value, sizeof value); if (!is_all_ones(mask, sizeof(*mask))) { value = hton128(*mask); @@ -1034,6 +1037,7 @@ match_format(const struct match *match, struct ds *s, int priority) size_t start_len = s->length; const struct flow *f = &match->flow; bool skip_type = false; + bool skip_proto = false; int i; @@ -1041,7 +1045,8 @@ match_format(const struct match *match, struct ds *s, int priority) BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35); if (priority != OFP_DEFAULT_PRIORITY) { - ds_put_format(s, "priority=%d,", priority); + ds_put_format(s, "%spriority=%s%d,", + colors.special, colors.end, priority); } format_uint32_masked(s, "pkt_mark", f->pkt_mark, wc->masks.pkt_mark); @@ -1057,22 +1062,24 @@ match_format(const struct match *match, struct ds *s, int priority) } if (wc->masks.conj_id) { - ds_put_format(s, "conj_id=%"PRIu32",", f->conj_id); + ds_put_format(s, "%sconj_id%s=%"PRIu32",", + colors.param, colors.end, f->conj_id); } if (wc->masks.skb_priority) { - ds_put_format(s, "skb_priority=%#"PRIx32",", f->skb_priority); + ds_put_format(s, "%sskb_priority=%s%#"PRIx32",", + colors.param, colors.end, f->skb_priority); } if (wc->masks.actset_output) { - ds_put_cstr(s, "actset_output="); + ds_put_format(s, "%sactset_output=%s", colors.param, colors.end); ofputil_format_port(f->actset_output, s); ds_put_char(s, ','); } if (wc->masks.ct_state) { if (wc->masks.ct_state == UINT16_MAX) { - ds_put_cstr(s, "ct_state="); + ds_put_format(s, "%sct_state=%s", colors.param, colors.end); if (f->ct_state) { format_flags(s, ct_state_to_string, f->ct_state, '|'); } else { @@ -1103,48 +1110,48 @@ match_format(const struct match *match, struct ds *s, int priority) if (wc->masks.nw_proto) { skip_proto = true; if (f->nw_proto == IPPROTO_ICMP) { - ds_put_cstr(s, "icmp,"); + ds_put_format(s, "%sicmp%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_IGMP) { - ds_put_cstr(s, "igmp,"); + ds_put_format(s, "%sigmp%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_TCP) { - ds_put_cstr(s, "tcp,"); + ds_put_format(s, "%stcp%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_UDP) { - ds_put_cstr(s, "udp,"); + ds_put_format(s, "%sudp%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_SCTP) { - ds_put_cstr(s, "sctp,"); + ds_put_format(s, "%ssctp%s,", colors.value, colors.end); } else { - ds_put_cstr(s, "ip,"); + ds_put_format(s, "%sip%s,", colors.value, colors.end); skip_proto = false; } } else { - ds_put_cstr(s, "ip,"); + ds_put_format(s, "%sip%s,", colors.value, colors.end); } } else if (f->dl_type == htons(ETH_TYPE_IPV6)) { if (wc->masks.nw_proto) { skip_proto = true; if (f->nw_proto == IPPROTO_ICMPV6) { - ds_put_cstr(s, "icmp6,"); + ds_put_format(s, "%sicmp6%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_TCP) { - ds_put_cstr(s, "tcp6,"); + ds_put_format(s, "%stcp6%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_UDP) { - ds_put_cstr(s, "udp6,"); + ds_put_format(s, "%sudp6%s,", colors.value, colors.end); } else if (f->nw_proto == IPPROTO_SCTP) { - ds_put_cstr(s, "sctp6,"); + ds_put_format(s, "%ssctp6%s,", colors.value, colors.end); } else { - ds_put_cstr(s, "ipv6,"); + ds_put_format(s, "%sipv6%s,", colors.value, colors.end); skip_proto = false; } } else { - ds_put_cstr(s, "ipv6,"); + ds_put_format(s, "%sipv6%s,", colors.value, colors.end); } } else if (f->dl_type == htons(ETH_TYPE_ARP)) { - ds_put_cstr(s, "arp,"); + ds_put_format(s, "%sarp%s,", colors.value, colors.end); } else if (f->dl_type == htons(ETH_TYPE_RARP)) { - ds_put_cstr(s, "rarp,"); + ds_put_format(s, "%srarp%s,", colors.value, colors.end); } else if (f->dl_type == htons(ETH_TYPE_MPLS)) { - ds_put_cstr(s, "mpls,"); + ds_put_format(s, "%smpls%s,", colors.value, colors.end); } else if (f->dl_type == htons(ETH_TYPE_MPLS_MCAST)) { - ds_put_cstr(s, "mplsm,"); + ds_put_format(s, "%smplsm%s,", colors.value, colors.end); } else { skip_type = false; } @@ -1163,7 +1170,7 @@ match_format(const struct match *match, struct ds *s, int priority) format_be64_masked(s, "metadata", f->metadata, wc->masks.metadata); if (wc->masks.in_port.ofp_port) { - ds_put_cstr(s, "in_port="); + ds_put_format(s, "%sin_port=%s", colors.param, colors.end); ofputil_format_port(f->in_port.ofp_port, s); ds_put_char(s, ','); } @@ -1177,35 +1184,39 @@ match_format(const struct match *match, struct ds *s, int priority) && (!pcp_mask || pcp_mask == htons(VLAN_PCP_MASK)) && (vid_mask || pcp_mask)) { if (vid_mask) { - ds_put_format(s, "dl_vlan=%"PRIu16",", - vlan_tci_to_vid(f->vlan_tci)); + ds_put_format(s, "%sdl_vlan=%s%"PRIu16",", colors.param, + colors.end, vlan_tci_to_vid(f->vlan_tci)); } if (pcp_mask) { - ds_put_format(s, "dl_vlan_pcp=%d,", - vlan_tci_to_pcp(f->vlan_tci)); + ds_put_format(s, "%sdl_vlan_pcp=%s%d,", colors.param, + colors.end, vlan_tci_to_pcp(f->vlan_tci)); } } else if (wc->masks.vlan_tci == htons(0xffff)) { - ds_put_format(s, "vlan_tci=0x%04"PRIx16",", ntohs(f->vlan_tci)); + ds_put_format(s, "%svlan_tci=%s0x%04"PRIx16",", colors.param, + colors.end, ntohs(f->vlan_tci)); } else { - ds_put_format(s, "vlan_tci=0x%04"PRIx16"/0x%04"PRIx16",", + ds_put_format(s, "%svlan_tci=%s0x%04"PRIx16"/0x%04"PRIx16",", + colors.param, colors.end, ntohs(f->vlan_tci), ntohs(wc->masks.vlan_tci)); } } format_eth_masked(s, "dl_src", f->dl_src, wc->masks.dl_src); format_eth_masked(s, "dl_dst", f->dl_dst, wc->masks.dl_dst); if (!skip_type && wc->masks.dl_type) { - ds_put_format(s, "dl_type=0x%04"PRIx16",", ntohs(f->dl_type)); + ds_put_format(s, "%sdl_type=%s0x%04"PRIx16",", + colors.param, colors.end, ntohs(f->dl_type)); } if (f->dl_type == htons(ETH_TYPE_IPV6)) { format_ipv6_netmask(s, "ipv6_src", &f->ipv6_src, &wc->masks.ipv6_src); format_ipv6_netmask(s, "ipv6_dst", &f->ipv6_dst, &wc->masks.ipv6_dst); if (wc->masks.ipv6_label) { if (wc->masks.ipv6_label == OVS_BE32_MAX) { - ds_put_format(s, "ipv6_label=0x%05"PRIx32",", + ds_put_format(s, "%sipv6_label=%s0x%05"PRIx32",", + colors.param, colors.end, ntohl(f->ipv6_label)); } else { - ds_put_format(s, "ipv6_label=0x%05"PRIx32"/0x%05"PRIx32",", - ntohl(f->ipv6_label), + ds_put_format(s, "%sipv6_label=%s0x%05"PRIx32"/0x%05"PRIx32",", + colors.param, colors.end, ntohl(f->ipv6_label), ntohl(wc->masks.ipv6_label)); } } @@ -1220,9 +1231,11 @@ match_format(const struct match *match, struct ds *s, int priority) if (!skip_proto && wc->masks.nw_proto) { if (f->dl_type == htons(ETH_TYPE_ARP) || f->dl_type == htons(ETH_TYPE_RARP)) { - ds_put_format(s, "arp_op=%"PRIu8",", f->nw_proto); + ds_put_format(s, "%sarp_op=%s%"PRIu8",", + colors.param, colors.end, f->nw_proto); } else { - ds_put_format(s, "nw_proto=%"PRIu8",", f->nw_proto); + ds_put_format(s, "%snw_proto=%s%"PRIu8",", + colors.param, colors.end, f->nw_proto); } } if (f->dl_type == htons(ETH_TYPE_ARP) || @@ -1231,28 +1244,31 @@ match_format(const struct match *match, struct ds *s, int priority) format_eth_masked(s, "arp_tha", f->arp_tha, wc->masks.arp_tha); } if (wc->masks.nw_tos & IP_DSCP_MASK) { - ds_put_format(s, "nw_tos=%"PRIu8",", f->nw_tos & IP_DSCP_MASK); + ds_put_format(s, "%snw_tos=%s%"PRIu8",", + colors.param, colors.end, f->nw_tos & IP_DSCP_MASK); } if (wc->masks.nw_tos & IP_ECN_MASK) { - ds_put_format(s, "nw_ecn=%"PRIu8",", f->nw_tos & IP_ECN_MASK); + ds_put_format(s, "%snw_ecn=%s%"PRIu8",", + colors.param, colors.end, f->nw_tos & IP_ECN_MASK); } if (wc->masks.nw_ttl) { - ds_put_format(s, "nw_ttl=%"PRIu8",", f->nw_ttl); + ds_put_format(s, "%snw_ttl=%s%"PRIu8",", + colors.param, colors.end, f->nw_ttl); } if (wc->masks.mpls_lse[0] & htonl(MPLS_LABEL_MASK)) { - ds_put_format(s, "mpls_label=%"PRIu32",", - mpls_lse_to_label(f->mpls_lse[0])); + ds_put_format(s, "%smpls_label=%s%"PRIu32",", colors.param, + colors.end, mpls_lse_to_label(f->mpls_lse[0])); } if (wc->masks.mpls_lse[0] & htonl(MPLS_TC_MASK)) { - ds_put_format(s, "mpls_tc=%"PRIu8",", + ds_put_format(s, "%smpls_tc=%s%"PRIu8",", colors.param, colors.end, mpls_lse_to_tc(f->mpls_lse[0])); } if (wc->masks.mpls_lse[0] & htonl(MPLS_TTL_MASK)) { - ds_put_format(s, "mpls_ttl=%"PRIu8",", + ds_put_format(s, "%smpls_ttl=%s%"PRIu8",", colors.param, colors.end, mpls_lse_to_ttl(f->mpls_lse[0])); } if (wc->masks.mpls_lse[0] & htonl(MPLS_BOS_MASK)) { - ds_put_format(s, "mpls_bos=%"PRIu8",", + ds_put_format(s, "%smpls_bos=%s%"PRIu8",", colors.param, colors.end, mpls_lse_to_bos(f->mpls_lse[0])); } format_be32_masked(s, "mpls_lse1", f->mpls_lse[1], wc->masks.mpls_lse[1]); @@ -1260,19 +1276,19 @@ match_format(const struct match *match, struct ds *s, int priority) switch (wc->masks.nw_frag) { case FLOW_NW_FRAG_ANY | FLOW_NW_FRAG_LATER: - ds_put_format(s, "nw_frag=%s,", + ds_put_format(s, "%snw_frag=%s%s,", colors.param, colors.end, f->nw_frag & FLOW_NW_FRAG_ANY ? (f->nw_frag & FLOW_NW_FRAG_LATER ? "later" : "first") : (f->nw_frag & FLOW_NW_FRAG_LATER ? "" : "no")); break; case FLOW_NW_FRAG_ANY: - ds_put_format(s, "nw_frag=%s,", + ds_put_format(s, "%snw_frag=%s%s,", colors.param, colors.end, f->nw_frag & FLOW_NW_FRAG_ANY ? "yes" : "no"); break; case FLOW_NW_FRAG_LATER: - ds_put_format(s, "nw_frag=%s,", + ds_put_format(s, "%snw_frag=%s%s,", colors.param, colors.end, f->nw_frag & FLOW_NW_FRAG_LATER ? "later" : "not_later"); break; }