[ovs-dev] [PATCH V3 15/19] netdev-offload-dpdk: Support offload of drop action
Eli Britstein
elibr at mellanox.com
Sun Dec 8 13:23:00 UTC 2019
Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Oz Shlomo <ozsh at mellanox.com>
---
Documentation/howto/dpdk.rst | 1 +
NEWS | 2 +-
lib/netdev-dpdk.c | 2 ++
lib/netdev-offload-dpdk.c | 4 +---
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index f62ce82af..6cedd7f63 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -391,6 +391,7 @@ Supported protocols for hardware offload matches are:
Supported actions for hardware offload are:
- Output (a single output, as the last action).
+- Drop.
Further Reading
---------------
diff --git a/NEWS b/NEWS
index c430999a0..d019e066f 100644
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@ Post-v2.12.0
* DPDK ring ports (dpdkr) are deprecated and will be removed in next
releases.
* Add support for DPDK 19.11.
- * 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-dpdk.c b/lib/netdev-dpdk.c
index d9a2c2004..872a45e75 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -4721,6 +4721,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);
}
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 0b9087192..bffb69cad 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -536,9 +536,7 @@ parse_flow_actions(struct netdev *netdev,
}
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);
--
2.14.5
More information about the dev
mailing list