[ovs-discuss] pop_vlan action is missing in datapath actions with write_action(group)

Ben Pfaff blp at ovn.org
Thu Apr 8 15:48:49 UTC 2021


On Wed, Apr 07, 2021 at 11:02:25PM +0530, Rudra Surya Bhaskara Rao via discuss wrote:
> Hi,
> 
>  
> 
> Please help me with the below issue. Please let me know is it expected
> behaviour or issue.
> 
> With the write_actions(group) inside a group bucket is ignoring the
> pop_vlan action . Please find the sample flows and groups configuration
> below:

I think you're running into the way that each bucket is executed
independently and doesn't affect what happens later in the pipeline.
ovs-actions(7) documents it as follows.  This complies with my
understanding of the OpenFlow specification:

       A group action usually executes the action set or sets in one or
       more group buckets. Open vSwitch saves the packet and metadata
       before it executes each bucket, and then restores it
       afterward. Thus, when a group executes more than one bucket, this
       means that each bucket executes on the same packet and meta‐data.
       Moreover, regardless of the number of buckets executed, the
       packet and metadata are the same before and after executing the
       group.

       Sometimes saving and restoring the packet and metadata can be
       undesirable.  In these situations, workarounds are possible. For
       example, consider a pipeline design in which a select group
       bucket is to communicate to a later stage of processing a value
       based on which bucket was selected. An obvious design would be
       for the bucket to communicate the value via set_field on a
       register.  This does not work because registers are part of the
       metadata that group saves and restores. The following alternative
       bucket designs do work:

              • Recursively invoke the rest of the pipeline with
                resubmit.

              • Use resubmit into a table that uses push to put the
                value on the stack for the caller to pop off. This works
                because group preserves only packet data and metadata,
                not the stack.

                (This design requires indirection through resubmit
                because actions sets may not contain push or pop
                actions.)


More information about the discuss mailing list