[ovs-dev] Flow actions handling

Ben Pfaff blp at ovn.org
Sat Jul 2 00:39:13 UTC 2016


On Wed, Jun 29, 2016 at 07:52:10PM +0530, Kapil Adhikesavalu wrote:
> Hi,
> 
> i have the following flow rule,
> 
> *tun_id=0xfa0,in_port=10 actions=mod_vlan_vid:1,resubmit(0,2),resubmit(0,1)*
> 
> and i need to know in which order actions will be performed.
> 
> will the actions be performed in the s*ame order as mentioned* in the flow
> ? like
> 
> 1. Modify VLAN as 1
> 2. then resubmit modified packet to table 2
> 3. then resubmit the same packet to table 1.
> 
> is it guaranteed that actions will be performed in this order? i seem to
> hit a case where packet is seen in table 2 without VLAN mod.

The FAQ says:

### Q: I added a flow to accept packets on VLAN 123 and output them on
   VLAN 456, like so:

       ovs-ofctl add-flow br0 dl_vlan=123,actions=output:1,mod_vlan_vid:456

   but the packets are actually being output in VLAN 123.  Why?

A: OpenFlow actions are executed in the order specified.  Thus, the
   actions above first output the packet, then change its VLAN.  Since
   the output occurs before changing the VLAN, the change in VLAN will
   have no visible effect.

   To solve this and similar problems, order actions so that changes
   to headers happen before output, e.g.:

       ovs-ofctl add-flow br0 dl_vlan=123,actions=mod_vlan_vid:456,output:1



More information about the dev mailing list