From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A69807CBF for ; Tue, 30 May 2017 18:46:20 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2017 09:46:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,418,1491289200"; d="scan'208";a="974720592" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga003.jf.intel.com with ESMTP; 30 May 2017 09:44:36 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net, adrien.mazarguil@6wind.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, declan.doherty@intel.com, keith.wiles@intel.com Date: Tue, 30 May 2017 17:44:13 +0100 Message-Id: <1496162653-137817-4-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496162653-137817-1-git-send-email-cristian.dumitrescu@intel.com> References: <1496162653-137817-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [RFC 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: , X-List-Received-Date: Tue, 30 May 2017 16:46:21 -0000 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 c47edbc..2942ca7 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -881,6 +881,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, }; /** @@ -974,6 +982,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. -- 2.7.4