[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvswitch-discuss
Subject:    [ovs-discuss] custom action help
From:       blp () nicira ! com (Ben Pfaff)
Date:       2013-09-25 15:28:38
Message-ID: 20130925152838.GN3347 () nicira ! com
[Download RAW message or body]

It's your custom code, do as you like.

On Wed, Sep 25, 2013 at 06:17:35PM +0300, Andrei Andone wrote:
> Yeah, I could use multiple `set_field` actions, but then the flow
> would be really long (and for now I only need to change around 7
> fields and the flow start being pretty hard to read).
> 
> Example:
> ovs-ofctl add-flow my_bridge "in_port=1 \
> actions=set_field:value->field1,set_field:value->field2,set_field:value->field3, \
> set_field:value->field4,set_field:value->field5,set_field:value->field6,set_field:value->field7,output:2"
>  
> To me it seems a bit hard to read and understand. Right now I have
> my action and the flow changes to:
> ovs-ofctl add-flow my_bridge "in_port=1
> actions=my_action:value:value:...,output:2"
> 
> On 09/25/2013 06:10 PM, Ben Pfaff wrote:
> > On Wed, Sep 25, 2013 at 11:31:13AM +0300, Andrei Andone wrote:
> > > What do you guys usually use or recommend regarding new complex
> > > actions (complex as in it modifies more fields), is it better to
> > > define the action similarly to the nicira extended actions or should
> > > I just create an action for each field that needs to be modified?
> > If you follow the pattern already in the tree, you don't need to create
> > new actions to modify the fields that you add: you can use
> > NXAST_REG_LOAD or OFPAT12_SET_FIELD.
> > 
> 
> 
> -- 
> Andrei Andone
> 
> SOFTVISION | 57 Republicii Street, 400489 Cluj-Napoca, Romania
> Email: andrei.andone at softvision.ro
> <mailto:andrei.andone at softvision.ro> | Web: www.softvision.ro
> <http://www.softvision.ro>
> 
> The content of this communication is classified as SOFTVISION
> Confidential and Proprietary Information.
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic