From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id CB3891CBD9 for ; Thu, 5 Apr 2018 16:00:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2018 07:00:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,411,1517904000"; d="scan'208";a="214177542" Received: from dwdohert-ws.ir.intel.com ([163.33.210.60]) by orsmga005.jf.intel.com with ESMTP; 05 Apr 2018 07:00:15 -0700 From: Declan Doherty To: dev@dpdk.org Cc: Alex Rosenbaum , Ferruh Yigit , Thomas Monjalon , Shahaf Shuler , Qi Zhang , Alejandro Lucero , Andrew Rybchenko , Mohammad Abdul Awal , Remy Horton , John McNamara , Rony Efraim , Jingjing Wu , Wenzhuo Lu , Yuanhan Liu , Bruce Richardson , Declan Doherty Date: Thu, 5 Apr 2018 14:51:47 +0100 Message-Id: <20180405135148.16388-4-declan.doherty@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180405135148.16388-1-declan.doherty@intel.com> References: <20180405135148.16388-1-declan.doherty@intel.com> Subject: [dpdk-dev] [PATCH v2 3/4] ethdev: Add group action type to rte_flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 14:00:19 -0000 Add group action type which defines a terminating action which allows a matched flow to be redirect to a group. This allows logical flow table hierarchies to be managed through rte_flow. Signed-off-by: Declan Doherty --- doc/guides/prog_guide/rte_flow.rst | 23 +++++++++++++++++++++++ lib/librte_ether/rte_flow.h | 28 +++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index ba7baf2e4..362231829 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1557,6 +1557,29 @@ set of overlay header type. | ``item type`` | Item type of tunnel end-point to decapsulate | +---------------+----------------------------------------------+ + +Action: ``GROUP`` +^^^^^^^^^^^^^^^^^ + +Redirects packets to a group on the current device. + +In a hierarchy of groups, which can be used to represent physical or logical +flow tables on the device, this action allows the terminating action to be a +group on that device. + +- Terminating by default. + +.. _table_rte_flow_action_group: + +.. table:: GROUP + + +--------------+---------------------------------+ + | Field | Value | + +==============+=================================+ + | ``id`` | Group ID to redirect packets to | + +--------------+---------------------------------+ + + Negative types ~~~~~~~~~~~~~~ diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index 4061a9cd4..55951b6ca 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -1043,7 +1043,18 @@ enum rte_flow_action_type { * * See struct rte_flow_action_vtep_decap. */ - RTE_FLOW_ACTION_TYPE_VTEP_DECAP + RTE_FLOW_ACTION_TYPE_VTEP_DECAP, + + /** + * Redirects packets to the logical group of the current device. + * + * In a logical hierarchy of groups, which can be used to represent a + * physical of logical chaining of flow tables, this action allows the + * terminating action to be a logical group of the same device. + * + * See struct rte_flow_action_group. + */ + RTE_FLOW_ACTION_TYPE_GROUP }; /** @@ -1226,6 +1237,21 @@ struct rte_flow_action_vtep_decap { */ }; +/** + * RTE_FLOW_ACTION_TYPE_GROUP + * + * Redirects packets to a group on the current device. + * + * In a hierarchy of groups, which can be used to represent physical or logical + * flow tables on the device, this action allows the terminating action to be a + * group on that device. + * + * Terminating by default. + */ +struct rte_flow_action_group { + uint32_t id; +}; + /** * Definition of a single action. * -- 2.14.3