When certain interfaces are selectively excluded
to use TC datapath, flow_modify can fail with EOPNOTSUPP
and since the error value gets explicitly set to 0,
The flows are not deleted from kernel.

Avoid setting error value to 0 if flow_api and /or flow_del are NULL.

Signed-off-by: Rama Shankar Pandey <[email protected]>
---
 lib/dpif-netlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 7587c9c3e..57900cd38 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -2354,7 +2354,8 @@ out:
              * Change flags to create the flow in kernel */
             put->flags &= ~DPIF_FP_MODIFY;
             put->flags |= DPIF_FP_CREATE;
-        } else if (del_err != ENOENT) {
+        } else if (del_err != ENOENT &&
+                   del_err != EOPNOTSUPP) {
             VLOG_ERR_RL(&rl, "failed to delete offloaded flow: %s",
                         ovs_strerror(del_err));
             /* stop proccesing the flow in kernel */
-- 
2.51.0

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

Reply via email to