From patchwork Fri Apr 6 12:24:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Doherty, Declan" X-Patchwork-Id: 37359 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 429F31CFB4; Fri, 6 Apr 2018 14:24:36 +0200 (CEST) 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: , 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.