diff options
| author | Ethan Jackson <ethan@nicira.com> | 2011-07-19 15:47:02 -0700 |
|---|---|---|
| committer | Ethan Jackson <ethan@nicira.com> | 2011-07-22 17:46:48 -0700 |
| commit | 43edca5717cf389eb87850abbf30efc738049921 (patch) | |
| tree | c2293c82bd2c7753e878afe45b66669880211f74 /include | |
| parent | 711e0157cf345f1473247ec90c6ff39eb9f7743c (diff) | |
| download | openvswitch-43edca5717cf389eb87850abbf30efc738049921.tar.gz | |
nx-match: New helpers.
This patch creates two new helper functions, nxm_reg_load() and
nxm_dst_check(). The new nxm_dst_check() function may be used to
check the validity of destination fields used by actions. The new
nxm_reg_load() function may be used by actions which need to write
to NXM fields.
This patch also allows multipath and autopath to write their result
to non-register NXM fields.
Diffstat (limited to 'include')
| -rw-r--r-- | include/openflow/nicira-ext.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index 960b53fe3..09f4ee392 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -540,8 +540,7 @@ OFP_ASSERT(sizeof(struct nx_action_note) == 16); * * 3. Stores 'link' in dst[ofs:ofs+n_bits]. The format and semantics of * 'dst' and 'ofs_nbits' are similar to those for the NXAST_REG_LOAD - * action, except that 'dst' must be NXM_NX_REG(idx) for 'idx' in the - * switch's supported range. + * action. * * The switch will reject actions that have an unknown 'fields', or an unknown * 'algorithm', or in which ofs+n_bits is greater than the width of 'dst', or @@ -567,7 +566,7 @@ struct nx_action_multipath { /* Where to store the result. */ ovs_be16 ofs_nbits; /* (ofs << 6) | (n_bits - 1). */ - ovs_be32 dst; /* Destination register. */ + ovs_be32 dst; /* Destination. */ }; OFP_ASSERT(sizeof(struct nx_action_multipath) == 32); @@ -645,8 +644,7 @@ enum nx_mp_algorithm { * 3. Stores 'port' in dst[ofs:ofs+n_bits]. * * The format and semantics of 'dst' and 'ofs_nbits' are similar to those - * for the NXAST_REG_LOAD action, except that 'dst' must be - * NXM_NX_REG(idx) for 'idx' in the switch's supported range. + * for the NXAST_REG_LOAD action. * * The switch will reject actions in which ofs+n_bits is greater than the width * of 'dst', with error type OFPET_BAD_ACTION, code OFPBAC_BAD_ARGUMENT. @@ -659,7 +657,7 @@ struct nx_action_autopath { /* Where to store the result. */ ovs_be16 ofs_nbits; /* (ofs << 6) | (n_bits - 1). */ - ovs_be32 dst; /* Destination register. */ + ovs_be32 dst; /* Destination. */ ovs_be32 id; /* Autopath ID. */ ovs_be32 pad; |
