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 <[email protected]> --- ofproto/ofproto-dpif.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.1.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
