[nft PATCH 3/9] JSON: Make meta statement/expression extensible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lessons learned from fwd statement: We must not assume a given
statement/expression may not receive further properties in the future.
Therefore make meta value an object with a property "key" instead of
just a string containing the key name.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 doc/libnftables-json.adoc             |  14 +-
 src/json.c                            |   6 +-
 src/parser_json.c                     |   2 +-
 tests/py/any/ct.t.json                |   6 +-
 tests/py/any/dup.t.json               |   2 +-
 tests/py/any/fwd.t.json               |   2 +-
 tests/py/any/fwd.t.json.output        |   2 +-
 tests/py/any/meta.t.json              | 322 +++++++++++++-------------
 tests/py/any/meta.t.json.output       |  82 +++----
 tests/py/any/rawpayload.t.json        |   4 +-
 tests/py/any/rawpayload.t.json.output |   2 +-
 tests/py/arp/arp.t.json               |   2 +-
 tests/py/arp/arp.t.json.output        |   2 +-
 tests/py/bridge/ether.t.json          |   2 +-
 tests/py/bridge/meta.t.json           |   4 +-
 tests/py/bridge/reject.t.json         |   2 +-
 tests/py/bridge/reject.t.json.output  |   2 +-
 tests/py/inet/ct.t.json               |   2 +-
 tests/py/inet/ether-ip.t.json         |   2 +-
 tests/py/inet/ether.t.json            |   2 +-
 tests/py/inet/icmp.t.json             |   8 +-
 tests/py/inet/icmpX.t.json            |   2 +-
 tests/py/inet/icmpX.t.json.output     |   2 +-
 tests/py/inet/map.t.json              |   4 +-
 tests/py/inet/map.t.json.output       |   4 +-
 tests/py/inet/meta.t.json             |  24 +-
 tests/py/inet/meta.t.json.output      |   4 +-
 tests/py/inet/reject.t.json           |  10 +-
 tests/py/inet/reject.t.json.output    |  26 +--
 tests/py/inet/rt.t.json               |   2 +-
 tests/py/inet/rt.t.json.output        |   2 +-
 tests/py/inet/udp.t.json              |   4 +-
 tests/py/ip/dnat.t.json               |  12 +-
 tests/py/ip/ether.t.json              |   2 +-
 tests/py/ip/ip.t.json                 |  18 +-
 tests/py/ip/ip.t.json.output          |   2 +-
 tests/py/ip/ip_tcp.t.json             |   2 +-
 tests/py/ip/ip_tcp.t.json.output      |   2 +-
 tests/py/ip/masquerade.t.json         |   2 +-
 tests/py/ip/meta.t.json               |   6 +-
 tests/py/ip/redirect.t.json           |   2 +-
 tests/py/ip/reject.t.json             |   2 +-
 tests/py/ip/reject.t.json.output      |   2 +-
 tests/py/ip/snat.t.json               |  10 +-
 tests/py/ip/snat.t.json.output        |   4 +-
 tests/py/ip6/ether.t.json             |   2 +-
 tests/py/ip6/flowtable.t.json         |   4 +-
 tests/py/ip6/flowtable.t.json.output  |   4 +-
 tests/py/ip6/ip6.t.json               |  18 +-
 tests/py/ip6/ip6.t.json.output        |   2 +-
 tests/py/ip6/map.t.json               |   2 +-
 tests/py/ip6/map.t.json.output        |   2 +-
 tests/py/ip6/masquerade.t.json        |   6 +-
 tests/py/ip6/meta.t.json              |   6 +-
 tests/py/ip6/redirect.t.json          |   2 +-
 tests/py/ip6/reject.t.json            |   2 +-
 tests/py/ip6/reject.t.json.output     |   2 +-
 57 files changed, 344 insertions(+), 330 deletions(-)

diff --git a/doc/libnftables-json.adoc b/doc/libnftables-json.adoc
index e51e9d402beba..058573dfc5c7d 100644
--- a/doc/libnftables-json.adoc
+++ b/doc/libnftables-json.adoc
@@ -1060,7 +1060,19 @@ existence check in a *match* statement with boolean on right hand side.
 
 === META
 [verse]
-*{ "meta":* 'STRING' *}*
+____
+*{ "meta": {
+	"key":* 'META_KEY'
+*}}*
+
+'META_KEY' := *"length"* | *"protocol"* | *"priority"* | *"random"* | *"mark"* |
+              *"iif"* | *"iifname"* | *"iiftype"* | *"oif"* | *"oifname"* |
+	      *"oiftype"* | *"skuid"* | *"skgid"* | *"nftrace"* |
+	      *"rtclassid"* | *"ibriport"* | *"obriport"* | *"ibridgename"* |
+	      *"obridgename"* | *"pkttype"* | *"cpu"* | *"iifgroup"* |
+	      *"oifgroup"* | *"cgroup"* | *"nfproto"* | *"l4proto"* |
+	      *"secpath"*
+____
 
 Create a reference to packet meta data.
 
diff --git a/src/json.c b/src/json.c
index 00d247646cfe2..32fa4d412bfaa 100644
--- a/src/json.c
+++ b/src/json.c
@@ -409,7 +409,8 @@ json_t *range_expr_json(const struct expr *expr, struct output_ctx *octx)
 
 json_t *meta_expr_json(const struct expr *expr, struct output_ctx *octx)
 {
-	return json_pack("{s:s}", "meta", meta_templates[expr->meta.key].token);
+	return json_pack("{s:{s:s}}", "meta",
+			 "key", meta_templates[expr->meta.key].token);
 }
 
 json_t *payload_expr_json(const struct expr *expr, struct output_ctx *octx)
@@ -1044,7 +1045,8 @@ json_t *meta_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
 {
 	json_t *root;
 
-	root = json_pack("{s:s}", "meta", meta_templates[stmt->meta.key].token);
+	root = json_pack("{s:{s:s}}", "meta",
+			 "key", meta_templates[stmt->meta.key].token);
 	root = json_pack("{s:o, s:o}",
 			 "left", root,
 			 "right", expr_print_json(stmt->meta.expr, octx));
diff --git a/src/parser_json.c b/src/parser_json.c
index b51f95e1c7b7b..6cac43290fbab 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -336,7 +336,7 @@ static struct expr *json_parse_meta_expr(struct json_ctx *ctx,
 	unsigned int key;
 	const char *name;
 
-	if (json_unpack_err(ctx, root, "s", &name))
+	if (json_unpack_err(ctx, root, "{s:s}", "key", &name))
 		return NULL;
 	erec = meta_key_parse(int_loc, name, &key);
 	if (erec) {
diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json
index e393e52456a36..bca6d578fc544 100644
--- a/tests/py/any/ct.t.json
+++ b/tests/py/any/ct.t.json
@@ -675,7 +675,7 @@
                 }
             },
             "right": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             }
         }
     }
@@ -693,7 +693,7 @@
             "right": {
                 "map": {
                     "left": {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "right": {
                         "set": [
@@ -1360,7 +1360,7 @@
             "right": {
                 "map": {
                     "left": {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "right": {
                         "set": [
diff --git a/tests/py/any/dup.t.json b/tests/py/any/dup.t.json
index 030938581abe5..9cf0274e64551 100644
--- a/tests/py/any/dup.t.json
+++ b/tests/py/any/dup.t.json
@@ -14,7 +14,7 @@
             "addr": {
                 "map": {
                     "left": {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "right": {
                         "set": [
diff --git a/tests/py/any/fwd.t.json b/tests/py/any/fwd.t.json
index c4ad430f3a234..16299007a19da 100644
--- a/tests/py/any/fwd.t.json
+++ b/tests/py/any/fwd.t.json
@@ -14,7 +14,7 @@
             "dev": {
                 "map": {
                     "left": {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "right": {
                         "set": [
diff --git a/tests/py/any/fwd.t.json.output b/tests/py/any/fwd.t.json.output
index e5f66a3619639..e5714e9f4ba40 100644
--- a/tests/py/any/fwd.t.json.output
+++ b/tests/py/any/fwd.t.json.output
@@ -5,7 +5,7 @@
             "dev": {
                 "map": {
                     "left": {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "right": {
                         "set": [
diff --git a/tests/py/any/meta.t.json b/tests/py/any/meta.t.json
index 7aea79eb32386..4da6aa4a5d62d 100644
--- a/tests/py/any/meta.t.json
+++ b/tests/py/any/meta.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": 1000
         }
@@ -15,7 +15,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": 22
         }
@@ -27,7 +27,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "op": "!=",
             "right": 233
@@ -40,7 +40,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": {
                 "range": [ 33, 45 ]
@@ -54,7 +54,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "op": "!=",
             "right": {
@@ -69,7 +69,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": {
                 "set": [
@@ -88,7 +88,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": {
                 "set": [
@@ -105,7 +105,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": {
                 "set": [
@@ -122,7 +122,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "op": "!=",
             "right": {
@@ -142,7 +142,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "right": {
                 "set": [
@@ -158,7 +158,7 @@
     {
         "match": {
             "left": {
-                "meta": "length"
+                "meta": { "key": "length" }
             },
             "op": "!=",
             "right": {
@@ -175,7 +175,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "right": {
                 "set": [
@@ -194,7 +194,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "op": "!=",
             "right": {
@@ -214,7 +214,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "right": "ip"
         }
@@ -226,7 +226,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "op": "!=",
             "right": "ip"
@@ -239,7 +239,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 22
         }
@@ -251,7 +251,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "op": "!=",
             "right": 233
@@ -264,7 +264,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": {
                 "range": [ 33, 45 ]
@@ -278,7 +278,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "op": "!=",
             "right": {
@@ -293,7 +293,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": {
                 "set": [
@@ -312,7 +312,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "op": "!=",
             "right": {
@@ -332,7 +332,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": {
                 "set": [
@@ -348,7 +348,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "op": "!=",
             "right": {
@@ -365,7 +365,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "root"
         }
@@ -377,7 +377,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "none"
         }
@@ -389,7 +389,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "0x87654321"
         }
@@ -401,7 +401,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": 2271560481
         }
@@ -413,7 +413,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "1:1234"
         }
@@ -425,7 +425,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "bcad:dadc"
         }
@@ -437,7 +437,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "aabb:0"
         }
@@ -449,7 +449,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "op": "!=",
             "right": "bcad:dadc"
@@ -462,7 +462,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "op": "!=",
             "right": "aabb:0"
@@ -475,7 +475,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": {
                 "range": [ "bcad:dada", "bcad:dadc" ]
@@ -489,7 +489,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "op": "!=",
             "right": {
@@ -504,7 +504,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": {
                 "set": [
@@ -522,7 +522,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "cafe:beef"
         }
@@ -534,7 +534,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "op": "!=",
             "right": {
@@ -553,7 +553,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": "0x4"
         }
@@ -565,7 +565,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": "0x32"
         }
@@ -579,7 +579,7 @@
             "left": {
                 "&": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "0x03"
                 ]
@@ -597,7 +597,7 @@
             "left": {
                 "&": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "0x03"
                 ]
@@ -613,7 +613,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": "0x10"
         }
@@ -625,7 +625,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "op": "!=",
             "right": "0x10"
@@ -640,7 +640,7 @@
             "left": {
                 "|": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "0x03"
                 ]
@@ -658,7 +658,7 @@
             "left": {
                 "|": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "0x03"
                 ]
@@ -676,7 +676,7 @@
             "left": {
                 "^": [
 		    {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
 		    "0x03"
                 ]
@@ -693,7 +693,7 @@
             "left": {
                 "^": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     "0x03"
                 ]
@@ -709,7 +709,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -724,7 +724,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "op": "!=",
             "right": "lo"
@@ -740,7 +740,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "dummy0"
         }
@@ -752,7 +752,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "op": "!=",
             "right": "dummy0"
@@ -765,7 +765,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": {
                 "set": [
@@ -782,7 +782,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "op": "!=",
             "right": {
@@ -800,7 +800,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "dummy*"
         }
@@ -812,7 +812,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "dummy\\*"
         }
@@ -824,7 +824,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": {
                 "set": [
@@ -846,7 +846,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "op": "!=",
             "right": {
@@ -869,7 +869,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "op": "!=",
             "right": "ether"
@@ -882,7 +882,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
@@ -894,7 +894,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "op": "!=",
             "right": "ppp"
@@ -907,7 +907,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ppp"
         }
@@ -919,7 +919,7 @@
     {
         "match": {
             "left": {
-                "meta": "oif"
+                "meta": { "key": "oif" }
             },
             "right": "lo"
         }
@@ -934,7 +934,7 @@
     {
         "match": {
             "left": {
-                "meta": "oif"
+                "meta": { "key": "oif" }
             },
             "op": "!=",
             "right": "lo"
@@ -950,7 +950,7 @@
     {
         "match": {
             "left": {
-                "meta": "oif"
+                "meta": { "key": "oif" }
             },
             "right": {
                 "set": [
@@ -969,7 +969,7 @@
     {
         "match": {
             "left": {
-                "meta": "oif"
+                "meta": { "key": "oif" }
             },
             "op": "!=",
             "right": {
@@ -989,7 +989,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": "dummy0"
         }
@@ -1001,7 +1001,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "op": "!=",
             "right": "dummy0"
@@ -1014,7 +1014,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": {
                 "set": [
@@ -1031,7 +1031,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": "dummy*"
         }
@@ -1043,7 +1043,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": "dummy\\*"
         }
@@ -1055,7 +1055,7 @@
     {
         "match": {
             "left": {
-                "meta": "oiftype"
+                "meta": { "key": "oiftype" }
             },
             "right": {
                 "set": [
@@ -1077,7 +1077,7 @@
     {
         "match": {
             "left": {
-                "meta": "oiftype"
+                "meta": { "key": "oiftype" }
             },
             "op": "!=",
             "right": {
@@ -1100,7 +1100,7 @@
     {
         "match": {
             "left": {
-                "meta": "oiftype"
+                "meta": { "key": "oiftype" }
             },
             "op": "!=",
             "right": "ether"
@@ -1113,7 +1113,7 @@
     {
         "match": {
             "left": {
-                "meta": "oiftype"
+                "meta": { "key": "oiftype" }
             },
             "right": "ether"
         }
@@ -1125,7 +1125,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": {
                 "set": [
@@ -1146,7 +1146,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": {
@@ -1168,7 +1168,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": "root"
         }
@@ -1180,7 +1180,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": "root"
@@ -1193,7 +1193,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "<",
             "right": 3000
@@ -1209,7 +1209,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": ">",
             "right": 3000
@@ -1225,7 +1225,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": 3000
         }
@@ -1240,7 +1240,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": {
                 "range": [ 3001, 3005 ]
@@ -1257,7 +1257,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": {
@@ -1275,7 +1275,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": {
                 "set": [
@@ -1294,7 +1294,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": {
@@ -1314,7 +1314,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": {
                 "set": [
@@ -1335,7 +1335,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": {
@@ -1357,7 +1357,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": "root"
         }
@@ -1369,7 +1369,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": "root"
@@ -1382,7 +1382,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "<",
             "right": 3000
@@ -1398,7 +1398,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": ">",
             "right": 3000
@@ -1414,7 +1414,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": 3000
         }
@@ -1429,7 +1429,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": {
                 "range": [ 2001, 2005 ]
@@ -1446,7 +1446,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": {
@@ -1464,7 +1464,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": {
                 "set": [
@@ -1483,7 +1483,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": {
@@ -1503,7 +1503,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "^": [ "0xffffffc8", "0x16" ] }
         }
@@ -1515,7 +1515,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "&": [ "0x16", "0x16" ] }
         }
@@ -1527,7 +1527,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "|": [ "0xffffffe9", "0x16" ] }
         }
@@ -1539,7 +1539,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "&": [ "0xffffffde", "0x16" ] }
         }
@@ -1551,7 +1551,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "|": [ "0xf045ffde", "0x10" ] }
         }
@@ -1563,7 +1563,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "|": [ "0xffffffde", "0x16" ] }
         }
@@ -1575,7 +1575,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "|": [ "0x32", "0xfffff" ] }
         }
@@ -1587,7 +1587,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": { "^": [ "0xfffe", "0x16" ] }
         }
@@ -1599,7 +1599,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1611,7 +1611,7 @@
     {
         "match": {
             "left": {
-                "meta": "oif"
+                "meta": { "key": "oif" }
             },
             "right": "lo"
         }
@@ -1623,7 +1623,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": "dummy2"
         }
@@ -1638,7 +1638,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": 3000
         }
@@ -1650,7 +1650,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": 3000
         }
@@ -1662,7 +1662,7 @@
     {
         "match": {
             "left": {
-                "meta": "rtclassid"
+                "meta": { "key": "rtclassid" }
             },
             "right": "cosmos"
         }
@@ -1674,7 +1674,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "right": "broadcast"
         }
@@ -1686,7 +1686,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "right": "host"
         }
@@ -1698,7 +1698,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "right": "multicast"
         }
@@ -1710,7 +1710,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "op": "!=",
             "right": "broadcast"
@@ -1723,7 +1723,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "op": "!=",
             "right": "host"
@@ -1736,7 +1736,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "op": "!=",
             "right": "multicast"
@@ -1749,7 +1749,7 @@
     {
         "match": {
             "left": {
-                "meta": "pkttype"
+                "meta": { "key": "pkttype" }
             },
             "right": {
                 "set": [
@@ -1769,7 +1769,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "right": 1
         }
@@ -1781,7 +1781,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "op": "!=",
             "right": 1
@@ -1794,7 +1794,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "right": {
                 "range": [ 1, 3 ]
@@ -1808,7 +1808,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "op": "!=",
             "right": {
@@ -1823,7 +1823,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "right": {
                 "set": [
@@ -1840,7 +1840,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "right": {
                 "set": [
@@ -1857,7 +1857,7 @@
     {
         "match": {
             "left": {
-                "meta": "cpu"
+                "meta": { "key": "cpu" }
             },
             "op": "!=",
             "right": {
@@ -1875,7 +1875,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": 0
         }
@@ -1887,7 +1887,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": 0
@@ -1900,7 +1900,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": "default"
         }
@@ -1912,7 +1912,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": "default"
@@ -1925,7 +1925,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": {
                 "set": [
@@ -1941,7 +1941,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": {
@@ -1958,7 +1958,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": {
                 "set": [
@@ -1975,7 +1975,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": {
                 "set": [
@@ -1991,7 +1991,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": {
@@ -2009,7 +2009,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": {
@@ -2026,7 +2026,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": 0
         }
@@ -2038,7 +2038,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": 0
@@ -2051,7 +2051,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": "default"
         }
@@ -2063,7 +2063,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": "default"
@@ -2076,7 +2076,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": {
                 "set": [
@@ -2092,7 +2092,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": {
@@ -2109,7 +2109,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": {
                 "set": [
@@ -2126,7 +2126,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": {
                 "set": [
@@ -2142,7 +2142,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": {
@@ -2160,7 +2160,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": {
@@ -2177,7 +2177,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "right": 1048577
         }
@@ -2189,7 +2189,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "op": "!=",
             "right": 1048577
@@ -2202,7 +2202,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "right": {
                 "set": [
@@ -2219,7 +2219,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "op": "!=",
             "right": {
@@ -2237,7 +2237,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "right": {
                 "range": [ 1048577, 1048578 ]
@@ -2251,7 +2251,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "op": "!=",
             "right": {
@@ -2266,7 +2266,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "right": {
                 "set": [
@@ -2284,7 +2284,7 @@
     {
         "match": {
             "left": {
-                "meta": "cgroup"
+                "meta": { "key": "cgroup" }
             },
             "op": "!=",
             "right": {
@@ -2305,10 +2305,10 @@
             "left": {
                 "concat": [
                     {
-                        "meta": "iif"
+                        "meta": { "key": "iif" }
                     },
                     {
-                        "meta": "oif"
+                        "meta": { "key": "oif" }
                     }
                 ]
             },
@@ -2333,13 +2333,13 @@
             "left": {
                 "concat": [
                     {
-                        "meta": "iif"
+                        "meta": { "key": "iif" }
                     },
                     {
-                        "meta": "oif"
+                        "meta": { "key": "oif" }
                     },
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     }
                 ]
             },
@@ -2365,10 +2365,10 @@
             "left": {
                 "concat": [
                     {
-                        "meta": "iif"
+                        "meta": { "key": "iif" }
                     },
                     {
-                        "meta": "oif"
+                        "meta": { "key": "oif" }
                     }
                 ]
             },
@@ -2396,7 +2396,7 @@
     {
         "match": {
             "left": {
-                "meta": "random"
+                "meta": { "key": "random" }
             },
             "right": 1
         }
@@ -2408,7 +2408,7 @@
     {
         "match": {
             "left": {
-                "meta": "random"
+                "meta": { "key": "random" }
             },
             "op": ">",
             "right": 1000000
diff --git a/tests/py/any/meta.t.json.output b/tests/py/any/meta.t.json.output
index a4b9633aa9702..682ad684a1720 100644
--- a/tests/py/any/meta.t.json.output
+++ b/tests/py/any/meta.t.json.output
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "right": {
                 "set": [
@@ -22,7 +22,7 @@
     {
         "match": {
             "left": {
-                "meta": "protocol"
+                "meta": { "key": "protocol" }
             },
             "op": "!=",
             "right": {
@@ -42,7 +42,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "8765:4321"
         }
@@ -54,7 +54,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": "8765:4321"
         }
@@ -66,7 +66,7 @@
     {
         "match": {
             "left": {
-                "meta": "priority"
+                "meta": { "key": "priority" }
             },
             "right": {
                 "set": [
@@ -84,7 +84,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 4
         }
@@ -96,7 +96,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 50
         }
@@ -110,7 +110,7 @@
             "left": {
                 "&": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     3
                 ]
@@ -128,7 +128,7 @@
             "left": {
                 "&": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     3
                 ]
@@ -144,7 +144,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 16
         }
@@ -156,7 +156,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "op": "!=",
             "right": 16
@@ -171,7 +171,7 @@
             "left": {
                 "|": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     3
                 ]
@@ -189,7 +189,7 @@
             "left": {
                 "|": [
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     },
                     3
                 ]
@@ -205,7 +205,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 2
         }
@@ -217,7 +217,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "op": "!=",
             "right": 2
@@ -230,7 +230,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": {
                 "set": [
@@ -247,7 +247,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "op": "!=",
             "right": {
@@ -265,7 +265,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifname"
+                "meta": { "key": "oifname" }
             },
             "right": {
                 "set": [
@@ -282,7 +282,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": {
                 "set": [ 0, 1, 2 ]
@@ -299,7 +299,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": {
@@ -317,7 +317,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "right": 0
         }
@@ -329,7 +329,7 @@
     {
         "match": {
             "left": {
-                "meta": "skuid"
+                "meta": { "key": "skuid" }
             },
             "op": "!=",
             "right": 0
@@ -342,7 +342,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": {
                 "set": [ 0, 1, 2 ]
@@ -359,7 +359,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": {
@@ -377,7 +377,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "right": 0
         }
@@ -389,7 +389,7 @@
     {
         "match": {
             "left": {
-                "meta": "skgid"
+                "meta": { "key": "skgid" }
             },
             "op": "!=",
             "right": 0
@@ -402,7 +402,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 4294967262
         }
@@ -414,7 +414,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 22
         }
@@ -426,7 +426,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 4294967295
         }
@@ -438,7 +438,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 22
         }
@@ -450,7 +450,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 4031119326
         }
@@ -462,7 +462,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 4294967262
         }
@@ -474,7 +474,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 1048575
         }
@@ -486,7 +486,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 65512
         }
@@ -498,7 +498,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "right": "default"
         }
@@ -510,7 +510,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifgroup"
+                "meta": { "key": "iifgroup" }
             },
             "op": "!=",
             "right": "default"
@@ -523,7 +523,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "right": "default"
         }
@@ -535,7 +535,7 @@
     {
         "match": {
             "left": {
-                "meta": "oifgroup"
+                "meta": { "key": "oifgroup" }
             },
             "op": "!=",
             "right": "default"
@@ -550,13 +550,13 @@
             "left": {
                 "concat": [
                     {
-                        "meta": "iif"
+                        "meta": { "key": "iif" }
                     },
                     {
-                        "meta": "oif"
+                        "meta": { "key": "oif" }
                     },
                     {
-                        "meta": "mark"
+                        "meta": { "key": "mark" }
                     }
                 ]
             },
diff --git a/tests/py/any/rawpayload.t.json b/tests/py/any/rawpayload.t.json
index b4ce0bd86310c..bfb7c9672b6a3 100644
--- a/tests/py/any/rawpayload.t.json
+++ b/tests/py/any/rawpayload.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": {
                 "set": [
@@ -39,7 +39,7 @@
 [
     {
         "match": {
-	    "left": { "meta": "l4proto" },
+	    "left": { "meta": { "key": "l4proto" } },
 	    "right": "tcp"
 	}
     },
diff --git a/tests/py/any/rawpayload.t.json.output b/tests/py/any/rawpayload.t.json.output
index fd70341c4d64d..b423005f9a07c 100644
--- a/tests/py/any/rawpayload.t.json.output
+++ b/tests/py/any/rawpayload.t.json.output
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": {
                 "set": [
diff --git a/tests/py/arp/arp.t.json b/tests/py/arp/arp.t.json
index 005fcf642e657..4fd98d193a7db 100644
--- a/tests/py/arp/arp.t.json
+++ b/tests/py/arp/arp.t.json
@@ -798,7 +798,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "invalid"
         }
diff --git a/tests/py/arp/arp.t.json.output b/tests/py/arp/arp.t.json.output
index 0120025b2e7b1..0b60c445ca350 100644
--- a/tests/py/arp/arp.t.json.output
+++ b/tests/py/arp/arp.t.json.output
@@ -69,7 +69,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "invalid"
         }
diff --git a/tests/py/bridge/ether.t.json b/tests/py/bridge/ether.t.json
index 89cd128c1d000..6efa7c66029ed 100644
--- a/tests/py/bridge/ether.t.json
+++ b/tests/py/bridge/ether.t.json
@@ -14,7 +14,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
diff --git a/tests/py/bridge/meta.t.json b/tests/py/bridge/meta.t.json
index dad5c6e109bb4..0c63e26ee1072 100644
--- a/tests/py/bridge/meta.t.json
+++ b/tests/py/bridge/meta.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "obrname"
+                "meta": { "key": "obrname" }
             },
             "right": "br0"
         }
@@ -15,7 +15,7 @@
     {
         "match": {
             "left": {
-                "meta": "ibrname"
+                "meta": { "key": "ibrname" }
             },
             "right": "br0"
         }
diff --git a/tests/py/bridge/reject.t.json b/tests/py/bridge/reject.t.json
index c0bed56e6ce41..d4750f4d0a7b0 100644
--- a/tests/py/bridge/reject.t.json
+++ b/tests/py/bridge/reject.t.json
@@ -113,7 +113,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 12345
         }
diff --git a/tests/py/bridge/reject.t.json.output b/tests/py/bridge/reject.t.json.output
index 6effd1799ca93..602af9c12a6ca 100644
--- a/tests/py/bridge/reject.t.json.output
+++ b/tests/py/bridge/reject.t.json.output
@@ -228,7 +228,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 12345
         }
diff --git a/tests/py/inet/ct.t.json b/tests/py/inet/ct.t.json
index 686c43f4c4c79..9b54e1d00abd8 100644
--- a/tests/py/inet/ct.t.json
+++ b/tests/py/inet/ct.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
diff --git a/tests/py/inet/ether-ip.t.json b/tests/py/inet/ether-ip.t.json
index 0c0964e617f1b..accb9d692c7b8 100644
--- a/tests/py/inet/ether-ip.t.json
+++ b/tests/py/inet/ether-ip.t.json
@@ -14,7 +14,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
diff --git a/tests/py/inet/ether.t.json b/tests/py/inet/ether.t.json
index 0daf46e997416..b5042adbcb2e6 100644
--- a/tests/py/inet/ether.t.json
+++ b/tests/py/inet/ether.t.json
@@ -14,7 +14,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
diff --git a/tests/py/inet/icmp.t.json b/tests/py/inet/icmp.t.json
index c4517605a7186..55217cc9d1fd7 100644
--- a/tests/py/inet/icmp.t.json
+++ b/tests/py/inet/icmp.t.json
@@ -32,7 +32,7 @@
 [
     {
         "match": {
-            "left": { "meta": "nfproto" },
+            "left": { "meta": { "key": "nfproto" } },
             "right": "ipv4"
         }
     },
@@ -53,7 +53,7 @@
 [
     {
         "match": {
-            "left": { "meta": "nfproto" },
+            "left": { "meta": { "key": "nfproto" } },
             "right": "ipv4"
         }
     },
@@ -74,7 +74,7 @@
 [
     {
         "match": {
-            "left": { "meta": "nfproto" },
+            "left": { "meta": { "key": "nfproto" } },
             "right": "ipv6"
         }
     },
@@ -95,7 +95,7 @@
 [
     {
         "match": {
-            "left": { "meta": "nfproto" },
+            "left": { "meta": { "key": "nfproto" } },
             "right": "ipv6"
         }
     },
diff --git a/tests/py/inet/icmpX.t.json b/tests/py/inet/icmpX.t.json
index 006419e3dc02b..23ee7ed800a03 100644
--- a/tests/py/inet/icmpX.t.json
+++ b/tests/py/inet/icmpX.t.json
@@ -96,7 +96,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "ipv6-icmp"
         }
diff --git a/tests/py/inet/icmpX.t.json.output b/tests/py/inet/icmpX.t.json.output
index 94034388f931b..55158fee44c1e 100644
--- a/tests/py/inet/icmpX.t.json.output
+++ b/tests/py/inet/icmpX.t.json.output
@@ -66,7 +66,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 58
         }
diff --git a/tests/py/inet/map.t.json b/tests/py/inet/map.t.json
index b7bb10a91a1a1..bb7f2a05b0c01 100644
--- a/tests/py/inet/map.t.json
+++ b/tests/py/inet/map.t.json
@@ -3,7 +3,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
@@ -36,7 +36,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
diff --git a/tests/py/inet/map.t.json.output b/tests/py/inet/map.t.json.output
index 5a410b3be25bb..74c9b4f62c8a0 100644
--- a/tests/py/inet/map.t.json.output
+++ b/tests/py/inet/map.t.json.output
@@ -3,7 +3,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
@@ -36,7 +36,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
diff --git a/tests/py/inet/meta.t.json b/tests/py/inet/meta.t.json
index 2687f69e351c3..6c5f4567a5f49 100644
--- a/tests/py/inet/meta.t.json
+++ b/tests/py/inet/meta.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -15,7 +15,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -27,7 +27,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": {
                 "set": [
@@ -44,7 +44,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "op": "!=",
             "right": {
@@ -62,7 +62,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -85,7 +85,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -108,7 +108,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -131,7 +131,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -139,7 +139,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "tcp"
         }
@@ -151,7 +151,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -177,7 +177,7 @@
     {
         "match": {
             "left": {
-                "meta": "secpath"
+                "meta": { "key": "secpath" }
             },
             "right": true
         }
@@ -189,7 +189,7 @@
     {
         "match": {
             "left": {
-                "meta": "secpath"
+                "meta": { "key": "secpath" }
             },
             "right": false
         }
diff --git a/tests/py/inet/meta.t.json.output b/tests/py/inet/meta.t.json.output
index 19b2d2621f6e0..0dc3371f6809f 100644
--- a/tests/py/inet/meta.t.json.output
+++ b/tests/py/inet/meta.t.json.output
@@ -18,7 +18,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -26,7 +26,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 6
         }
diff --git a/tests/py/inet/reject.t.json b/tests/py/inet/reject.t.json
index 46d4857a57c99..b63cb7df7e05a 100644
--- a/tests/py/inet/reject.t.json
+++ b/tests/py/inet/reject.t.json
@@ -113,7 +113,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 12345
         }
@@ -137,7 +137,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -152,7 +152,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -207,7 +207,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -225,7 +225,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
diff --git a/tests/py/inet/reject.t.json.output b/tests/py/inet/reject.t.json.output
index b1e7799005256..46875434046f9 100644
--- a/tests/py/inet/reject.t.json.output
+++ b/tests/py/inet/reject.t.json.output
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -21,7 +21,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -39,7 +39,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -57,7 +57,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -72,7 +72,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -90,7 +90,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -108,7 +108,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
@@ -126,7 +126,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -144,7 +144,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -162,7 +162,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -180,7 +180,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv6"
         }
@@ -195,7 +195,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 6
         }
@@ -203,7 +203,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 12345
         }
diff --git a/tests/py/inet/rt.t.json b/tests/py/inet/rt.t.json
index 32e1d43747492..92f2dbeafe600 100644
--- a/tests/py/inet/rt.t.json
+++ b/tests/py/inet/rt.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
diff --git a/tests/py/inet/rt.t.json.output b/tests/py/inet/rt.t.json.output
index 1d3ecac137145..de765bd954d57 100644
--- a/tests/py/inet/rt.t.json.output
+++ b/tests/py/inet/rt.t.json.output
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "nfproto"
+                "meta": { "key": "nfproto" }
             },
             "right": "ipv4"
         }
diff --git a/tests/py/inet/udp.t.json b/tests/py/inet/udp.t.json
index d760fb7566ee1..096fe559c6645 100644
--- a/tests/py/inet/udp.t.json
+++ b/tests/py/inet/udp.t.json
@@ -687,7 +687,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -710,7 +710,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
diff --git a/tests/py/ip/dnat.t.json b/tests/py/ip/dnat.t.json
index 56f8272f6c348..f014030575dfc 100644
--- a/tests/py/ip/dnat.t.json
+++ b/tests/py/ip/dnat.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -33,7 +33,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -64,7 +64,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -98,7 +98,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -133,7 +133,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -164,7 +164,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip/ether.t.json b/tests/py/ip/ether.t.json
index 022ae0b58bc56..f176bf7e147b9 100644
--- a/tests/py/ip/ether.t.json
+++ b/tests/py/ip/ether.t.json
@@ -14,7 +14,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json
index d66e42643acb3..a6b53571e7a47 100644
--- a/tests/py/ip/ip.t.json
+++ b/tests/py/ip/ip.t.json
@@ -1577,7 +1577,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1600,7 +1600,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1623,7 +1623,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1646,7 +1646,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1669,7 +1669,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1692,7 +1692,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1715,7 +1715,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1738,7 +1738,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1761,7 +1761,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
diff --git a/tests/py/ip/ip.t.json.output b/tests/py/ip/ip.t.json.output
index 21143089dfc7c..967e2a59fabbe 100644
--- a/tests/py/ip/ip.t.json.output
+++ b/tests/py/ip/ip.t.json.output
@@ -206,7 +206,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
diff --git a/tests/py/ip/ip_tcp.t.json b/tests/py/ip/ip_tcp.t.json
index 82b7cdcc6f50b..9fd3339cef488 100644
--- a/tests/py/ip/ip_tcp.t.json
+++ b/tests/py/ip/ip_tcp.t.json
@@ -40,7 +40,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 1
         }
diff --git a/tests/py/ip/ip_tcp.t.json.output b/tests/py/ip/ip_tcp.t.json.output
index bbc318a79a6ae..908288148a938 100644
--- a/tests/py/ip/ip_tcp.t.json.output
+++ b/tests/py/ip/ip_tcp.t.json.output
@@ -29,7 +29,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 1
         }
diff --git a/tests/py/ip/masquerade.t.json b/tests/py/ip/masquerade.t.json
index 4eae3b9808e43..f2f798fe6bca9 100644
--- a/tests/py/ip/masquerade.t.json
+++ b/tests/py/ip/masquerade.t.json
@@ -360,7 +360,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip/meta.t.json b/tests/py/ip/meta.t.json
index e538b748895fa..c06e48ffb0818 100644
--- a/tests/py/ip/meta.t.json
+++ b/tests/py/ip/meta.t.json
@@ -18,7 +18,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "icmp"
         }
@@ -41,7 +41,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "ipv6-icmp"
         }
@@ -64,7 +64,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 58
         }
diff --git a/tests/py/ip/redirect.t.json b/tests/py/ip/redirect.t.json
index 58e78ee91db51..4a41489b73bac 100644
--- a/tests/py/ip/redirect.t.json
+++ b/tests/py/ip/redirect.t.json
@@ -518,7 +518,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip/reject.t.json b/tests/py/ip/reject.t.json
index e0b8e2b296019..e1886fa3510d4 100644
--- a/tests/py/ip/reject.t.json
+++ b/tests/py/ip/reject.t.json
@@ -80,7 +80,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": "0x80000000"
         }
diff --git a/tests/py/ip/reject.t.json.output b/tests/py/ip/reject.t.json.output
index 099320c60c00c..6829792c4a1ad 100644
--- a/tests/py/ip/reject.t.json.output
+++ b/tests/py/ip/reject.t.json.output
@@ -10,7 +10,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 2147483648
         }
diff --git a/tests/py/ip/snat.t.json b/tests/py/ip/snat.t.json
index b925b6c745e88..1bf54f40427c9 100644
--- a/tests/py/ip/snat.t.json
+++ b/tests/py/ip/snat.t.json
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -33,7 +33,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -64,7 +64,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -98,7 +98,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -133,7 +133,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip/snat.t.json.output b/tests/py/ip/snat.t.json.output
index 4446ae66f1a61..f27c25dc3b0f7 100644
--- a/tests/py/ip/snat.t.json.output
+++ b/tests/py/ip/snat.t.json.output
@@ -3,7 +3,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
@@ -37,7 +37,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip6/ether.t.json b/tests/py/ip6/ether.t.json
index f2d2f6d0061c6..7de304814e164 100644
--- a/tests/py/ip6/ether.t.json
+++ b/tests/py/ip6/ether.t.json
@@ -14,7 +14,7 @@
     {
         "match": {
             "left": {
-                "meta": "iiftype"
+                "meta": { "key": "iiftype" }
             },
             "right": "ether"
         }
diff --git a/tests/py/ip6/flowtable.t.json b/tests/py/ip6/flowtable.t.json
index ef33f74d1aaf8..be4dca676172f 100644
--- a/tests/py/ip6/flowtable.t.json
+++ b/tests/py/ip6/flowtable.t.json
@@ -8,7 +8,7 @@
                     "val": {
                         "concat": [
                             {
-                                "meta": "iif"
+                                "meta": { "key": "iif" }
                             },
                             {
                                 "payload": {
@@ -45,7 +45,7 @@
                                 }
                             },
                             {
-                                "meta": "iif"
+                                "meta": { "key": "iif" }
                             }
                         ]
                     }
diff --git a/tests/py/ip6/flowtable.t.json.output b/tests/py/ip6/flowtable.t.json.output
index ef33f74d1aaf8..be4dca676172f 100644
--- a/tests/py/ip6/flowtable.t.json.output
+++ b/tests/py/ip6/flowtable.t.json.output
@@ -8,7 +8,7 @@
                     "val": {
                         "concat": [
                             {
-                                "meta": "iif"
+                                "meta": { "key": "iif" }
                             },
                             {
                                 "payload": {
@@ -45,7 +45,7 @@
                                 }
                             },
                             {
-                                "meta": "iif"
+                                "meta": { "key": "iif" }
                             }
                         ]
                     }
diff --git a/tests/py/ip6/ip6.t.json b/tests/py/ip6/ip6.t.json
index 272ef0d0456b4..925789cdf7a54 100644
--- a/tests/py/ip6/ip6.t.json
+++ b/tests/py/ip6/ip6.t.json
@@ -1409,7 +1409,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1432,7 +1432,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1455,7 +1455,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1478,7 +1478,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1501,7 +1501,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1524,7 +1524,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1547,7 +1547,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1570,7 +1570,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
@@ -1593,7 +1593,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
diff --git a/tests/py/ip6/ip6.t.json.output b/tests/py/ip6/ip6.t.json.output
index 6f9835334e147..d72f3d189a416 100644
--- a/tests/py/ip6/ip6.t.json.output
+++ b/tests/py/ip6/ip6.t.json.output
@@ -341,7 +341,7 @@
     {
         "match": {
             "left": {
-                "meta": "iif"
+                "meta": { "key": "iif" }
             },
             "right": "lo"
         }
diff --git a/tests/py/ip6/map.t.json b/tests/py/ip6/map.t.json
index c8c4f7122228d..3dff018a232f2 100644
--- a/tests/py/ip6/map.t.json
+++ b/tests/py/ip6/map.t.json
@@ -3,7 +3,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
diff --git a/tests/py/ip6/map.t.json.output b/tests/py/ip6/map.t.json.output
index 3eecf13bdeb94..c1baf0ccefc01 100644
--- a/tests/py/ip6/map.t.json.output
+++ b/tests/py/ip6/map.t.json.output
@@ -3,7 +3,7 @@
     {
         "mangle": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": {
                 "map": {
diff --git a/tests/py/ip6/masquerade.t.json b/tests/py/ip6/masquerade.t.json
index a54761d3c1eaa..8191ce51a5ee7 100644
--- a/tests/py/ip6/masquerade.t.json
+++ b/tests/py/ip6/masquerade.t.json
@@ -249,7 +249,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 6
         }
@@ -266,7 +266,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 6
         }
@@ -354,7 +354,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip6/meta.t.json b/tests/py/ip6/meta.t.json
index cc800062b5934..176ef0f505665 100644
--- a/tests/py/ip6/meta.t.json
+++ b/tests/py/ip6/meta.t.json
@@ -18,7 +18,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "ipv6-icmp"
         }
@@ -41,7 +41,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": "icmp"
         }
@@ -64,7 +64,7 @@
     {
         "match": {
             "left": {
-                "meta": "l4proto"
+                "meta": { "key": "l4proto" }
             },
             "right": 1
         }
diff --git a/tests/py/ip6/redirect.t.json b/tests/py/ip6/redirect.t.json
index 757fbb607e264..ed227e76d7799 100644
--- a/tests/py/ip6/redirect.t.json
+++ b/tests/py/ip6/redirect.t.json
@@ -484,7 +484,7 @@
     {
         "match": {
             "left": {
-                "meta": "iifname"
+                "meta": { "key": "iifname" }
             },
             "right": "eth0"
         }
diff --git a/tests/py/ip6/reject.t.json b/tests/py/ip6/reject.t.json
index a23ee89af09a6..491b996c77daf 100644
--- a/tests/py/ip6/reject.t.json
+++ b/tests/py/ip6/reject.t.json
@@ -70,7 +70,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": "0x80000000"
         }
diff --git a/tests/py/ip6/reject.t.json.output b/tests/py/ip6/reject.t.json.output
index 1dc59f8881c92..4f79922901ef6 100644
--- a/tests/py/ip6/reject.t.json.output
+++ b/tests/py/ip6/reject.t.json.output
@@ -10,7 +10,7 @@
     {
         "match": {
             "left": {
-                "meta": "mark"
+                "meta": { "key": "mark" }
             },
             "right": 2147483648
         }
-- 
2.18.0





[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux