[ovs-dev] [PATCH] ovs-dpctl: Don't print mask when all fields exact-match.

Arun Sharma arun.sharma at calsoftinc.com
Tue Apr 29 05:25:21 UTC 2014


For each field, if the mask is all zeros, don't print it at all,
if it is all ones, print it without the mask trailer.
If it is neither of those two, print the value and mask in the current
form.

Removed inconsistency in format 0x% and %#, kept %# for mask as hex
format.

Bug# 1191729

Reported-by: Justin Pettit <jpettit at nicira.com>
Signed-off-by: Arun Sharma <arun.sharma at calsoftinc.com>
---
 lib/odp-util.c        |  413 +++++++++++++++++++++++++++++++++++++------------
 lib/odp-util.h        |   36 +++++
 tests/odp.at          |   12 +-
 tests/ofproto-dpif.at |  133 ++++++++--------
 tests/tunnel.at       |   56 +++----
 5 files changed, 453 insertions(+), 197 deletions(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 8e95c9e..b102c28 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -345,6 +345,33 @@ format_vlan_tci(struct ds *ds, ovs_be16 vlan_tci)
 }
 
 static void
+format_vlan_tci_with_mask(struct ds *ds, ovs_be16 vlan_tci,
+                          ovs_be16 mask)
+{
+    if (vlan_tci_to_vid(mask) != 0) {
+        ds_put_format(ds, "vid=%"PRIu16, vlan_tci_to_vid(vlan_tci));
+        if ((vlan_tci_to_vid(mask) ^ (VLAN_VID_MASK >> VLAN_VID_SHIFT)) != 0) {
+            ds_put_format(ds, "/%#"PRIx16, vlan_tci_to_vid(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+    if (vlan_tci_to_pcp(mask) != 0) {
+        ds_put_format(ds, "pcp=%d", vlan_tci_to_pcp(vlan_tci));
+        if ((vlan_tci_to_pcp(mask) ^ (VLAN_PCP_MASK >> VLAN_PCP_SHIFT)) != 0) {
+            ds_put_format(ds, "/%#x", vlan_tci_to_pcp(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+    if (vlan_tci_to_cfi(mask) != 0) {
+        ds_put_format(ds, "cfi=%d", vlan_tci_to_cfi(vlan_tci));
+        if ((vlan_tci_to_cfi(mask) ^ (VLAN_CFI >> VLAN_CFI_SHIFT)) != 0) {
+            ds_put_format(ds, "/%d", vlan_tci_to_cfi(mask));
+        }
+    }
+    ds_chomp(ds, ',');
+}
+
+static void
 format_mpls_lse(struct ds *ds, ovs_be32 mpls_lse)
 {
     ds_put_format(ds, "label=%"PRIu32",tc=%d,ttl=%d,bos=%d",
@@ -355,6 +382,43 @@ format_mpls_lse(struct ds *ds, ovs_be32 mpls_lse)
 }
 
 static void
+format_mpls_lse_with_mask(struct ds *ds, ovs_be32 mpls_lse, ovs_be32 mask)
+{
+    if (mpls_lse_to_label(mask) != 0) {
+        ds_put_format(ds, "label=%"PRIu32, mpls_lse_to_label(mpls_lse));
+        if ((mpls_lse_to_label(mask)
+                ^ (MPLS_LABEL_MASK >> MPLS_LABEL_SHIFT)) != 0) {
+            ds_put_format(ds, "/%#x", mpls_lse_to_label(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+
+    if (mpls_lse_to_tc(mask) != 0) {
+        ds_put_format(ds, "tc=%d", mpls_lse_to_tc(mpls_lse));
+        if ((mpls_lse_to_tc(mask) ^ (MPLS_TC_MASK >> MPLS_TC_SHIFT)) != 0) {
+            ds_put_format(ds, "/%x", mpls_lse_to_tc(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+
+    if (mpls_lse_to_ttl(mask) != 0) {
+        ds_put_format(ds, "ttl=%d", mpls_lse_to_ttl(mpls_lse));
+        if ((mpls_lse_to_ttl(mask) ^ (MPLS_TTL_MASK >> MPLS_TTL_SHIFT)) != 0) {
+            ds_put_format(ds, "/%#x", mpls_lse_to_ttl(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+
+    if (mpls_lse_to_bos(mask) != 0) {
+        ds_put_format(ds, "bos=%d", mpls_lse_to_bos(mpls_lse));
+        if ((mpls_lse_to_bos(mask) ^ (MPLS_BOS_MASK >> MPLS_BOS_SHIFT)) != 0) {
+            ds_put_format(ds, "/%x", mpls_lse_to_bos(mask));
+        }
+    }
+    ds_chomp(ds, ',');
+}
+
+static void
 format_mpls(struct ds *ds, const struct ovs_key_mpls *mpls_key,
             const struct ovs_key_mpls *mpls_mask, int n)
 {
@@ -365,12 +429,7 @@ format_mpls(struct ds *ds, const struct ovs_key_mpls *mpls_key,
             format_mpls_lse(ds, key);
         } else {
             ovs_be32 mask = mpls_mask->mpls_lse;
-
-            ds_put_format(ds, "label=%"PRIu32"/0x%x,tc=%d/%x,ttl=%d/0x%x,bos=%d/%x",
-                          mpls_lse_to_label(key), mpls_lse_to_label(mask),
-                          mpls_lse_to_tc(key), mpls_lse_to_tc(mask),
-                          mpls_lse_to_ttl(key), mpls_lse_to_ttl(mask),
-                          mpls_lse_to_bos(key), mpls_lse_to_bos(mask));
+            format_mpls_lse_with_mask(ds, key, mask);
         }
     } else {
         int i;
@@ -1001,6 +1060,180 @@ odp_portno_names_destroy(struct hmap *portno_names)
     }
 }
 
+void
+odp_ds_put_8_using_fmt(struct ds *ds, const char *field,
+                       uint8_t value, const char *value_fmt,
+                       uint8_t mask, const char *mask_fmt)
+{
+    if ((mask & 0xff) != 0) {
+        char *value_fmt_str = xmalloc(strlen(value_fmt) + 4);
+        snprintf(value_fmt_str, sizeof(value_fmt_str), "%%s=%s", value_fmt);
+        ds_put_format(ds, value_fmt_str, field, value);
+        free(value_fmt_str);
+        if ((mask ^ 0xff) != 0) {
+            char *mask_fmt_str = xmalloc(strlen(mask_fmt) + 2);
+            snprintf(mask_fmt_str, sizeof(mask_fmt_str), "/%s", mask_fmt);
+            ds_put_format(ds, mask_fmt_str, mask);
+            free(mask_fmt_str);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_8(struct ds *ds, const char *field, uint8_t value, uint8_t mask)
+{
+    const char *value_fmt = "%"PRIu8;
+    const char *mask_fmt = "%#"PRIx8;
+    odp_ds_put_8_using_fmt(ds, field, value, value_fmt, mask, mask_fmt);
+}
+
+void
+odp_ds_put_16_using_fmt(struct ds *ds, const char *field,
+                        ovs_be16 value, const char *value_fmt,
+                        ovs_be16 mask, const char *mask_fmt)
+{
+    if (mask != htons(0)) {
+        char *value_fmt_str = xmalloc(strlen(value_fmt) + 4);
+        snprintf(value_fmt_str, sizeof(value_fmt_str), "%%s=%s", value_fmt);
+        ds_put_format(ds, value_fmt_str, field, ntohs(value));
+        free(value_fmt_str);
+        if ((mask ^ OVS_BE16_MAX) != 0) {
+            char *mask_fmt_str = xmalloc(strlen(mask_fmt) + 2);
+            snprintf(mask_fmt_str, sizeof(mask_fmt_str), "/%s", mask_fmt);
+            ds_put_format(ds, mask_fmt_str, ntohs(mask));
+            free(mask_fmt_str);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_16(struct ds *ds, const char *field, ovs_be16 value, ovs_be16 mask)
+{
+    const char *value_fmt = "%"PRIu16;
+    const char *mask_fmt = "%#"PRIx16;
+    odp_ds_put_16_using_fmt(ds, field, value, value_fmt, mask, mask_fmt);
+}
+
+void
+odp_ds_put_32_using_fmt(struct ds *ds, const char *field,
+                        ovs_be32 value, const char *value_fmt,
+                        ovs_be32 mask, const char *mask_fmt)
+{
+    if (mask != htonl(0)) {
+        char *value_fmt_str = xmalloc(strlen(value_fmt) + 4);
+        snprintf(value_fmt_str, sizeof(value_fmt_str), "%%s=%s", value_fmt);
+        ds_put_format(ds, value_fmt_str, field, ntohl(value));
+        free(value_fmt_str);
+        if ((mask ^ OVS_BE32_MAX) != 0) {
+            char *mask_fmt_str = xmalloc(strlen(mask_fmt) + 2);
+            snprintf(mask_fmt_str, sizeof(mask_fmt_str), "/%s", mask_fmt);
+            ds_put_format(ds, mask_fmt_str, ntohl(mask));
+            free(mask_fmt_str);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_32(struct ds *ds, const char *field, ovs_be32 value, ovs_be32 mask)
+{
+    const char *value_fmt = "%"PRIu32;
+    const char *mask_fmt = "%#"PRIx32;
+    odp_ds_put_32_using_fmt(ds, field, value, value_fmt, mask, mask_fmt);
+}
+
+void
+odp_ds_put_64(struct ds *ds, const char *field,
+              ovs_be64 value, ovs_be64 mask)
+{
+    if (mask != htonll(0)) {
+        ds_put_format(ds, "%s=%#"PRIx64, field, ntohll(value));
+        if ((mask ^ OVS_BE64_MAX) != 0) {
+            ds_put_format(ds, "/%#"PRIx64, ntohll(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_64_using_fmt(struct ds *ds, const char *field,
+                        ovs_be64 value, char *value_fmt,
+                        ovs_be64 mask, char *mask_fmt)
+{
+    if (mask != htonll(0)) {
+        char *value_fmt_str = xmalloc(strlen(value_fmt) + 4);
+        snprintf(value_fmt_str, sizeof(value_fmt_str), "%%s=%s", value_fmt);
+        ds_put_format(ds, value_fmt_str, field, ntohll(value));
+        free(value_fmt_str);
+        if ((mask ^ OVS_BE64_MAX) != 0) {
+            char *mask_fmt_str = xmalloc(strlen(mask_fmt) + 2);
+            snprintf(mask_fmt_str, sizeof(mask_fmt_str), "/%s", mask_fmt);
+            ds_put_format(ds, mask_fmt_str, ntohll(mask));
+            free(mask_fmt_str);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_ip(struct ds *ds, const char *field,
+              const ovs_be32 value, const ovs_be32 mask)
+{
+    if (mask != htonl(0)) {
+        ds_put_format(ds, "%s="IP_FMT"", field, IP_ARGS(value));
+        if ((mask ^ OVS_BE32_MAX) != 0) {
+            ds_put_format(ds, "/"IP_FMT"", IP_ARGS(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_ip6(struct ds *ds, const char *field, const ovs_be32 value[4],
+               const ovs_be32 mask[4])
+{
+    if (!ipv6_mask_is_any((const struct in6_addr *)mask)) {
+        char ip6_str[INET6_ADDRSTRLEN];
+        inet_ntop(AF_INET6, value, ip6_str, sizeof ip6_str);
+        ds_put_format(ds, "%s=%s", field, ip6_str);
+        if (!ipv6_mask_is_exact((const struct in6_addr *)mask)) {
+            char ip6_mask_str[INET6_ADDRSTRLEN];
+            inet_ntop(AF_INET6, mask, ip6_mask_str, sizeof ip6_mask_str);
+            ds_put_format(ds, "/%s", ip6_mask_str);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_mac(struct ds *ds, const char *field,
+               const uint8_t value[ETH_ADDR_LEN],
+               const uint8_t mask[ETH_ADDR_LEN])
+{
+    if (!eth_addr_is_zero(mask)) {
+        ds_put_format(ds, "%s="ETH_ADDR_FMT"", field, ETH_ADDR_ARGS(value));
+        if (mask && !eth_mask_is_exact(mask)) {
+            ds_put_format(ds, "/"ETH_ADDR_FMT"", ETH_ADDR_ARGS(mask));
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
+void
+odp_ds_put_str_mask_8(struct ds *ds, const char *field, const char *value,
+                      uint8_t mask)
+{
+    if ((mask & 0xff) != 0) {
+        ds_put_format(ds, "%s=%s", field, value);
+        if ((mask ^ 0xff) != 0) {
+            ds_put_format(ds, "/%#"PRIx8, mask);
+        }
+        ds_put_char(ds, ',');
+    }
+}
+
 static void
 format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
                     const struct hmap *portno_names, struct ds *ds,
@@ -1074,16 +1307,19 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
 
             memset(&tun_mask, 0, sizeof tun_mask);
             odp_tun_key_from_attr(ma, &tun_mask);
-            ds_put_format(ds, "tun_id=%#"PRIx64"/%#"PRIx64
-                          ",src="IP_FMT"/"IP_FMT",dst="IP_FMT"/"IP_FMT
-                          ",tos=%#"PRIx8"/%#"PRIx8",ttl=%"PRIu8"/%#"PRIx8
-                          ",flags(",
-                          ntohll(tun_key.tun_id), ntohll(tun_mask.tun_id),
-                          IP_ARGS(tun_key.ip_src), IP_ARGS(tun_mask.ip_src),
-                          IP_ARGS(tun_key.ip_dst), IP_ARGS(tun_mask.ip_dst),
-                          tun_key.ip_tos, tun_mask.ip_tos,
-                          tun_key.ip_ttl, tun_mask.ip_ttl);
 
+            odp_ds_put_64_using_fmt(ds, "tun_id", tun_key.tun_id, "%#"PRIx64,
+                                    tun_mask.tun_id, "%#"PRIx64);
+
+            odp_ds_put_ip(ds, "src", tun_key.ip_src, tun_mask.ip_src);
+            odp_ds_put_ip(ds, "dst", tun_key.ip_dst, tun_mask.ip_dst);
+
+            odp_ds_put_8_using_fmt(ds, "tos", tun_key.ip_tos, "%#"PRIx8,
+                                   tun_mask.ip_tos, "%#"PRIx8);
+
+            odp_ds_put_8(ds, "ttl", tun_key.ip_ttl, tun_mask.ip_ttl);
+
+            ds_put_format(ds, "flags(");
             format_flags(ds, flow_tun_flag_to_string, tun_key.flags, ',');
 
             /* XXX This code is correct, but enabling it would break the unit
@@ -1094,8 +1330,8 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             */
             ds_put_char(ds, ')');
         } else {
-            ds_put_format(ds, "tun_id=0x%"PRIx64",src="IP_FMT",dst="IP_FMT","
-                          "tos=0x%"PRIx8",ttl=%"PRIu8",flags(",
+            ds_put_format(ds, "tun_id=%#"PRIx64",src="IP_FMT",dst="IP_FMT","
+                          "tos=%#"PRIx8",ttl=%"PRIu8",flags(",
                           ntohll(tun_key.tun_id),
                           IP_ARGS(tun_key.ip_src),
                           IP_ARGS(tun_key.ip_dst),
@@ -1125,15 +1361,11 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
 
     case OVS_KEY_ATTR_ETHERNET:
         if (!is_exact) {
-            const struct ovs_key_ethernet *eth_mask = nl_attr_get(ma);
             const struct ovs_key_ethernet *eth_key = nl_attr_get(a);
-
-            ds_put_format(ds, "src="ETH_ADDR_FMT"/"ETH_ADDR_FMT
-                          ",dst="ETH_ADDR_FMT"/"ETH_ADDR_FMT,
-                          ETH_ADDR_ARGS(eth_key->eth_src),
-                          ETH_ADDR_ARGS(eth_mask->eth_src),
-                          ETH_ADDR_ARGS(eth_key->eth_dst),
-                          ETH_ADDR_ARGS(eth_mask->eth_dst));
+            const struct ovs_key_ethernet *eth_mask = nl_attr_get(ma);
+            odp_ds_put_mac(ds, "src", eth_key->eth_src, eth_mask->eth_src);
+            odp_ds_put_mac(ds, "dst", eth_key->eth_dst, eth_mask->eth_dst);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_ethernet *eth_key = nl_attr_get(a);
 
@@ -1148,13 +1380,7 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             ovs_be16 vlan_tci = nl_attr_get_be16(a);
             if (!is_exact) {
                 ovs_be16 mask = nl_attr_get_be16(ma);
-                ds_put_format(ds, "vid=%"PRIu16"/0x%"PRIx16",pcp=%d/0x%x,cfi=%d/%d",
-                              vlan_tci_to_vid(vlan_tci),
-                              vlan_tci_to_vid(mask),
-                              vlan_tci_to_pcp(vlan_tci),
-                              vlan_tci_to_pcp(mask),
-                              vlan_tci_to_cfi(vlan_tci),
-                              vlan_tci_to_cfi(mask));
+                format_vlan_tci_with_mask(ds, vlan_tci, mask);
             } else {
                 format_vlan_tci(ds, vlan_tci);
             }
@@ -1196,18 +1422,20 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_ipv4 *ipv4_key = nl_attr_get(a);
             const struct ovs_key_ipv4 *ipv4_mask = nl_attr_get(ma);
 
-            ds_put_format(ds, "src="IP_FMT"/"IP_FMT",dst="IP_FMT"/"IP_FMT
-                          ",proto=%"PRIu8"/%#"PRIx8",tos=%#"PRIx8"/%#"PRIx8
-                          ",ttl=%"PRIu8"/%#"PRIx8",frag=%s/%#"PRIx8,
-                          IP_ARGS(ipv4_key->ipv4_src),
-                          IP_ARGS(ipv4_mask->ipv4_src),
-                          IP_ARGS(ipv4_key->ipv4_dst),
-                          IP_ARGS(ipv4_mask->ipv4_dst),
-                          ipv4_key->ipv4_proto, ipv4_mask->ipv4_proto,
-                          ipv4_key->ipv4_tos, ipv4_mask->ipv4_tos,
-                          ipv4_key->ipv4_ttl, ipv4_mask->ipv4_ttl,
-                          ovs_frag_type_to_string(ipv4_key->ipv4_frag),
-                          ipv4_mask->ipv4_frag);
+            odp_ds_put_ip(ds, "src", ipv4_key->ipv4_src, ipv4_mask->ipv4_src);
+            odp_ds_put_ip(ds, "dst", ipv4_key->ipv4_dst, ipv4_mask->ipv4_dst);
+            odp_ds_put_8(ds, "proto", ipv4_key->ipv4_proto,
+                         ipv4_mask->ipv4_proto);
+
+            odp_ds_put_8_using_fmt(ds, "tos", ipv4_key->ipv4_tos, "%#"PRIx8,
+                                   ipv4_mask->ipv4_tos, "%#"PRIx8);
+
+            odp_ds_put_8(ds, "ttl", ipv4_key->ipv4_ttl, ipv4_mask->ipv4_ttl);
+
+            odp_ds_put_str_mask_8(ds, "frag",
+                                  ovs_frag_type_to_string(ipv4_key->ipv4_frag),
+                                  ipv4_mask->ipv4_frag);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_ipv4 *ipv4_key = nl_attr_get(a);
 
@@ -1224,30 +1452,27 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
     case OVS_KEY_ATTR_IPV6:
         if (!is_exact) {
             const struct ovs_key_ipv6 *ipv6_key, *ipv6_mask;
-            char src_str[INET6_ADDRSTRLEN];
-            char dst_str[INET6_ADDRSTRLEN];
-            char src_mask[INET6_ADDRSTRLEN];
-            char dst_mask[INET6_ADDRSTRLEN];
-
             ipv6_key = nl_attr_get(a);
-            inet_ntop(AF_INET6, ipv6_key->ipv6_src, src_str, sizeof src_str);
-            inet_ntop(AF_INET6, ipv6_key->ipv6_dst, dst_str, sizeof dst_str);
-
             ipv6_mask = nl_attr_get(ma);
-            inet_ntop(AF_INET6, ipv6_mask->ipv6_src, src_mask, sizeof src_mask);
-            inet_ntop(AF_INET6, ipv6_mask->ipv6_dst, dst_mask, sizeof dst_mask);
-
-            ds_put_format(ds, "src=%s/%s,dst=%s/%s,label=%#"PRIx32"/%#"PRIx32
-                          ",proto=%"PRIu8"/%#"PRIx8",tclass=%#"PRIx8"/%#"PRIx8
-                          ",hlimit=%"PRIu8"/%#"PRIx8",frag=%s/%#"PRIx8,
-                          src_str, src_mask, dst_str, dst_mask,
-                          ntohl(ipv6_key->ipv6_label),
-                          ntohl(ipv6_mask->ipv6_label),
-                          ipv6_key->ipv6_proto, ipv6_mask->ipv6_proto,
-                          ipv6_key->ipv6_tclass, ipv6_mask->ipv6_tclass,
-                          ipv6_key->ipv6_hlimit, ipv6_mask->ipv6_hlimit,
-                          ovs_frag_type_to_string(ipv6_key->ipv6_frag),
-                          ipv6_mask->ipv6_frag);
+            odp_ds_put_ip6(ds, "src", ipv6_key->ipv6_src, ipv6_mask->ipv6_src);
+            odp_ds_put_ip6(ds, "dst", ipv6_key->ipv6_dst, ipv6_mask->ipv6_dst);
+
+            odp_ds_put_32_using_fmt(ds, "label",
+                                    ipv6_key->ipv6_label, "%#"PRIx32,
+                                    ipv6_mask->ipv6_label, "%#"PRIx32);
+            odp_ds_put_8(ds, "proto", ipv6_key->ipv6_proto,
+                         ipv6_mask->ipv6_proto);
+
+            odp_ds_put_8_using_fmt(ds, "tclass",
+                                   ipv6_key->ipv6_tclass, "%#"PRIx8,
+                                   ipv6_mask->ipv6_tclass, "%#"PRIx8);
+            odp_ds_put_8(ds, "hlimit", ipv6_key->ipv6_hlimit,
+                         ipv6_mask->ipv6_hlimit);
+
+            odp_ds_put_str_mask_8(ds, "frag",
+                                  ovs_frag_type_to_string(ipv6_key->ipv6_frag),
+                                  ipv6_mask->ipv6_frag);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_ipv6 *ipv6_key;
             char src_str[INET6_ADDRSTRLEN];
@@ -1271,10 +1496,9 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_tcp *tcp_mask = nl_attr_get(ma);
             const struct ovs_key_tcp *tcp_key = nl_attr_get(a);
 
-            ds_put_format(ds, "src=%"PRIu16"/%#"PRIx16
-                          ",dst=%"PRIu16"/%#"PRIx16,
-                          ntohs(tcp_key->tcp_src), ntohs(tcp_mask->tcp_src),
-                          ntohs(tcp_key->tcp_dst), ntohs(tcp_mask->tcp_dst));
+            odp_ds_put_16(ds, "src", tcp_key->tcp_src, tcp_mask->tcp_src);
+            odp_ds_put_16(ds, "dst", tcp_key->tcp_dst, tcp_mask->tcp_dst);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_tcp *tcp_key = nl_attr_get(a);
 
@@ -1295,10 +1519,9 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_udp *udp_mask = nl_attr_get(ma);
             const struct ovs_key_udp *udp_key = nl_attr_get(a);
 
-            ds_put_format(ds, "src=%"PRIu16"/%#"PRIx16
-                          ",dst=%"PRIu16"/%#"PRIx16,
-                          ntohs(udp_key->udp_src), ntohs(udp_mask->udp_src),
-                          ntohs(udp_key->udp_dst), ntohs(udp_mask->udp_dst));
+            odp_ds_put_16(ds, "src", udp_key->udp_src, udp_mask->udp_src);
+            odp_ds_put_16(ds, "dst", udp_key->udp_dst, udp_mask->udp_dst);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_udp *udp_key = nl_attr_get(a);
 
@@ -1312,10 +1535,9 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_sctp *sctp_mask = nl_attr_get(ma);
             const struct ovs_key_sctp *sctp_key = nl_attr_get(a);
 
-            ds_put_format(ds, "src=%"PRIu16"/%#"PRIx16
-                          ",dst=%"PRIu16"/%#"PRIx16,
-                          ntohs(sctp_key->sctp_src), ntohs(sctp_mask->sctp_src),
-                          ntohs(sctp_key->sctp_dst), ntohs(sctp_mask->sctp_dst));
+            odp_ds_put_16(ds, "src", sctp_key->sctp_src, sctp_mask->sctp_src);
+            odp_ds_put_16(ds, "dst", sctp_key->sctp_dst, sctp_mask->sctp_dst);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_sctp *sctp_key = nl_attr_get(a);
 
@@ -1329,9 +1551,11 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_icmp *icmp_mask = nl_attr_get(ma);
             const struct ovs_key_icmp *icmp_key = nl_attr_get(a);
 
-            ds_put_format(ds, "type=%"PRIu8"/%#"PRIx8",code=%"PRIu8"/%#"PRIx8,
-                          icmp_key->icmp_type, icmp_mask->icmp_type,
-                          icmp_key->icmp_code, icmp_mask->icmp_code);
+            odp_ds_put_8(ds, "type", icmp_key->icmp_type,
+                         icmp_mask->icmp_type);
+            odp_ds_put_8(ds, "code", icmp_key->icmp_code,
+                         icmp_mask->icmp_code);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_icmp *icmp_key = nl_attr_get(a);
 
@@ -1345,9 +1569,11 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_icmpv6 *icmpv6_mask = nl_attr_get(ma);
             const struct ovs_key_icmpv6 *icmpv6_key = nl_attr_get(a);
 
-            ds_put_format(ds, "type=%"PRIu8"/%#"PRIx8",code=%"PRIu8"/%#"PRIx8,
-                          icmpv6_key->icmpv6_type, icmpv6_mask->icmpv6_type,
-                          icmpv6_key->icmpv6_code, icmpv6_mask->icmpv6_code);
+            odp_ds_put_8(ds, "type", icmpv6_key->icmpv6_type,
+                         icmpv6_mask->icmpv6_type);
+            odp_ds_put_8(ds, "code", icmpv6_key->icmpv6_code,
+                         icmpv6_mask->icmpv6_code);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_icmpv6 *icmpv6_key = nl_attr_get(a);
 
@@ -1361,19 +1587,12 @@ format_odp_key_attr(const struct nlattr *a, const struct nlattr *ma,
             const struct ovs_key_arp *arp_mask = nl_attr_get(ma);
             const struct ovs_key_arp *arp_key = nl_attr_get(a);
 
-            ds_put_format(ds, "sip="IP_FMT"/"IP_FMT",tip="IP_FMT"/"IP_FMT
-                          ",op=%"PRIu16"/%#"PRIx16
-                          ",sha="ETH_ADDR_FMT"/"ETH_ADDR_FMT
-                          ",tha="ETH_ADDR_FMT"/"ETH_ADDR_FMT,
-                          IP_ARGS(arp_key->arp_sip),
-                          IP_ARGS(arp_mask->arp_sip),
-                          IP_ARGS(arp_key->arp_tip),
-                          IP_ARGS(arp_mask->arp_tip),
-                          ntohs(arp_key->arp_op), ntohs(arp_mask->arp_op),
-                          ETH_ADDR_ARGS(arp_key->arp_sha),
-                          ETH_ADDR_ARGS(arp_mask->arp_sha),
-                          ETH_ADDR_ARGS(arp_key->arp_tha),
-                          ETH_ADDR_ARGS(arp_mask->arp_tha));
+            odp_ds_put_ip(ds, "sip", arp_key->arp_sip, arp_mask->arp_sip);
+            odp_ds_put_ip(ds, "tip", arp_key->arp_tip, arp_mask->arp_tip);
+            odp_ds_put_16(ds, "op", arp_key->arp_op, arp_mask->arp_op);
+            odp_ds_put_mac(ds, "sha", arp_key->arp_sha, arp_mask->arp_sha);
+            odp_ds_put_mac(ds, "tha", arp_key->arp_tha, arp_mask->arp_tha);
+            ds_chomp(ds, ',');
         } else {
             const struct ovs_key_arp *arp_key = nl_attr_get(a);
 
diff --git a/lib/odp-util.h b/lib/odp-util.h
index 0dfbcca..edd8fe9 100644
--- a/lib/odp-util.h
+++ b/lib/odp-util.h
@@ -25,6 +25,7 @@
 #include "hash.h"
 #include "hmap.h"
 #include "openflow/openflow.h"
+#include "packets.h"
 #include "util.h"
 
 struct ds;
@@ -238,4 +239,39 @@ void odp_put_tunnel_action(const struct flow_tnl *tunnel,
 void odp_put_pkt_mark_action(const uint32_t pkt_mark,
                              struct ofpbuf *odp_actions);
 
+void odp_ds_put_8_using_fmt(struct ds *ds, const char *field,
+                            uint8_t value, const char *value_fmt,
+                            uint8_t mask, const char *mask_fmt);
+void odp_ds_put_8(struct ds *ds, const char *field,
+                  uint8_t value, uint8_t mask);
+
+void odp_ds_put_16_using_fmt(struct ds *ds, const char *field,
+                             ovs_be16 value, const char *value_fmt,
+                             ovs_be16 mask, const char *mask_fmt);
+void odp_ds_put_16(struct ds *ds, const char *field,
+                   ovs_be16 value, ovs_be16 mask);
+
+void odp_ds_put_32_using_fmt(struct ds *ds, const char *field,
+                             ovs_be32 value, const char *value_fmt,
+                             ovs_be32 mask, const char *mask_fmt);
+void odp_ds_put_32(struct ds *ds, const char *field,
+                   ovs_be32 value, ovs_be32 mask);
+
+void odp_ds_put_64_using_fmt(struct ds *ds, const char *field,
+                             ovs_be64 value, char *value_fmt,
+                             ovs_be64 mask, char *mask_fmt);
+void odp_ds_put_64(struct ds *ds, const char *field,
+                   ovs_be64 value, ovs_be64 mask);
+
+void odp_ds_put_ip(struct ds *ds, const char *field,
+                   const ovs_be32 value, const ovs_be32 mask);
+void odp_ds_put_ip6(struct ds *ds, const char *field,
+                    const __be32 value[4], const __be32 mask[4]);
+void odp_ds_put_mac(struct ds *ds, const char *field,
+                    const uint8_t value[ETH_ADDR_LEN],
+                    const uint8_t mask[ETH_ADDR_LEN]);
+
+void odp_ds_put_str_mask_8(struct ds *ds, const char *field,
+                           const char * value, uint8_t mask);
+
 #endif /* odp-util.h */
diff --git a/tests/odp.at b/tests/odp.at
index 34bc187..4c0fe7a 100644
--- a/tests/odp.at
+++ b/tests/odp.at
@@ -42,7 +42,7 @@ s/^/skb_priority(0),skb_mark(0),/
 
  echo
  echo '# Valid forms with tunnel header.'
- sed 's/^/skb_priority(0),tunnel(tun_id=0x7f10354,src=10.10.10.10,dst=20.20.20.20,tos=0x0,ttl=64,flags(csum,key)),skb_mark(0x1234),/' odp-base.txt
+ sed 's/^/skb_priority(0),tunnel(tun_id=0x7f10354,src=10.10.10.10,dst=20.20.20.20,tos=0,ttl=64,flags(csum,key)),skb_mark(0x1234),/' odp-base.txt
 
  echo
  echo '# Valid forms with VLAN header.'
@@ -104,11 +104,11 @@ in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,ttl=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff00,dst=6632/0xff)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,ttl=128,frag=no),udp(src=81/0xff,dst=6632/0xff00)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,ttl=128,frag=no),icmp(type=1/0xf0,code=2/0xff)
+in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,ttl=128,frag=no),icmp(type=1/0xf0,code=2/0xf0)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1/::255,dst=::2/::255,label=0/0xf0,proto=10/0xf0,tclass=0x70/0xf0,hlimit=128/0xf0,frag=no/0xf0)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=6,tclass=0,hlimit=128,frag=no),tcp(src=80/0xff00,dst=8080/0xff)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=17,tclass=0,hlimit=128,frag=no),udp(src=6630/0xff00,dst=22/0xff)
-in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=1/0xf0,code=2/0xff)
+in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=1/0xf0,code=2/0xf0)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=135,code=0),nd(target=::3/::250)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=135,code=0),nd(target=::3/::250,sll=00:05:06:07:08:09/ff:ff:ff:ff:ff:00)
 in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=58,tclass=0,hlimit=128,frag=no),icmpv6(type=136,code=0),nd(target=::3/::250,tll=00:0a:0b:0c:0d:0e/ff:ff:ff:ff:ff:00)
@@ -122,7 +122,7 @@ skb_mark(0x1234/0xfff0),in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:
 
  echo
  echo '# Valid forms with tunnel header.'
- sed 's/^/tunnel(tun_id=0x7f10354\/0xff,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,tos=0\/0xff,ttl=64\/0xff,flags(csum,key)),/' odp-base.txt
+ sed 's/^/tunnel(tun_id=0x7f10354\/0xf0,src=10.10.10.10\/255.255.255.0,dst=20.20.20.20\/255.255.255.0,tos=0\/0xf0,ttl=64\/0xf0,flags(csum,key)),/' odp-base.txt
 
  echo
  echo '# Valid forms with VLAN header.'
@@ -251,8 +251,8 @@ push_vlan(tpid=0x9100,vid=13,pcp=5)
 push_vlan(tpid=0x9100,vid=13,pcp=5,cfi=0)
 pop_vlan
 sample(sample=9.7%,actions(1,2,3,push_vlan(vid=1,pcp=2)))
-set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,csum,key)))
-set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)))
+set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,tos=0,ttl=64,flags(df,csum,key)))
+set(tunnel(tun_id=0xabcdef1234567890,src=1.1.1.1,dst=2.2.2.2,tos=0,ttl=64,flags(key)))
 ])
 AT_CHECK_UNQUOTED([ovstest test-odp parse-actions < actions.txt], [0],
   [`cat actions.txt`
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index a1442f9..e082e84 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -46,10 +46,10 @@ ovs-appctl time/warp 100
 sleep 1  # wait for forwarders process packets
 
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(2),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(2),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -90,12 +90,12 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:
 ovs-appctl time/warp 100
 ovs-appctl time/warp 100
 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port([[348]])' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:09/00:00:00:00:00:00,tha=50:54:00:00:00:09/00:00:00:00:00:00), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:0b/00:00:00:00:00:00,tha=50:54:00:00:00:0b/00:00:00:00:00:00), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(4),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3686,21 +3686,21 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
 AT_CHECK([ovs-appctl dpif/dump-flows br0 | sort | STRIP_USED], [0], [dnl
-skb_priority(0),recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:never, actions:drop
-skb_priority(0),recirc_id(0),in_port(2),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
 ])
 
 AT_CHECK([ovs-appctl dpif/dump-flows br1 | sort | STRIP_USED], [0], [dnl
-skb_priority(0),recirc_id(0),in_port(3),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
 ])
 
 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sort | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p1),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
-skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p2),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p1),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p2),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), packets:0, bytes:0, used:never, actions:drop
 ])
 
 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | sort | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p3),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
+skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(p3),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), packets:0, bytes:0, used:never, actions:drop
 ])
 
 OVS_VSWITCHD_STOP
@@ -3734,8 +3734,8 @@ for dl_src in 00 01; do
 done
 sleep 1  # wait for the datapath flow installed
 for dl_src in 00 01; do
-    AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
+    AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src" | STRIP_USED], [0], [dnl
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
 ])
 done
 
@@ -3774,8 +3774,8 @@ for dl_src in 00 01; do
 done
 sleep 1  # wait for the datapath flow installed
 for dl_src in 00 01; do
-    AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
+    AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src" | STRIP_USED], [0], [dnl
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
 ])
 done
 
@@ -3828,15 +3828,15 @@ dummy at ovs-dummy: hit:13 missed:2
 ])
 
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(100),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:101,3,2
-skb_priority(0),skb_mark(0/0),in_port(101),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:100,2,3
+skb_priority(0),skb_mark(0/0),in_port(100),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), actions:101,3,2
+skb_priority(0),skb_mark(0/0),in_port(101),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), actions:100,2,3
 ])
 
 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | FILTER_FLOW_DUMP], [0], [dnl
-skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(100),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), packets:9, bytes:540, used:0.0s, actions:101,3,2
+skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(100),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), packets:9, bytes:540, used:0.0s, actions:101,3,2
 ])
 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | FILTER_FLOW_DUMP], [0], [dnl
-skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(101),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), packets:4, bytes:240, used:0.0s, actions:100,2,3
+skb_priority(0),skb_mark(0/0),recirc_id(0),in_port(101),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), packets:4, bytes:240, used:0.0s, actions:100,2,3
 ])
 
 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
@@ -3886,7 +3886,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3903,8 +3903,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3922,8 +3922,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.4,proto=1,frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3941,8 +3941,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1,dst=2001:db8:3c4d:1:2:3:4:1,label=0,proto=99,tclass=0x70,hlimit=64,frag=no)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,dst=fe80::2/::,label=0/0,proto=10/0,tclass=0x70/0,hlimit=128/0,frag=no/0xff), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:ffff:fffc::,dst=2001:db8:3c4d:1:2:3:4:1/::,label=0/0,proto=99/0,tclass=0x70/0,hlimit=64/0,frag=no/0xff), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5,frag=no), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:ffff:fffc::,frag=no), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3958,7 +3958,7 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0xff,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(proto=1,frag=no),icmp(type=8), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3972,8 +3972,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -3991,8 +3991,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4021,8 +4021,8 @@ m4_define([CHECK_MEGAFLOW_NETFLOW],
   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
   sleep 1
   AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
 ])
   OVS_VSWITCHD_STOP
   AT_CLEANUP])
@@ -4045,8 +4045,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4066,8 +4066,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4104,8 +4104,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4123,8 +4123,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4143,8 +4143,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4162,8 +4162,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4185,7 +4185,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4207,8 +4207,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8100),vlan(vid=11/0xfff,pcp=7/0x0,cfi=1/1),encap(eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0)), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x8100),vlan(vid=11,cfi=1),encap(eth_type(0x0800),ipv4(frag=no),icmp()), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4227,8 +4227,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4245,8 +4245,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4272,8 +4272,8 @@ done
 sleep 1
 dnl The original flow is missing due to a revalidation.
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4296,15 +4296,16 @@ in_port=3,actions=output(4)
 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
 dnl will cause the packet to be dropped.
+
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0xfd/0x3,ttl=128/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0xfd/0xff,ttl=128/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(3),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0x1/0xff,ttl=64/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(tos=0xfd/0x3,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(3),eth(),eth_type(0x0800),ipv4(tos=0x1,ttl=64,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(3),eth(),eth_type(0x0800),ipv4(tos=0xfd,ttl=128,frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4322,8 +4323,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 sleep 1
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8/0,code=0/0), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no),icmp(), actions: <del>
+skb_priority(0),skb_mark(0/0),in_port(1),eth(),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(), actions: <del>
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -4350,8 +4351,8 @@ dnl MAC, so both the source and destination MAC addresses are
 dnl un-wildcarded, since the ODP commit functions update both the source
 dnl and destination MAC addresses.
 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/ff:ff:ff:ff:ff:ff),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:2
-skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
+skb_priority(0),skb_mark(0/0),in_port(1),eth(dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no),icmp(), actions:2
+skb_priority(0),skb_mark(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no),icmp(), actions:set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
diff --git a/tests/tunnel.at b/tests/tunnel.at
index aa16d58..695a624 100644
--- a/tests/tunnel.at
+++ b/tests/tunnel.at
@@ -24,13 +24,13 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 dnl remote_ip
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=1.2.3.4,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df))),1
 ])
 
 dnl local_ip, remote_ip
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=2.2.2.2,dst=1.1.1.1,tos=0,ttl=64,flags(df))),1
 ])
 
 dnl reconfigure, local_ip, remote_ip
@@ -45,15 +45,15 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 ])
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df))),1
 ])
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.3,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.3,dst=1.1.1.1,tos=0x0,ttl=1,flags(csum))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=2.2.2.3,dst=1.1.1.1,tos=0,ttl=1,flags(csum))),1
 ])
 
 dnl nonexistent tunnel
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=5.5.5.5,dst=6.6.6.6,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0,src=5.5.5.5,dst=6.6.6.6,tos=0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
 Invalid datapath flow
 ovs-appctl: ovs-vswitchd: server returned an error
 ])
@@ -129,7 +129,7 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 dnl Basic
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
+  [Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1
 ])
 
 dnl ECN
@@ -161,19 +161,19 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 dnl Basic
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x4,ttl=128,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=0.0.0.0,dst=1.1.1.1,tos=0x4,ttl=128,flags(df))),1
 ])
 
 dnl ECN
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=5,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x5,ttl=128,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=0.0.0.0,dst=1.1.1.1,tos=0x5,ttl=128,flags(df))),1
 ])
 
 dnl non-IP
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
+  [Datapath actions: set(tunnel(tun_id=0,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df))),1
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -204,10 +204,10 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x2,src=0.0.0.0,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x5,src=0.0.0.0,dst=4.4.4.4,tos=0x0,ttl=64,flags(df,key))),1
+set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x2,src=0.0.0.0,dst=2.2.2.2,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x5,src=0.0.0.0,dst=4.4.4.4,tos=0,ttl=64,flags(df,key))),1
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
@@ -235,23 +235,23 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
+set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1
 ])
 
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
+set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1
 ])
 
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
-set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
-set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
+set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,dnl
+set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1
 ])
 
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [2], [ignore], [dnl
@@ -287,22 +287,22 @@ AT_CHECK([ovs-appctl dpif/show | tail -n +3], [0], [dnl
 		p5 5/5: (dummy)
 ])
 
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [dnl
 Datapath actions: 3
 ])
 
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,tos=0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [dnl
-Datapath actions: 4,3,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,5
+Datapath actions: 4,3,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0,ttl=64,flags(df,key))),1,5
 ])
 
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,tos=0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [dnl
 Datapath actions: 4,3,5
 ])
 
-AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0,src=1.1.1.1,dst=2.2.2.2,tos=0,ttl=64,flags(key)),in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0], [dnl
 Datapath actions: drop
 ])
@@ -387,7 +387,7 @@ in_port=5 actions=set_field:5->tun_id
 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
 AT_CHECK([tail -1 stdout], [0],
-  [Datapath actions: set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=1.1.1.1,dst=4.4.4.4,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,key))),1
+  [Datapath actions: set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=1.1.1.1,tos=0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=3.3.3.3,tos=0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=1.1.1.1,dst=4.4.4.4,tos=0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=2.2.2.2,tos=0,ttl=64,flags(df,key))),1
 ])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
-- 
1.7.10.4




More information about the dev mailing list