From: Paul Blakey <[email protected]>

Currently we send the tc csum action even if it's not needed.
Fix that by sending it only if csum update flags isn't zero.

Signed-off-by: Paul Blakey <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
---
 lib/tc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/tc.c b/lib/tc.c
index 9170e3e..d3a0312 100644
--- a/lib/tc.c
+++ b/lib/tc.c
@@ -1371,9 +1371,11 @@ nl_msg_put_flower_acts(struct ofpbuf *request, struct 
tc_flower *flower)
             }
             nl_msg_end_nested(request, act_offset);
 
-            act_offset = nl_msg_start_nested(request, act_index++);
-            nl_msg_put_act_csum(request, flower->csum_update_flags);
-            nl_msg_end_nested(request, act_offset);
+            if (flower->csum_update_flags) {
+                act_offset = nl_msg_start_nested(request, act_index++);
+                nl_msg_put_act_csum(request, flower->csum_update_flags);
+                nl_msg_end_nested(request, act_offset);
+            }
         }
         if (flower->set.set) {
             act_offset = nl_msg_start_nested(request, act_index++);
-- 
2.7.5

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to