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

List:       openvswitch-discuss
Subject:    [ovs-discuss] n_actions in add_flow() and check_ofp_message_array()
From:       blp () nicira ! com (Ben Pfaff)
Date:       2011-10-18 13:26:29
Message-ID: 20111018132629.GE22101 () nicira ! com
[Download RAW message or body]

On Tue, Oct 18, 2011 at 04:23:03PM +0300, Ivan Zazulyak wrote:
> So, I am using a source code from a head of WDP branch and have a
> question regarding to the number of actions, stored in the
> wdp_flow_put::n_actions structure member.

It is a mistake to use the WDP branch.  It is hopelessly out-of-date.
The ideas in the WDP branch are implemented much better in "master", so
please upgrade to "master"

> This member is set in the add_flow() function and described in
> comments as number of actions in the flow.
> But in fact it is calculated by the check_ofp_message_array()
> function as a number of 8-byte blocks (slots).
> 
> An action could occupy several slots, e.g currntly the
> ofp_action_dl_addr action structure requires 2 ones.
> 
> Hereby are my conclusions:
> - n_action should be always treated as number of slots, not actual
> number of actions
> - application is responsible for parsing actions, based on the type
> of action and it's length
> 
> Is it correct?

Yes, that's common practice in the OVS source tree.

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

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