Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/29723/?format=api
http://patches.dpdk.org/api/patches/29723/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com", "date": "2017-10-05T13:09:30", "name": "[dpdk-dev,V2,1/5] ethdev: add new flow action for metering and policing", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b2032facfeb965f1233085fef47dfe16fa5f8049", "submitter": { "id": 19, "url": "http://patches.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/29723/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/29723/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 753CB1B1FB;\n\tThu, 5 Oct 2017 15:09:43 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 0787B1B1BB\n\tfor <dev@dpdk.org>; Thu, 5 Oct 2017 15:09:39 +0200 (CEST)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Oct 2017 06:09:39 -0700", "from silpixa00382658.ir.intel.com ([10.237.223.29])\n\tby fmsmga004.fm.intel.com with ESMTP; 05 Oct 2017 06:09:37 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,481,1500966000\"; d=\"scan'208\";a=\"319901056\"", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, adrien.mazarguil@6wind.com, jingjing.wu@intel.com, \n\themant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com,\n\tjasvinder.singh@intel.com", "Date": "Thu, 5 Oct 2017 14:09:30 +0100", "Message-Id": "<1507208974-180500-2-git-send-email-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1507208974-180500-1-git-send-email-cristian.dumitrescu@intel.com>", "References": "<1503705973-80742-2-git-send-email-cristian.dumitrescu@intel.com>\n\t<1507208974-180500-1-git-send-email-cristian.dumitrescu@intel.com>", "Subject": "[dpdk-dev] [PATCH V2 1/5] ethdev: add new flow action for metering\n\tand policing", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Metering and policing action typically sits on top of flow classification,\nwhich is why MTR objects are enabled through a newly introduced flow\naction.\n\nThe configuration of MTR objects is done in their own namespace (rte_mtr)\nwithin the librte_ether library. The MTR object is hooked into ethdev RX\nprocessing path using the \"meter\" flow action.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++++++++++++\n lib/librte_ether/rte_flow.h | 22 ++++++++++++++++++++++\n 2 files changed, 46 insertions(+)", "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 662a912..6b9cdc2 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1354,6 +1354,30 @@ rule or if packets are not addressed to a VF in the first place.\n | ``vf`` | VF ID to redirect packets to |\n +--------------+--------------------------------+\n \n+Action: ``METER``\n+^^^^^^^^^^^^^^^^^\n+\n+Applies a stage of metering and policing.\n+\n+The metering and policing (MTR) object has to be first created using the\n+rte_mtr_create() API function. The ID of the MTR object is specified as\n+action parameter. One or several meter actions can be added to the same\n+flow. More than one flow can use the same MTR object through the meter\n+action. The MTR object can be further updated or queried using the\n+rte_mtr* API.\n+\n+- Non-terminating by default.\n+\n+.. _table_rte_flow_action_meter:\n+\n+.. table:: METER\n+\n+ +--------------+---------------+\n+ | Field | Value |\n+ +==============+===============+\n+ | ``mtr_id`` | MTR object ID |\n+ +--------------+---------------+\n+\n Negative types\n ~~~~~~~~~~~~~~\n \ndiff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h\nindex bba6169..5569a87 100644\n--- a/lib/librte_ether/rte_flow.h\n+++ b/lib/librte_ether/rte_flow.h\n@@ -915,6 +915,14 @@ enum rte_flow_action_type {\n \t * See struct rte_flow_action_vf.\n \t */\n \tRTE_FLOW_ACTION_TYPE_VF,\n+\n+\t/**\n+\t * Traffic metering and policing (MTR).\n+\t *\n+\t * See struct rte_flow_action_meter.\n+\t * See file rte_mtr.h for MTR object configuration.\n+\t */\n+\tRTE_FLOW_ACTION_TYPE_METER,\n };\n \n /**\n@@ -1008,6 +1016,20 @@ struct rte_flow_action_vf {\n };\n \n /**\n+ * RTE_FLOW_ACTION_TYPE_METER\n+ *\n+ * Traffic metering and policing (MTR).\n+ *\n+ * Packets matched by items of this type can be either dropped or passed to the\n+ * next item with their color set by the MTR object.\n+ *\n+ * Non-terminating by default.\n+ */\n+struct rte_flow_action_meter {\n+\tuint32_t mtr_id; /**< MTR object ID created with rte_mtr_create(). */\n+};\n+\n+/**\n * Definition of a single action.\n *\n * A list of actions is terminated by a END action.\n", "prefixes": [ "dpdk-dev", "V2", "1/5" ] }{ "id": 29723, "url": "