From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH v3 3/4] ethdev: Add group action type to rte_flow Date: Fri, 6 Apr 2018 13:24:02 +0100 Message-ID: <1523017443-12414-4-git-send-email-declan.doherty@intel.com> References: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> Cc: Declan Doherty To: dev@dpdk.org Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4AE311CFA8 for ; Fri, 6 Apr 2018 14:24:33 +0200 (CEST) In-Reply-To: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 | 15 +++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 106fb93..2f0a47a 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 6d94423..968a23b 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -1251,6 +1251,21 @@ struct rte_flow_action_tunnel_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. * * A list of actions is terminated by a END action. -- 2.7.4