ofproto: Allow xlate_actions() to fail.
Sometimes xlate_actions() fails due to too deep recursion, too many
MPLS labels, or missing recirculation context. Make xlate_actions()
clear out the produced odp actions in these cases to make it easy for
the caller to install a drop flow (instead or installing a flow with
partially translated actions). Also, return a specific error code, so
that the error can be properly propagated where meaningful.
There are may cases in which the NORMAL action decides to drop the
packet. Most of these are not, however, traslation errors, but just
reactions to malformed input. In these cases it is correct to make the
NORMAL action do nothing, but allow other actions in the pipeline (if
any) to take effect.
Before this patch it was possible that the revalidation installed a
flow with a recirculation ID with an invalid recirc ID (== 0), due to
the introduction of in-place modification in commit
43b2f131a229
(ofproto: Allow in-place modifications of datapath flows).
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>