[ovs-discuss] Stack implication of OVS group action

Han Zhou hzhou at ovn.org
Tue Nov 19 21:05:23 UTC 2019

In the ovs-actions man page it is mentioned that:

       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. A design that would
 work  would  be   for  the  bucket to recursively invoke the rest of the
pipeline with resubmit rather than to attempt to return it. Another
possibility is for the bucket to use push to put the value on the stack for
the caller to pop off, since group preserves  only  packet data and
metadata, not the stack.

However, with my testing it seems even push to stack doesn't work, i.e.
after the group action, pop cannot get the value pushed by a group bucket.
Checking the code, I saw below comments saying differently from the man

     * Note that group buckets are action sets, hence they cannot modify the
     * main action set.  Also any stack actions are ignored when executing
     * action set, so group buckets cannot change the stack either.

Could someone help clarify on this? Is the man page out of date? If so,
does it mean the only way that group action can modify registers is to
resubmit, which also indicates that the group action should always be the
last action of a rule?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20191119/e0cb8016/attachment.html>

More information about the discuss mailing list