summaryrefslogtreecommitdiff
path: root/lib/match.c
diff options
context:
space:
mode:
authorJan Scheurich <jan.scheurich@ericsson.com>2017-08-05 13:41:09 +0800
committerBen Pfaff <blp@ovn.org>2017-08-07 11:26:16 -0700
commite398127135006a26b5c067a5be6dc0c3b9bd4a98 (patch)
treee12ee3987ade260cd65928860ee85a669f48bb67 /lib/match.c
parent3d2fbd70bda514f7327970b859663f34f994290c (diff)
downloadopenvswitch-e398127135006a26b5c067a5be6dc0c3b9bd4a98.tar.gz
Adding nsh.at for NSH unit tests
First basic NSH test case implemented and working. Unconditionally show matched packet_type in megaflows, even when matching on eth. Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/match.c')
-rw-r--r--lib/match.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/match.c b/lib/match.c
index 125a291b6..fead70281 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -1280,7 +1280,7 @@ match_format(const struct match *match,
bool skip_type = false;
bool skip_proto = false;
ovs_be16 dl_type = f->dl_type;
-
+ bool is_megaflow = false;
int i;
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 40);
@@ -1295,6 +1295,7 @@ match_format(const struct match *match,
if (wc->masks.recirc_id) {
format_uint32_masked(s, "recirc_id", f->recirc_id,
wc->masks.recirc_id);
+ is_megaflow = true;
}
if (wc->masks.dp_hash) {
@@ -1360,7 +1361,8 @@ match_format(const struct match *match,
format_be16_masked(s, "ct_tp_dst", f->ct_tp_dst, wc->masks.ct_tp_dst);
}
- if (wc->masks.packet_type && !match_has_default_packet_type(match)) {
+ if (wc->masks.packet_type &&
+ (!match_has_default_packet_type(match) || is_megaflow)) {
format_packet_type_masked(s, f->packet_type, wc->masks.packet_type);
ds_put_char(s, ',');
if (pt_ns(f->packet_type) == OFPHTN_ETHERTYPE) {