tc was not setting the OVS_CT_ATTR_FORCE_COMMIT flag when a forced
commit was requested. This patch will fix this.

Fixes: 576126a931cd ("netdev-offload-tc: Add conntrack support")

Signed-off-by: Eelco Chaudron <echau...@redhat.com>
Acked-by: Roi Dayan <r...@nvidia.com>
---
 lib/netdev-offload-tc.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c
index 4ced81f89..f9f05cd5c 100644
--- a/lib/netdev-offload-tc.c
+++ b/lib/netdev-offload-tc.c
@@ -887,7 +887,11 @@ parse_tc_flower_to_actions__(struct tc_flower *flower, 
struct ofpbuf *buf,
             ct_offset = nl_msg_start_nested(buf, OVS_ACTION_ATTR_CT);
 
             if (action->ct.commit) {
-                nl_msg_put_flag(buf, OVS_CT_ATTR_COMMIT);
+                if (action->ct.force) {
+                    nl_msg_put_flag(buf, OVS_CT_ATTR_FORCE_COMMIT);
+                } else {
+                    nl_msg_put_flag(buf, OVS_CT_ATTR_COMMIT);
+                }
             }
 
             if (action->ct.zone) {
@@ -1376,7 +1380,12 @@ parse_put_flow_ct_action(struct tc_flower *flower,
         NL_ATTR_FOR_EACH_UNSAFE (ct_attr, ct_left, ct, ct_len) {
             switch (nl_attr_type(ct_attr)) {
                 case OVS_CT_ATTR_COMMIT: {
-                        action->ct.commit = true;
+                    action->ct.commit = true;
+                }
+                break;
+                case OVS_CT_ATTR_FORCE_COMMIT: {
+                    action->ct.commit = true;
+                    action->ct.force = true;
                 }
                 break;
                 case OVS_CT_ATTR_ZONE: {

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to