[ovs-dev] [PATCH] Change logging format for flows to that accepted by ofproto/trace.

Ethan Jackson ethan at nicira.com
Sat Oct 13 22:06:47 UTC 2012


Looks like it's on the right track, couple of nits:

We can probably always initialize the dl_type given that we only
handle ethernet and all packets have it.

There are a bunch of fields in flow->tunnel which we aren't masking.
I think for those we can follow the simple algorithm of, if any are
none zero, print them all.

There are quite a few fields which this code doesn't print even if
nonzero, ipv6_src, for example.  Of course, it would be strange to
have a nonzero ipv6_src when the ETH_TYPE is not IPv6, but since this
is used mostly for debugging, it's good to print it and bring
attention to the user of the discrepancy.

The cases for ICMP, ICMPv6 and flow->tp_src all simply set the tp_src
of the mask, and so can be collapsed.

I'm not sure I totally understand the changes to match_format().  If
the IP protocol is ICMP, does it really matter if the eth type is IP?
It would be strange if this is the case, but I don't see a reason not
to print it.  Also, if the tcp source and dest are masked, why not
print them like the original code does?

Ethan




On Fri, Oct 12, 2012 at 3:08 PM, Mehak Mahajan <mmahajan at nicira.com> wrote:
> flow_format() logs packets contents.  However, the format used is not
> the format accepted by ofproto/trace.  Hence it becomes difficult to
> trace the packets using the debugs printed.  With this commit, the
> logging of the packet contents is done in a format that is accepted
> by ofproto/trace.  This will make debugging easier.
>
> Signed-off-by: Mehak Mahajan <mmahajan at nicira.com>
> ---
>  lib/flow.c            |   88 ++---------------------------------------------
>  lib/match.c           |   91 +++++++++++++++++++++++++++++++++++++++++++++++--
>  lib/match.h           |    1 +
>  tests/ofp-print.at    |   16 ++++----
>  tests/ofproto-dpif.at |   56 +++++++++++++++---------------
>  tests/ofproto.at      |   12 +++---
>  6 files changed, 135 insertions(+), 129 deletions(-)
>
> diff --git a/lib/flow.c b/lib/flow.c
> index 76d2340..0c9aa36 100644
> --- a/lib/flow.c
> +++ b/lib/flow.c
> @@ -31,6 +31,7 @@
>  #include "csum.h"
>  #include "dynamic-string.h"
>  #include "hash.h"
> +#include "match.h"
>  #include "ofpbuf.h"
>  #include "openflow/openflow.h"
>  #include "packets.h"
> @@ -479,94 +480,13 @@ flow_to_string(const struct flow *flow)
>      return ds_cstr(&ds);
>  }
>
> -static void format_tunnel_flags(uint16_t flags, struct ds *ds)
> -{
> -    flags &= ~FLOW_TNL_F_KEY;
> -
> -    if (flags & FLOW_TNL_F_DONT_FRAGMENT) {
> -        ds_put_cstr(ds, ",df");
> -        flags &= ~FLOW_TNL_F_DONT_FRAGMENT;
> -    }
> -
> -    if (flags & FLOW_TNL_F_CSUM) {
> -        ds_put_cstr(ds, ",csum");
> -        flags &= ~FLOW_TNL_F_CSUM;
> -    }
> -
> -    if (flags) {
> -        ds_put_format(ds, ",flags:%#"PRIx16, flags);
> -    }
> -}
> -
>  void
>  flow_format(struct ds *ds, const struct flow *flow)
>  {
> -    ds_put_format(ds, "priority:%"PRIu32, flow->skb_priority);
> -
> -    if (flow->tunnel.ip_dst || flow->tunnel.tun_id) {
> -        ds_put_cstr(ds, ",tunnel(");
> -        ds_put_format(ds, IP_FMT"->"IP_FMT, IP_ARGS(&flow->tunnel.ip_src),
> -                                            IP_ARGS(&flow->tunnel.ip_dst));
> +    struct match match;
>
> -        if (flow->tunnel.flags & FLOW_TNL_F_KEY) {
> -            ds_put_format(ds, ",key:%#"PRIx64, ntohll(flow->tunnel.tun_id));
> -        }
> -        ds_put_format(ds, ",tos:%#"PRIx8",ttl:%"PRIu8, flow->tunnel.ip_tos,
> -                                                       flow->tunnel.ip_ttl);
> -        format_tunnel_flags(flow->tunnel.flags, ds);
> -        ds_put_char(ds, ')');
> -    }
> -
> -    ds_put_format(ds, ",metadata:%#"PRIx64
> -                      ",in_port:%04"PRIx16,
> -                      ntohll(flow->metadata),
> -                      flow->in_port);
> -
> -    ds_put_format(ds, ",tci(");
> -    if (flow->vlan_tci) {
> -        ds_put_format(ds, "vlan:%"PRIu16",pcp:%d",
> -                      vlan_tci_to_vid(flow->vlan_tci),
> -                      vlan_tci_to_pcp(flow->vlan_tci));
> -    } else {
> -        ds_put_char(ds, '0');
> -    }
> -    ds_put_format(ds, ") mac("ETH_ADDR_FMT"->"ETH_ADDR_FMT
> -                      ") type:%04"PRIx16,
> -                  ETH_ADDR_ARGS(flow->dl_src),
> -                  ETH_ADDR_ARGS(flow->dl_dst),
> -                  ntohs(flow->dl_type));
> -
> -    if (flow->dl_type == htons(ETH_TYPE_IPV6)) {
> -        ds_put_format(ds, " label:%#"PRIx32" proto:%"PRIu8" tos:%#"PRIx8
> -                          " ttl:%"PRIu8" ipv6(",
> -                      ntohl(flow->ipv6_label), flow->nw_proto,
> -                      flow->nw_tos, flow->nw_ttl);
> -        print_ipv6_addr(ds, &flow->ipv6_src);
> -        ds_put_cstr(ds, "->");
> -        print_ipv6_addr(ds, &flow->ipv6_dst);
> -        ds_put_char(ds, ')');
> -    } else if (flow->dl_type == htons(ETH_TYPE_IP) ||
> -               flow->dl_type == htons(ETH_TYPE_ARP)) {
> -        ds_put_format(ds, " proto:%"PRIu8" tos:%#"PRIx8" ttl:%"PRIu8
> -                          " ip("IP_FMT"->"IP_FMT")",
> -                          flow->nw_proto, flow->nw_tos, flow->nw_ttl,
> -                          IP_ARGS(&flow->nw_src), IP_ARGS(&flow->nw_dst));
> -    }
> -    if (flow->nw_frag) {
> -        ds_put_format(ds, " frag(%s)",
> -                      flow->nw_frag == FLOW_NW_FRAG_ANY ? "first"
> -                      : flow->nw_frag == (FLOW_NW_FRAG_ANY | FLOW_NW_FRAG_LATER)
> -                      ? "later" : "<error>");
> -    }
> -    if (flow->tp_src || flow->tp_dst) {
> -        ds_put_format(ds, " port(%"PRIu16"->%"PRIu16")",
> -                ntohs(flow->tp_src), ntohs(flow->tp_dst));
> -    }
> -    if (!eth_addr_is_zero(flow->arp_sha) || !eth_addr_is_zero(flow->arp_tha)) {
> -        ds_put_format(ds, " arp_ha("ETH_ADDR_FMT"->"ETH_ADDR_FMT")",
> -                ETH_ADDR_ARGS(flow->arp_sha),
> -                ETH_ADDR_ARGS(flow->arp_tha));
> -    }
> +    match_wc_init(&match, flow);
> +    match_format(&match, ds, flow->skb_priority);
>  }
>
>  void
> diff --git a/lib/match.c b/lib/match.c
> index b25569d..9d77605 100644
> --- a/lib/match.c
> +++ b/lib/match.c
> @@ -21,6 +21,10 @@
>  #include "byte-order.h"
>  #include "dynamic-string.h"
>  #include "packets.h"
> +#include "vlog.h"
> +
> +VLOG_DEFINE_THIS_MODULE(match);
> +
>
>  /* Converts the flow in 'flow' into a match in 'match', with the given
>   * 'wildcards'. */
> @@ -33,6 +37,85 @@ match_init(struct match *match,
>      match_zero_wildcarded_fields(match);
>  }
>
> +/* Converts a flow into a match.  It sets the wildcard masks based on
> + * the packet contents.  It will not set the mask for fields that do not
> + * make sense for the packet type. */
> +void
> +match_wc_init(struct match *match, const struct flow *flow)
> +{
> +    struct flow_wildcards *wc;
> +    int i;
> +
> +    match->flow = *flow;
> +    wc = &match->wc;
> +    memset(&wc->masks, 0x0, sizeof wc->masks);
> +
> +    if (flow->dl_type) {
> +        memset(&wc->masks.dl_type, 0xff, sizeof wc->masks.dl_type);
> +    }
> +
> +    if (flow->nw_proto) {
> +        memset(&wc->masks.nw_proto, 0xff, sizeof wc->masks.nw_proto);
> +    }
> +
> +    for (i = 0; i < FLOW_N_REGS; i++) {
> +        if (flow->regs[i]) {
> +            memset(&wc->masks.regs[i], 0xff, sizeof wc->masks.regs[i]);
> +        }
> +    }
> +
> +    if (flow->tunnel.ip_dst || flow->tunnel.tun_id) {
> +        memset(&wc->masks.tunnel.tun_id, 0xff, sizeof wc->masks.tunnel.tun_id);
> +    }
> +    memset(&wc->masks.metadata, 0xff, sizeof wc->masks.metadata);
> +    memset(&wc->masks.in_port, 0xff, sizeof wc->masks.in_port);
> +    memset(&wc->masks.vlan_tci, 0xff, sizeof wc->masks.vlan_tci);
> +    memset(&wc->masks.dl_src, 0xff, sizeof wc->masks.dl_src);
> +    memset(&wc->masks.dl_dst, 0xff, sizeof wc->masks.dl_dst);
> +
> +    if (flow->dl_type == htons(ETH_TYPE_IPV6)) {
> +        memset(&wc->masks.ipv6_src, 0xff, sizeof wc->masks.ipv6_src);
> +        memset(&wc->masks.ipv6_dst, 0xff, sizeof wc->masks.ipv6_dst);
> +        memset(&wc->masks.ipv6_label, 0xff, sizeof wc->masks.ipv6_label);
> +    } else if (flow->dl_type == htons(ETH_TYPE_IP) ||
> +               (flow->dl_type == htons(ETH_TYPE_ARP))) {
> +        memset(&wc->masks.nw_src, 0xff, sizeof wc->masks.nw_src);
> +        memset(&wc->masks.nw_dst, 0xff, sizeof wc->masks.nw_dst);
> +    }
> +
> +    if (flow->dl_type == htons(ETH_TYPE_ARP)) {
> +        memset(&wc->masks.arp_sha, 0xff, sizeof wc->masks.arp_sha);
> +        memset(&wc->masks.arp_tha, 0xff, sizeof wc->masks.arp_tha);
> +    }
> +
> +    if (flow->dl_type == htons(ETH_TYPE_IPV6) ||
> +        flow->dl_type == htons(ETH_TYPE_IP)) {
> +        memset(&wc->masks.nw_tos, 0xff, sizeof wc->masks.nw_tos);
> +        memset(&wc->masks.nw_ttl, 0xff, sizeof wc->masks.nw_ttl);
> +    }
> +
> +    if (flow->nw_frag) {
> +        memset(&wc->masks.nw_frag, 0xff, sizeof wc->masks.nw_frag);
> +    }
> +
> +    if (flow->nw_proto == IPPROTO_ICMP || flow->nw_proto == IPPROTO_ICMPV6) {
> +        memset(&wc->masks.tp_src, 0xff, sizeof wc->masks.tp_src);
> +        memset(&wc->masks.tp_dst, 0xff, sizeof wc->masks.tp_dst);
> +    }
> +
> +    if (flow->nw_proto == IPPROTO_ICMPV6) {
> +        memset(&wc->masks.arp_sha, 0xff, sizeof wc->masks.arp_sha);
> +        memset(&wc->masks.arp_tha, 0xff, sizeof wc->masks.arp_tha);
> +    }
> +
> +    if (flow->tp_src || flow->tp_dst) {
> +        memset(&wc->masks.tp_src, 0xff, sizeof wc->masks.tp_src);
> +        memset(&wc->masks.tp_dst, 0xff, sizeof wc->masks.tp_dst);
> +    }
> +
> +    return;
> +}
> +
>  /* Converts the flow in 'flow' into an exact-match match in 'match'. */
>  void
>  match_init_exact(struct match *match, const struct flow *flow)
> @@ -740,17 +823,19 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)
>                        f->nw_frag & FLOW_NW_FRAG_LATER ? "later" : "not_later");
>          break;
>      }
> -    if (f->nw_proto == IPPROTO_ICMP) {
> +    if (f->dl_type == htons(ETH_TYPE_IP) &&
> +        f->nw_proto == IPPROTO_ICMP) {
>          format_be16_masked(s, "icmp_type", f->tp_src, wc->masks.tp_src);
>          format_be16_masked(s, "icmp_code", f->tp_dst, wc->masks.tp_dst);
> -    } else if (f->nw_proto == IPPROTO_ICMPV6) {
> +    } else if (f->dl_type == htons(ETH_TYPE_IPV6) &&
> +                   f->nw_proto == IPPROTO_ICMPV6) {
>          format_be16_masked(s, "icmp_type", f->tp_src, wc->masks.tp_src);
>          format_be16_masked(s, "icmp_code", f->tp_dst, wc->masks.tp_dst);
>          format_ipv6_netmask(s, "nd_target", &f->nd_target,
>                              &wc->masks.nd_target);
>          format_eth_masked(s, "nd_sll", f->arp_sha, wc->masks.arp_sha);
>          format_eth_masked(s, "nd_tll", f->arp_tha, wc->masks.arp_tha);
> -    } else {
> +    } else if (f->tp_src || f->tp_dst) {
>          format_be16_masked(s, "tp_src", f->tp_src, wc->masks.tp_src);
>          format_be16_masked(s, "tp_dst", f->tp_dst, wc->masks.tp_dst);
>      }
> diff --git a/lib/match.h b/lib/match.h
> index 2d05819..28433b9 100644
> --- a/lib/match.h
> +++ b/lib/match.h
> @@ -36,6 +36,7 @@ struct match {
>
>  void match_init(struct match *,
>                  const struct flow *, const struct flow_wildcards *);
> +void match_wc_init(struct match *match, const struct flow *flow);
>  void match_init_catchall(struct match *);
>  void match_init_exact(struct match *, const struct flow *);
>
> diff --git a/tests/ofp-print.at b/tests/ofp-print.at
> index 5a64ff2..6a5ec60 100644
> --- a/tests/ofp-print.at
> +++ b/tests/ofp-print.at
> @@ -337,7 +337,7 @@ c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
>  50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
>  "], [0], [dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
> -priority:0,metadata:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:06) type:0800 proto:6 tos:0 ttl:64 ip(192.168.0.1->192.168.0.2) port(10031->0) tcp_csum:26e8
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0 tcp_csum:26e8
>  ])
>  AT_CLEANUP
>
> @@ -351,7 +351,7 @@ AT_CHECK([ovs-ofctl ofp-print "\
>  00 00 00 23 20 83 c1 5f 00 00 00 00 \
>  "], [0], [dnl
>  OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:23:20:83:c1:5f->ff:ff:ff:ff:ff:ff) type:8035
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,dl_type=0x8035
>  ])
>  AT_CLEANUP
>
> @@ -365,7 +365,7 @@ AT_CHECK([ovs-ofctl ofp-print "\
>  30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
>  00 00 00 00 00 00 00 3c \
>  "], [0], [dnl
> -OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60
> +OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0 reason=idle duration5.82s idle5 pkts1 bytes60
>  ])
>  AT_CLEANUP
>
> @@ -455,7 +455,7 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
>  OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3
>  ], [dnl
>  ofp_util|INFO|normalization changed ofp_match, details:
> -ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
> +ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0
>  ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
>  ])
>  AT_CLEANUP
> @@ -493,7 +493,7 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
>  OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e out_port:0 actions=output:3
>  ], [dnl
>  ofp_util|INFO|normalization changed ofp_match, details:
> -ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
> +ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0
>  ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
>  ])
>  AT_CLEANUP
> @@ -769,9 +769,9 @@ c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
>  00 00 00 00 00 00 00 00 \
>  "], [0], [dnl
>  OFPST_FLOW reply (xid=0x4):
> - cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
> + cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0 actions=output:1
>   cookie=0x0, duration=8.9s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, priority=65535,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
> - cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
> + cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=1,nw_tos=0 actions=output:3
>   cookie=0x0, duration=9.096s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
>   cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
>  ])
> @@ -1154,7 +1154,7 @@ ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
>  31 6d 00 00 00 00 00 00 00 00 \
>  "], [0], [dnl
>  NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 metadata=0x5a5a5a5a5a5a5a5a reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) tcp_csum:316d
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 tcp_csum:316d
>  ])
>  AT_CLEANUP
>
> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> index 80ba333..bc2362d 100644
> --- a/tests/ofproto-dpif.at
> +++ b/tests/ofproto-dpif.at
> @@ -98,7 +98,7 @@ AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=50:54:00:00:00:05,dst
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  NXT_PACKET_IN (xid=0x0): table_id=1 total_len=42 in_port=1 (via invalid_ttl) data_len=42 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:07) type:0800 proto:1 tos:0 ttl:1 ip(192.168.0.1->192.168.0.2)
> +priority=0,icmp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=1,icmp_type=0,icmp_code=0
>  ])
>  OVS_VSWITCHD_STOP
>  AT_CLEANUP
> @@ -263,13 +263,13 @@ done
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->9) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=9 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->9) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=9 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->9) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=9 tcp_csum:0
>  ])
>
>  dnl Singleton controller action.
> @@ -282,13 +282,13 @@ done
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(10:11:11:11:11:11->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(10:11:11:11:11:11->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(10:11:11:11:11:11->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  ])
>
>  dnl Modified controller action.
> @@ -301,13 +301,13 @@ done
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:15,pcp:0) mac(30:33:33:33:33:33->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:15,pcp:0) mac(30:33:33:33:33:33->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  dnl
>  OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:15,pcp:0) mac(30:33:33:33:33:33->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->10) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=10 tcp_csum:0
>  ])
>
>  dnl Checksum TCP.
> @@ -320,31 +320,31 @@ done
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(20:22:22:22:22:22->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:0
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(20:22:22:22:22:22->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:0
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->50:54:00:00:00:07) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:0
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) tcp_csum:0
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:0
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->192.168.0.2) port(8->11) tcp_csum:1a03
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:1a03
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(8->11) tcp_csum:3205
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 tcp_csum:3205
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->11) tcp_csum:31b8
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 tcp_csum:31b8
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) tcp_csum:316d
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 tcp_csum:316d
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) tcp_csum:316d
> +priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 tcp_csum:316d
>  ])
>
>  dnl Checksum UDP.
> @@ -357,31 +357,31 @@ done
>  OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
>  AT_CHECK([cat ofctl_monitor.log], [0], [dnl
>  NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(20:22:22:22:22:22->50:54:00:00:00:07) type:0800 proto:17 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) udp_csum:1234
> +priority=0,udp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(20:22:22:22:22:22->50:54:00:00:00:07) type:0800 proto:17 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) udp_csum:1234
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->50:54:00:00:00:07) type:0800 proto:17 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) udp_csum:1234
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(192.168.0.1->192.168.0.2) port(8->11) udp_csum:1234
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(83.83.83.83->192.168.0.2) port(8->11) udp_csum:2c37
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(8->11) udp_csum:4439
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->11) udp_csum:43ec
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) udp_csum:43a1
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
>  dnl
>  NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:17 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) udp_csum:43a1
> +priority=0,udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
>  ])
>
>  AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
> diff --git a/tests/ofproto.at b/tests/ofproto.at
> index 8a728e4..b2a8b20 100644
> --- a/tests/ofproto.at
> +++ b/tests/ofproto.at
> @@ -631,21 +631,21 @@ check_async () {
>      ovs-ofctl -v packet-out br0 none controller '0001020304050010203040501234'
>      if test X"$1" = X"OFPR_ACTION"; then shift;
>          echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=NONE (via action) data_len=14 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234"
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
>      fi
>
>      # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
>      ovs-ofctl -v packet-out br0 none 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
>      if test X"$1" = X"OFPR_NO_MATCH"; then shift;
>          echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=NONE (via no_match) data_len=14 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234"
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234"
>      fi
>
>      # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
>      ovs-ofctl packet-out br0 none dec_ttl '002583dfb4000026b98cb0f908004500003fb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00'
>      if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
>          echo >>expout "OFPT_PACKET_IN: total_len=76 in_port=NONE (via invalid_ttl) data_len=76 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:26:b9:8c:b0:f9->00:25:83:df:b4:00) type:0800 proto:17 tos:0 ttl:0 ip(172.17.55.13->172.16.0.2) port(55155->53) udp_csum:8f6d"
> +priority=0,udp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:26:b9:8c:b0:f9,dl_dst=00:25:83:df:b4:00,nw_src=172.17.55.13,nw_dst=172.16.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=55155,tp_dst=53 udp_csum:8f6d"
>      fi
>
>      # OFPT_PORT_STATUS, OFPPR_ADD
> @@ -743,9 +743,9 @@ ovs-appctl -t ovs-ofctl exit
>
>  AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
>  OFPT_PACKET_IN: total_len=14 in_port=NONE (via action) data_len=14 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
>  OFPT_PACKET_IN: total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:5678
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x5678
>  OFPT_BARRIER_REPLY:
>  ])
>
> @@ -773,7 +773,7 @@ ovs-appctl -t ovs-ofctl exit
>
>  AT_CHECK([sed 's/ (xid=0x[[0-9a-fA-F]]*)//' monitor.log], [0], [dnl
>  NXT_PACKET_IN: total_len=14 in_port=NONE metadata=0xfafafafa5a5a5a5a (via action) data_len=14 (unbuffered)
> -priority:0,metadata:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234
> +priority=0,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:10:20:30:40:50,dl_dst=00:01:02:03:04:05,dl_type=0x1234
>  OFPT_BARRIER_REPLY:
>  ])
>
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list