[ovs-dev] [PATCH 2/5] lib/ofp-actions: make ofpact_reg_load.value mf_value from uint64_t

Ben Pfaff blp at nicira.com
Fri Aug 31 04:29:27 UTC 2012


On Thu, Aug 30, 2012 at 10:40:24AM +0900, Simon Horman wrote:
> From: Isaku Yamahata <yamahata at valinux.co.jp>
> 
> set_field action needs more than 64 bits value unlike nx_reg_load action.
> This is preparation for set_field action. mf_value will be used later.
> 
> Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
> Signed-off-by: Simon Horman <horms at verge.net.au>

Presumably the goal is to make ofpact_reg_load able to set any subset of
a field, not just a 64-bit subset.  For this, it would seem more natural
to use union mf_subvalue instead of union mf_value.  Then
nxm_execute_reg_load() would become a single call to
mf_write_subfield(), rather than (as seen in patch 3/5) a conditional.

My hope here is that ofpact_reg_load can be completely uniform across
NXAST_REG_LOAD and OFPAT12_SET_FIELD, except in the translation to and
from OpenFlow actions.



More information about the dev mailing list