[ovs-dev] [PATCH v3 1/2] ofproto: Allow xlate_actions() to fail.

Jarno Rajahalme jarno at ovn.org
Wed Nov 25 18:31:48 UTC 2015


> On Nov 24, 2015, at 5:02 PM, Joe Stringer <joe at ovn.org> wrote:
> 
> On 24 November 2015 at 13:41, Jarno Rajahalme <jarno at ovn.org> wrote:
>> 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.
>> 
>> 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 at ovn.org>
> 
> Should this also set the error when receiving packets on a mirror port
> in xlate_actions()? Or when receiving tagged VLAN traffic that doesn't
> correspond to the port's vlan tag? Or when a group has no live bucket?
> Are there any other cases that should also be covered? (I just scanned
> across ofproto/ofproto-dpif-xlate.c looking for cases where we're
> already logging that we drop the packet, but maybe there's a reasoning
> behind not including these - if so, please enlighten me)

No reasoning for missing those, I just did not notice them. Thanks for pointing them out.

  Jarno




More information about the dev mailing list