From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2018 05:24:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,415,1517904000"; d="scan'208";a="30607864" Received: from awal-z170x.ir.intel.com ([163.33.210.59]) by fmsmga008.fm.intel.com with ESMTP; 06 Apr 2018 05:24:32 -0700 From: Declan Doherty To: dev@dpdk.org Cc: Declan Doherty Date: Fri, 6 Apr 2018 13:24:02 +0100 Message-Id: <1523017443-12414-4-git-send-email-declan.doherty@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> References: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> Subject: [dpdk-dev] [PATCH v3 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: Fri, 06 Apr 2018 12:24:34 -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 | 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