Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44624/?format=api
http://patches.dpdk.org/api/patches/44624/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180912164138.55800-2-jasvinder.singh@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": "<20180912164138.55800-2-jasvinder.singh@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180912164138.55800-2-jasvinder.singh@intel.com", "date": "2018-09-12T16:41:29", "name": "[v2,01/10] net/softnic: add metering and policing support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "89111c57da169c81c82506c2f2d436934c5770de", "submitter": { "id": 285, "url": "http://patches.dpdk.org/api/people/285/?format=api", "name": "Jasvinder Singh", "email": "jasvinder.singh@intel.com" }, "delegate": { "id": 10018, "url": "http://patches.dpdk.org/api/users/10018/?format=api", "username": "cristian_dumitrescu", "first_name": "Cristian", "last_name": "Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180912164138.55800-2-jasvinder.singh@intel.com/mbox/", "series": [ { "id": 1297, "url": "http://patches.dpdk.org/api/series/1297/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1297", "date": "2018-09-12T16:41:28", "name": "net/softnic: implement metering and policing API", "version": 2, "mbox": "http://patches.dpdk.org/series/1297/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/44624/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/44624/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 F310F4CBD;\n\tWed, 12 Sep 2018 18:41:44 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 6354F4C94\n\tfor <dev@dpdk.org>; Wed, 12 Sep 2018 18:41:42 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Sep 2018 09:41:41 -0700", "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby orsmga002.jf.intel.com with ESMTP; 12 Sep 2018 09:41:40 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.53,365,1531810800\"; d=\"scan'208\";a=\"91068279\"", "From": "Jasvinder Singh <jasvinder.singh@intel.com>", "To": "dev@dpdk.org", "Cc": "cristian.dumitrescu@intel.com", "Date": "Wed, 12 Sep 2018 17:41:29 +0100", "Message-Id": "<20180912164138.55800-2-jasvinder.singh@intel.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20180912164138.55800-1-jasvinder.singh@intel.com>", "References": "<20180907181357.23915-2-jasvinder.singh@intel.com>\n\t<20180912164138.55800-1-jasvinder.singh@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 01/10] net/softnic: add metering and policing\n\tsupport", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Enable metering and policing support for softnic.\n\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n drivers/net/softnic/Makefile | 1 +\n drivers/net/softnic/meson.build | 1 +\n drivers/net/softnic/rte_eth_softnic.c | 10 ++++++++\n drivers/net/softnic/rte_eth_softnic_internals.h | 5 ++++\n drivers/net/softnic/rte_eth_softnic_meter.c | 31 +++++++++++++++++++++++++\n 5 files changed, 48 insertions(+)\n create mode 100644 drivers/net/softnic/rte_eth_softnic_meter.c", "diff": "diff --git a/drivers/net/softnic/Makefile b/drivers/net/softnic/Makefile\nindex 12515b1..720f067b 100644\n--- a/drivers/net/softnic/Makefile\n+++ b/drivers/net/softnic/Makefile\n@@ -34,6 +34,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_pipeline.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_thread.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_cli.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_flow.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += rte_eth_softnic_meter.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += parser.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += conn.c\n \ndiff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build\nindex 56e5e2b..6b7a6cc 100644\n--- a/drivers/net/softnic/meson.build\n+++ b/drivers/net/softnic/meson.build\n@@ -14,6 +14,7 @@ sources = files('rte_eth_softnic_tm.c',\n \t'rte_eth_softnic_thread.c',\n \t'rte_eth_softnic_cli.c',\n \t'rte_eth_softnic_flow.c',\n+\t'rte_eth_softnic_meter.c',\n \t'parser.c',\n \t'conn.c')\n deps += ['pipeline', 'port', 'table', 'sched']\ndiff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c\nindex ae2a438..659a1b4 100644\n--- a/drivers/net/softnic/rte_eth_softnic.c\n+++ b/drivers/net/softnic/rte_eth_softnic.c\n@@ -14,6 +14,7 @@\n #include <rte_errno.h>\n #include <rte_ring.h>\n #include <rte_tm_driver.h>\n+#include <rte_mtr_driver.h>\n \n #include \"rte_eth_softnic.h\"\n #include \"rte_eth_softnic_internals.h\"\n@@ -228,6 +229,14 @@ pmd_tm_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg)\n \treturn 0;\n }\n \n+static int\n+pmd_mtr_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg)\n+{\n+\t*(const struct rte_mtr_ops **)arg = &pmd_mtr_ops;\n+\n+\treturn 0;\n+}\n+\n static const struct eth_dev_ops pmd_ops = {\n \t.dev_configure = pmd_dev_configure,\n \t.dev_start = pmd_dev_start,\n@@ -239,6 +248,7 @@ static const struct eth_dev_ops pmd_ops = {\n \t.tx_queue_setup = pmd_tx_queue_setup,\n \t.filter_ctrl = pmd_filter_ctrl,\n \t.tm_ops_get = pmd_tm_ops_get,\n+\t.mtr_ops_get = pmd_mtr_ops_get,\n };\n \n static uint16_t\ndiff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h\nindex a1a2e15..92be4e8 100644\n--- a/drivers/net/softnic/rte_eth_softnic_internals.h\n+++ b/drivers/net/softnic/rte_eth_softnic_internals.h\n@@ -572,6 +572,11 @@ flow_attr_map_get(struct pmd_internals *softnic,\n extern const struct rte_flow_ops pmd_flow_ops;\n \n /**\n+ * Meter\n+ */\n+extern const struct rte_mtr_ops pmd_mtr_ops;\n+\n+/**\n * MEMPOOL\n */\n int\ndiff --git a/drivers/net/softnic/rte_eth_softnic_meter.c b/drivers/net/softnic/rte_eth_softnic_meter.c\nnew file mode 100644\nindex 0000000..0a5409b\n--- /dev/null\n+++ b/drivers/net/softnic/rte_eth_softnic_meter.c\n@@ -0,0 +1,31 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#include <stdint.h>\n+#include <stdlib.h>\n+#include <string.h>\n+\n+#include <rte_mtr.h>\n+#include <rte_mtr_driver.h>\n+\n+#include \"rte_eth_softnic_internals.h\"\n+\n+const struct rte_mtr_ops pmd_mtr_ops = {\n+\t.capabilities_get = NULL,\n+\n+\t.meter_profile_add = NULL,\n+\t.meter_profile_delete = NULL,\n+\n+\t.create = NULL,\n+\t.destroy = NULL,\n+\t.meter_enable = NULL,\n+\t.meter_disable = NULL,\n+\n+\t.meter_profile_update = NULL,\n+\t.meter_dscp_table_update = NULL,\n+\t.policer_actions_update = NULL,\n+\t.stats_update = NULL,\n+\n+\t.stats_read = NULL,\n+};\n", "prefixes": [ "v2", "01/10" ] }{ "id": 44624, "url": "