[ovs-dev] [PATCH] xlate: Correct handling of double encap() actions

Ben Pfaff blp at ovn.org
Wed Apr 4 21:46:24 UTC 2018

On Mon, Mar 26, 2018 at 09:44:21AM +0200, Jan Scheurich wrote:
> When the same encap() header was pushed twice onto a packet (e.g in the
> case of NSH in NSH), the translation logic only generated a datapath push
> action for the first encap() action. The second encap() did not emit a
> push action because the packet type was unchanged.
> commit_encap_decap_action() (renamed from commit_packet_type_change) must
> solely rely on ctx->pending_encap to generate an datapath push action.
> Similarly, the first decap() action on a double header packet does not
> change the packet_type either. Add a corresponding ctx->pending_decap
> flag and use that to trigger emitting a datapath pop action.
> Fixes: f839892a2 ("OF support and translation of generic encap and decap")
> Fixes: 1fc11c594 ("Generic encap and decap support for NSH")
> Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
> ---
> This fix should be backported OVS 2.8 and 2.9

This seems tricky.  Do you plan to write a test?

More information about the dev mailing list