summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-08-05 23:19:49 -0700
committerBen Pfaff <blp@ovn.org>2016-08-15 19:45:19 -0700
commitd5b332799f90d5bab8c4d80c044e95008d7403fb (patch)
tree4f855d22481c2e57975d2ce817c42fba4d2a4dad /include
parent803a6f3d32541362b1014090100edd747f0aac9b (diff)
downloadopenvswitch-d5b332799f90d5bab8c4d80c044e95008d7403fb.tar.gz
expr: New function expr_parse_microflow().
This allows "ovstest test-ovn evaluate-expr" to work with arbitrary microflows rather than just a few restricted variables, but the main point is to enable the upcoming "ovn-trace" utility to accept arbitrary microflows in a format that seems reasonable for OVN. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'include')
-rw-r--r--include/ovn/expr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ovn/expr.h b/include/ovn/expr.h
index fa603bb21..371ba2053 100644
--- a/include/ovn/expr.h
+++ b/include/ovn/expr.h
@@ -382,6 +382,14 @@ bool expr_honors_invariants(const struct expr *);
bool expr_is_simplified(const struct expr *);
bool expr_is_normalized(const struct expr *);
+char *expr_parse_microflow(const char *, const struct shash *symtab,
+ const struct shash *macros,
+ bool (*lookup_port)(const void *aux,
+ const char *port_name,
+ unsigned int *portp),
+ const void *aux, struct flow *uflow)
+ OVS_WARN_UNUSED_RESULT;
+
bool expr_evaluate(const struct expr *, const struct flow *uflow,
bool (*lookup_port)(const void *aux, const char *port_name,
unsigned int *portp),