diff mbox series

[ovs-dev,V2,15/19] netdev-offload-dpdk-flow: Support offload of drop action

Message ID 20191202084153.14412-16-elibr@mellanox.com
State Changes Requested
Delegated to: Ilya Maximets
Headers show
Series netdev datapath actions offload | expand

Commit Message

Eli Britstein Dec. 2, 2019, 8:41 a.m. UTC
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
---
 NEWS                           | 2 +-
 lib/netdev-offload-dpdk-flow.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index 33882d2af..45eef591f 100644
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@  Post-v2.12.0
        releases.
      * OVS validated with DPDK 18.11.5, due to the inclusion of a fix for
        CVE-2019-14818, this DPDK version is strongly recommended to be used.
-     * Add hardware offload support for output actions (experimental).
+     * Add hardware offload support for output and drop actions (experimental).
 
 v2.12.0 - 03 Sep 2019
 ---------------------
diff --git a/lib/netdev-offload-dpdk-flow.c b/lib/netdev-offload-dpdk-flow.c
index b633bc129..a73d9522d 100644
--- a/lib/netdev-offload-dpdk-flow.c
+++ b/lib/netdev-offload-dpdk-flow.c
@@ -296,6 +296,8 @@  ds_put_flow_action(struct ds *s, const struct rte_flow_action *actions)
         } else {
             ds_put_cstr(s, "  Port-id = null\n");
         }
+    } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) {
+        ds_put_cstr(s, "rte flow drop action\n");
     } else {
         ds_put_format(s, "unknown rte flow action (%d)\n", actions->type);
     }
@@ -630,9 +632,7 @@  netdev_dpdk_flow_actions_add(struct flow_actions *actions,
     }
 
     if (nl_actions_len == 0) {
-        VLOG_DBG_RL(&error_rl,
-                    "Unsupported action type drop");
-        return -1;
+        add_flow_action(actions, RTE_FLOW_ACTION_TYPE_DROP, NULL);
     }
 
     add_flow_action(actions, RTE_FLOW_ACTION_TYPE_END, NULL);