]> git.proxmox.com Git - mirror_ovs.git/commit - utilities/ovs-ofctl.8.in
ofp-parse: Allow match field names in actions and brackets in matches.
authorJarno Rajahalme <jarno@ovn.org>
Thu, 5 Jan 2017 00:10:56 +0000 (16:10 -0800)
committerJarno Rajahalme <jarno@ovn.org>
Thu, 5 Jan 2017 00:10:56 +0000 (16:10 -0800)
commit21b2fa61712684b03c5a5a0dc2090fb5bbf9d1ad
tree0fcb43076d89406916229ef03f7764094fc7f902
parente7dce33f09654f6a3f6b9920c5ce16c9c71ccb7f
ofp-parse: Allow match field names in actions and brackets in matches.

Allow using match field names in addition to the canonical register
names in actions (including 'load', 'move', 'push', 'pop', 'output',
'multipath', 'bundle_load', and 'learn').  Allow also leaving out the
trailing '[]' to indicate full field.  These changes allow simpler
syntax similar to 'set_field' to be used also elsewhere.

Correspondingly, allow the '[start..end]' syntax to be used in matches
in addition to the more explicit 'value/mask' notation.  For example,
to match on the value 2 of the bits 14..15 of NXM_NX_REG0, the match
could include:

... reg0[14..15]=2 ...

instead of

... reg0=0x8000/0xc000 ...

Note that only contiguous masks can be specified with the bracket
notation.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
include/openvswitch/meta-flow.h
lib/learn.c
lib/meta-flow.c
lib/nx-match.c
lib/ofp-actions.c
lib/ofp-parse.c
tests/learn.at
tests/ovs-ofctl.at
utilities/ovs-ofctl.8.in