On 10/21/22 08:26, Ales Musil wrote:
> When the packet was traveling through patch port boundary
> OvS would check if any of the actions is reversible,
> if not it would clone the packet. However, the check
> was only at the first level of the second bridge.
> That caused some issues when the packet had gone
> through more actions, some of them might have been
> irreversible.
> 
> In order to keep the semantics the same we might
> need to run the actions twice in the worst case
> scenario. During the clone there are 4 scenarios
> that can happen.
> 
> 1) The action is last one for that flow,
> in that case we just continue without clone.
> 
> 2) There is irreversible action in the action
> set (first level). In this case we know that
> there is at leas one irreversible action which
> is enough to do clone.
> 
> 3) All actions in first level are reversible,
> we can try to run all actions as if we don't
> need any clone and inspect the ofpbuf at the
> end. In positive case there are no irreversible
> actions so we will just submit the buffer and continue.
> 
> 4) This is same as 3) with the difference that
> there is irreversible action in the ofpbuf.
> To keep the semantics we need to re-run the actions
> and treat it as clone. This requires resotration
> of the xlate_ctx.

Hi, Ales and Eelco.

This scenario number 4 is bothering me.  I don't think we can
actually re-run the translation as if nothing happened.

The main issue is that flow translation can have side effects.
These side effects may include flow learning, mac learning,
packet generation (ARPs and stuff), bonding processing and maybe
some other things.

By translating actions twice side effects will be applied twice.

One potential solution to this is to perform a first run with
side effects disabled and then run again with the original
state of side effects.  That will mean that we will almost
always translate everything twice.  Or we need to figure out
how to deal with actions commit before clone.

At the same time the delayed actions commit is an optimization
and not a necessity, while we're trying to fix a bug with
missing clones here.

I don't have an immediate solution for the actions commit
at the moment, but I'll try to think more about that.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to