[dpdk-dev,2/3] net/sfc: support DROP action in flow API

Message ID 1519737080-7212-3-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Andrew Rybchenko Feb. 27, 2018, 1:11 p.m. UTC
  From: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>

Signed-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/sfc_efx.rst | 2 ++
 drivers/net/sfc/sfc_flow.c  | 7 +++++++
 2 files changed, 9 insertions(+)
  

Patch

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index f41ccdb..36e98d3 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -183,6 +183,8 @@  Supported actions:
 
 - RSS
 
+- DROP
+
 Validating flow rules depends on the firmware variant.
 
 Ethernet destinaton individual/group match
diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 2b8bef8..4fe20a2 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1497,6 +1497,13 @@  sfc_flow_parse_actions(struct sfc_adapter *sa,
 			break;
 #endif /* EFSYS_OPT_RX_SCALE */
 
+		case RTE_FLOW_ACTION_TYPE_DROP:
+			flow->spec.template.efs_dmaq_id =
+				EFX_FILTER_SPEC_RX_DMAQ_ID_DROP;
+
+			is_specified = B_TRUE;
+			break;
+
 		default:
 			rte_flow_error_set(error, ENOTSUP,
 					   RTE_FLOW_ERROR_TYPE_ACTION, actions,