Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/43373/?format=api
http://patchwork.dpdk.org/api/patches/43373/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180725171007.94198-4-jasvinder.singh@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20180725171007.94198-4-jasvinder.singh@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180725171007.94198-4-jasvinder.singh@intel.com", "date": "2018-07-25T17:10:04", "name": "[3/6] net/softnic: add CLI command for tmgr shared shaper", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5a994750cf7ca8a4e00a497b580bc3a28888cfc8", "submitter": { "id": 285, "url": "http://patchwork.dpdk.org/api/people/285/?format=api", "name": "Jasvinder Singh", "email": "jasvinder.singh@intel.com" }, "delegate": { "id": 10018, "url": "http://patchwork.dpdk.org/api/users/10018/?format=api", "username": "cristian_dumitrescu", "first_name": "Cristian", "last_name": "Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180725171007.94198-4-jasvinder.singh@intel.com/mbox/", "series": [ { "id": 775, "url": "http://patchwork.dpdk.org/api/series/775/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=775", "date": "2018-07-25T17:10:01", "name": "net/softnic: expose tmgr through firmware", "version": 1, "mbox": "http://patchwork.dpdk.org/series/775/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/43373/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/43373/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 35D2544BE;\n\tWed, 25 Jul 2018 19:10:19 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id C221D324B\n\tfor <dev@dpdk.org>; Wed, 25 Jul 2018 19:10:13 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2018 10:10:13 -0700", "from silpixa00381635.ir.intel.com (HELO\n\tsilpixa00381635.ger.corp.intel.com) ([10.237.222.149])\n\tby orsmga003.jf.intel.com with ESMTP; 25 Jul 2018 10:10:12 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,401,1526367600\"; d=\"scan'208\";a=\"69856140\"", "From": "Jasvinder Singh <jasvinder.singh@intel.com>", "To": "dev@dpdk.org", "Cc": "cristian.dumitrescu@intel.com", "Date": "Wed, 25 Jul 2018 18:10:04 +0100", "Message-Id": "<20180725171007.94198-4-jasvinder.singh@intel.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20180725171007.94198-1-jasvinder.singh@intel.com>", "References": "<20180725171007.94198-1-jasvinder.singh@intel.com>", "Subject": "[dpdk-dev] [PATCH 3/6] net/softnic: add CLI command for tmgr shared\n\tshaper", "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": "From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n\nAdd support to create Traffic Manager (TMGR) shared shaper through\nfirmware CLI script.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_cli.c | 73 +++++++++++++++++++++++++++++++\n 1 file changed, 73 insertions(+)", "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c\nindex 0a9ec01..73ea7bd 100644\n--- a/drivers/net/softnic/rte_eth_softnic_cli.c\n+++ b/drivers/net/softnic/rte_eth_softnic_cli.c\n@@ -272,6 +272,72 @@ cmd_tmgr_shaper_profile(struct pmd_internals *softnic,\n }\n \n /**\n+ * tmgr shared shaper\n+ * id <shared_shaper_id>\n+ * profile <shaper_profile_id>\n+ */\n+static void\n+cmd_tmgr_shared_shaper(struct pmd_internals *softnic,\n+\tchar **tokens,\n+\tuint32_t n_tokens,\n+\tchar *out,\n+\tsize_t out_size)\n+{\n+\tstruct rte_tm_error error;\n+\tuint32_t shared_shaper_id, shaper_profile_id;\n+\tuint16_t port_id;\n+\tint status;\n+\n+\tif (n_tokens != 7) {\n+\t\tsnprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[1], \"shared\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"shared\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[2], \"shaper\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"shaper\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[3], \"id\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"id\");\n+\t\treturn;\n+\t}\n+\n+\tif (softnic_parser_read_uint32(&shared_shaper_id, tokens[4]) != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"shared_shaper_id\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[5], \"profile\") != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"profile\");\n+\t\treturn;\n+\t}\n+\n+\tif (softnic_parser_read_uint32(&shaper_profile_id, tokens[6]) != 0) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"shaper_profile_id\");\n+\t\treturn;\n+\t}\n+\n+\tstatus = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);\n+\tif (status)\n+\t\treturn;\n+\n+\tstatus = rte_tm_shared_shaper_add_update(port_id,\n+\t\tshared_shaper_id,\n+\t\tshaper_profile_id,\n+\t\t&error);\n+\tif (status != 0) {\n+\t\tsnprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);\n+\t\treturn;\n+\t}\n+}\n+\n+/**\n * tmgr <tmgr_name>\n */\n static void\n@@ -4081,6 +4147,13 @@ softnic_cli_process(char *in, char *out, size_t out_size, void *arg)\n \t\t\tcmd_tmgr_shaper_profile(softnic, tokens, n_tokens, out, out_size);\n \t\t\treturn;\n \t\t}\n+\n+\t\tif (n_tokens >= 3 &&\n+\t\t\t(strcmp(tokens[1], \"shared\") == 0) &&\n+\t\t\t(strcmp(tokens[2], \"shaper\") == 0)) {\n+\t\t\tcmd_tmgr_shared_shaper(softnic, tokens, n_tokens, out, out_size);\n+\t\t\treturn;\n+\t\t}\n \t}\n \n \tif (strcmp(tokens[0], \"tap\") == 0) {\n", "prefixes": [ "3/6" ] }{ "id": 43373, "url": "