Reg load support for nicira experimenter fields
Adds reg load support for nicira experimenter fields such as the nsh
fields introduced since OVS 2.8. This is achieved through the
NXAST_REG_LOAD2 openflow action, as the previously used NXAST_REG_LOAD
action does not support experimenter fields.
From [1], the structure of NXAST_REG_LOAD2 action is "struct
ext_action_header", followed by an NXM/OXM header, value, optionally
a mask and the required 8 byte padding:
struct ext_action_header {
ovs_be16 type; /* OFPAT_VENDOR. */
ovs_be16 len; /* At least 16. */
ovs_be32 vendor; /* NX_VENDOR_ID or ONF_VENDOR_ID. */
ovs_be16 subtype; /* See enum ofp_raw_action_type. */
};
The action type is experimenter (0xFFFF), vendor is NX_VENDOR_ID
(0x00002320) and subtype is 33.
To retain backward compatibility towards applications, only a new
openflowjava actions is introduced, but no new openflowplugin action.
The existing openflowplugin reg-load action will still be used, but
converted to openflowjava reg-load2 in case of experimenter fields.
Some items worth mentioning:
* There is a conversion between the mandatory bit range of the
reg-load to the optional mask of the oxm field carried by the
reg-load2 action. Because of that, even though the fields might not be
match maskable, it is not only possible but required to have a mask
for them to properly support this conversion between reg-load and
reg-load2.
* reg-load represents a functional subset of reg-load2 as multiple bit
ranges may be specified in a single mask. Nevertheless, multiple
reg-load actions can achieve the same as what would be possible with
a single reg-load2.
[1] https://github.com/openvswitch/ovs/blob/master/lib/ofp-actions.c
Change-Id: Idbf648d7288046c543d5f2d1da339ddf953b469d
JIRA: OPNFLWPLUG-1017
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
18 files changed: