From patchwork Sat Aug 26 00:06:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 28023 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 81A717D7A; Sat, 26 Aug 2017 02:06:22 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4C7857D05 for ; Sat, 26 Aug 2017 02:06:18 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 17:06:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,426,1498546800"; d="scan'208";a="304538006" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by fmsmga004.fm.intel.com with ESMTP; 25 Aug 2017 17:06:16 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net, adrien.mazarguil@6wind.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com Date: Sat, 26 Aug 2017 01:06:13 +0100 Message-Id: <1503705973-80742-4-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503705973-80742-1-git-send-email-cristian.dumitrescu@intel.com> References: <1496162653-137817-3-git-send-email-cristian.dumitrescu@intel.com> <1503705973-80742-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 3/3] rte_flow: add new action for traffic metering and policing 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" Signed-off-by: Cristian Dumitrescu --- lib/librte_ether/rte_flow.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index bba6169..5569a87 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -915,6 +915,14 @@ enum rte_flow_action_type { * See struct rte_flow_action_vf. */ RTE_FLOW_ACTION_TYPE_VF, + + /** + * Traffic metering and policing (MTR). + * + * See struct rte_flow_action_meter. + * See file rte_mtr.h for MTR object configuration. + */ + RTE_FLOW_ACTION_TYPE_METER, }; /** @@ -1008,6 +1016,20 @@ struct rte_flow_action_vf { }; /** + * RTE_FLOW_ACTION_TYPE_METER + * + * Traffic metering and policing (MTR). + * + * Packets matched by items of this type can be either dropped or passed to the + * next item with their color set by the MTR object. + * + * Non-terminating by default. + */ +struct rte_flow_action_meter { + uint32_t mtr_id; /**< MTR object ID created with rte_mtr_create(). */ +}; + +/** * Definition of a single action. * * A list of actions is terminated by a END action.