Message ID | 1492215949-75081-1-git-send-email-jarno@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Fri, Apr 14, 2017 at 05:25:47PM -0700, Jarno Rajahalme wrote: > So far the force commit feature is implemented together with the > original direction tuple feature by all datapaths, so we can use the > support flag for the 'ct_orig_tuple' to indicate support for the force > commit feature as well. > > Better fail the flow install than rely on ovs-vswitchd log being > filled by error messages from the datapath. > > Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Thanks! Acked-by: Ben Pfaff <blp@ovn.org>
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 6a5ffb9..c0212f2 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4178,6 +4178,14 @@ check_actions(const struct ofproto_dpif *ofproto, report_unsupported_ct("zone"); return OFPERR_OFPBAC_BAD_ARGUMENT; } + /* So far the force commit feature is implemented together with the + * original direction tuple feature by all datapaths, so we use the + * support flag for the 'ct_orig_tuple' to indicate support for the + * force commit feature as well. */ + if ((ct->flags & NX_CT_F_FORCE) && !support->ct_orig_tuple) { + report_unsupported_ct("force commit"); + return OFPERR_OFPBAC_BAD_ARGUMENT; + } OFPACT_FOR_EACH(a, ct->actions, ofpact_ct_get_action_len(ct)) { const struct mf_field *dst = ofpact_get_mf_dst(a);
So far the force commit feature is implemented together with the original direction tuple feature by all datapaths, so we can use the support flag for the 'ct_orig_tuple' to indicate support for the force commit feature as well. Better fail the flow install than rely on ovs-vswitchd log being filled by error messages from the datapath. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> --- ofproto/ofproto-dpif.c | 8 ++++++++ 1 file changed, 8 insertions(+)