[ovs-dev] [PATCH] ofp-actions: Treat OFPACT_REG_MOVE with reg/metadata src as set action
blp at nicira.com
Thu Aug 14 16:22:51 UTC 2014
On Thu, Aug 14, 2014 at 10:59:53AM +0200, Thomas Graf wrote:
> On 08/14/14 at 10:40am, Thomas Graf wrote:
> > On 08/13/14 at 09:56am, Ben Pfaff wrote:
> > > On Wed, Aug 13, 2014 at 03:34:27PM +0200, Thomas Graf wrote:
> > > > This makes the following work:
> > > > add-group br0 group_id=1234,type=all, \
> > > > bucket=output:10,move:NXM_NX_REG1->NXM_OF_IP_SRC, \
> > > > bucket=output:11
> > > > add-flow br0 ip actions=load:0xffffffff->NXM_NX_REG1,group:1234
> > > >
> > > > Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
> > >
> > > I don't understand why those fields should be considered const. Can
> > > you explain?
> > We already consider OFPACT_REG_LOAD a set action, allowing a
> > OFPACT_REG_MOVE with a register as source would be consistent in
> > my eyes.
> Would it help if I added a flag to each register indicating whether
> it was loaded from a const source and only consider a move from
> a register const if it was loaded based on a const value?
> So, this would work:
> ... while this wouldn't:
> The motivation here is to allow a flow in the pipeline to use
> registers which are later used to set fields in either a group
> bucket or another flow later on in the pipeline.
OFPACT_REG_LOAD is a "set" operation because it sets a field to an
immediate value. OFPACT_REG_MOVE isn't a "set" operation because it
doesn't do that. I don't care about coming up with some rationale to
call something a "set" operation that isn't naturally one, especially
not a rationale that requires some kind of extra checking.
The real issue here is that you'd like to allow OFPACT_REG_MOVE to be
part of an action set. That's fine. I have no objection. The only
task is to decide where reg_move actions go in the ordering. Where do
you want it? I get the impression that you'd like them mixed together
with the "set" actions but maybe that's just because you've been trying
to rationalize them as a form of "set" actions.
More information about the dev