Re: [ovs-dev] [PATCH 1/3] ofproto-dpif: Check support for CT action force commit flag.

2017-04-17 Thread Ben Pfaff
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 

Thanks!

Acked-by: Ben Pfaff 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/3] ofproto-dpif: Check support for CT action force commit flag.

2017-04-14 Thread Jarno Rajahalme
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 
---
 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
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev