Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91000/?format=api
http://patches.dpdk.org/api/patches/91000/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210410072445.1872769-3-lizh@nvidia.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": "<20210410072445.1872769-3-lizh@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210410072445.1872769-3-lizh@nvidia.com", "date": "2021-04-10T07:24:43", "name": "[v3,2/4] app/testpmd: add meter profile packet mode option", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1f4d2c063350cc84427f08594c7f1bc900d12462", "submitter": { "id": 1967, "url": "http://patches.dpdk.org/api/people/1967/?format=api", "name": "Li Zhang", "email": "lizh@nvidia.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210410072445.1872769-3-lizh@nvidia.com/mbox/", "series": [ { "id": 16256, "url": "http://patches.dpdk.org/api/series/16256/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16256", "date": "2021-04-10T07:24:41", "name": "Support PPS(packet per second) on meter", "version": 3, "mbox": "http://patches.dpdk.org/series/16256/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/91000/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/91000/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BEAF4A0547;\n\tSat, 10 Apr 2021 09:25:02 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4595314119A;\n\tSat, 10 Apr 2021 09:24:57 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id B96E9141194\n for <dev@dpdk.org>; Sat, 10 Apr 2021 09:24:54 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n lizh@nvidia.com)\n with SMTP; 10 Apr 2021 10:24:49 +0300", "from nvidia.com (c-235-17-1-009.mtl.labs.mlnx [10.235.17.9])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 13A7OmbH017139;\n Sat, 10 Apr 2021 10:24:49 +0300" ], "From": "Li Zhang <lizh@nvidia.com>", "To": "dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,\n matan@nvidia.com, shahafs@nvidia.com, cristian.dumitrescu@intel.com,\n lironh@marvell.com, Xiaoyun Li <xiaoyun.li@intel.com>", "Cc": "dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com", "Date": "Sat, 10 Apr 2021 10:24:43 +0300", "Message-Id": "<20210410072445.1872769-3-lizh@nvidia.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20210410072445.1872769-1-lizh@nvidia.com>", "References": "<20210408035849.1755493-1-lizh@nvidia.com>\n <20210410072445.1872769-1-lizh@nvidia.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 2/4] app/testpmd: add meter profile packet\n mode option", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "add meter profile packet_mode to the ethernet device.\nOne example:\nadd port meter profile rfc2697 (port_id) (profile_id)\n(cir) (cbs) (ebs) (packet_mode)\n\nSigned-off-by: Li Zhang <lizh@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n app/test-pmd/cmdline_mtr.c | 40 +++++++++++++++++++--\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 31 ++++++++--------\n 2 files changed, 54 insertions(+), 17 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c\nindex bdc9ae8bfe..eff2473e7b 100644\n--- a/app/test-pmd/cmdline_mtr.c\n+++ b/app/test-pmd/cmdline_mtr.c\n@@ -263,6 +263,18 @@ static void cmd_show_port_meter_cap_parsed(void *parsed_result,\n \t\tcap.color_aware_trtcm_rfc2698_supported);\n \tprintf(\"cap.color_aware_trtcm_rfc4115_supported %\" PRId32 \"\\n\",\n \t\tcap.color_aware_trtcm_rfc4115_supported);\n+\tprintf(\"cap.srtcm_rfc2697_byte_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.srtcm_rfc2697_byte_mode_supported);\n+\tprintf(\"cap.srtcm_rfc2697_packet_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.srtcm_rfc2697_packet_mode_supported);\n+\tprintf(\"cap.trtcm_rfc2698_byte_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.trtcm_rfc2698_byte_mode_supported);\n+\tprintf(\"cap.trtcm_rfc2698_packet_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.trtcm_rfc2698_packet_mode_supported);\n+\tprintf(\"cap.trtcm_rfc4115_byte_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.trtcm_rfc4115_byte_mode_supported);\n+\tprintf(\"cap.trtcm_rfc4115_packet_mode_supported %\" PRId32 \"\\n\",\n+\t\tcap.trtcm_rfc4115_packet_mode_supported);\n \tprintf(\"cap.stats_mask %\" PRIx64 \"\\n\", cap.stats_mask);\n }\n \n@@ -292,6 +304,7 @@ struct cmd_add_port_meter_profile_srtcm_result {\n \tuint64_t cir;\n \tuint64_t cbs;\n \tuint64_t ebs;\n+\tint packet_mode;\n };\n \n cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcm_add =\n@@ -333,6 +346,10 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_ebs =\n \tTOKEN_NUM_INITIALIZER(\n \t\tstruct cmd_add_port_meter_profile_srtcm_result,\n \t\t\tebs, RTE_UINT64);\n+cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_packet_mode =\n+\tTOKEN_NUM_INITIALIZER(\n+\t\tstruct cmd_add_port_meter_profile_srtcm_result,\n+\t\t\tpacket_mode, RTE_UINT32);\n \n static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,\n \t__rte_unused struct cmdline *cl,\n@@ -354,6 +371,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,\n \tmp.srtcm_rfc2697.cir = res->cir;\n \tmp.srtcm_rfc2697.cbs = res->cbs;\n \tmp.srtcm_rfc2697.ebs = res->ebs;\n+\tmp.packet_mode = res->packet_mode;\n \n \tret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);\n \tif (ret != 0) {\n@@ -365,7 +383,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,\n cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = {\n \t.f = cmd_add_port_meter_profile_srtcm_parsed,\n \t.data = NULL,\n-\t.help_str = \"add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs>\",\n+\t.help_str = \"add port meter profile srtcm_rfc2697 <port_id> <profile_id> <cir> <cbs> <ebs> <packet_mode>\",\n \t.tokens = {\n \t\t(void *)&cmd_add_port_meter_profile_srtcm_add,\n \t\t(void *)&cmd_add_port_meter_profile_srtcm_port,\n@@ -377,6 +395,7 @@ cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = {\n \t\t(void *)&cmd_add_port_meter_profile_srtcm_cir,\n \t\t(void *)&cmd_add_port_meter_profile_srtcm_cbs,\n \t\t(void *)&cmd_add_port_meter_profile_srtcm_ebs,\n+\t\t(void *)&cmd_add_port_meter_profile_srtcm_packet_mode,\n \t\tNULL,\n \t},\n };\n@@ -394,6 +413,7 @@ struct cmd_add_port_meter_profile_trtcm_result {\n \tuint64_t pir;\n \tuint64_t cbs;\n \tuint64_t pbs;\n+\tint packet_mode;\n };\n \n cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_add =\n@@ -439,6 +459,10 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_pbs =\n \tTOKEN_NUM_INITIALIZER(\n \t\tstruct cmd_add_port_meter_profile_trtcm_result,\n \t\t\tpbs, RTE_UINT64);\n+cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_packet_mode =\n+\tTOKEN_NUM_INITIALIZER(\n+\t\tstruct cmd_add_port_meter_profile_trtcm_result,\n+\t\t\tpacket_mode, RTE_UINT32);\n \n static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,\n \t__rte_unused struct cmdline *cl,\n@@ -461,6 +485,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,\n \tmp.trtcm_rfc2698.pir = res->pir;\n \tmp.trtcm_rfc2698.cbs = res->cbs;\n \tmp.trtcm_rfc2698.pbs = res->pbs;\n+\tmp.packet_mode = res->packet_mode;\n \n \tret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);\n \tif (ret != 0) {\n@@ -472,7 +497,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,\n cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = {\n \t.f = cmd_add_port_meter_profile_trtcm_parsed,\n \t.data = NULL,\n-\t.help_str = \"add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs>\",\n+\t.help_str = \"add port meter profile trtcm_rfc2698 <port_id> <profile_id> <cir> <pir> <cbs> <pbs> <packet_mode>\",\n \t.tokens = {\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_add,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_port,\n@@ -485,6 +510,7 @@ cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = {\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_pir,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_cbs,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_pbs,\n+\t\t(void *)&cmd_add_port_meter_profile_trtcm_packet_mode,\n \t\tNULL,\n \t},\n };\n@@ -502,6 +528,7 @@ struct cmd_add_port_meter_profile_trtcm_rfc4115_result {\n \tuint64_t eir;\n \tuint64_t cbs;\n \tuint64_t ebs;\n+\tint packet_mode;\n };\n \n cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_rfc4115_add =\n@@ -549,6 +576,11 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_ebs =\n \tTOKEN_NUM_INITIALIZER(\n \t\tstruct cmd_add_port_meter_profile_trtcm_rfc4115_result,\n \t\t\tebs, RTE_UINT64);\n+cmdline_parse_token_num_t\n+\tcmd_add_port_meter_profile_trtcm_rfc4115_packet_mode =\n+\tTOKEN_NUM_INITIALIZER(\n+\t\tstruct cmd_add_port_meter_profile_trtcm_rfc4115_result,\n+\t\t\tpacket_mode, RTE_UINT32);\n \n static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(\n \tvoid *parsed_result,\n@@ -573,6 +605,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(\n \tmp.trtcm_rfc4115.eir = res->eir;\n \tmp.trtcm_rfc4115.cbs = res->cbs;\n \tmp.trtcm_rfc4115.ebs = res->ebs;\n+\tmp.packet_mode = res->packet_mode;\n \n \tret = rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error);\n \tif (ret != 0) {\n@@ -584,7 +617,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(\n cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = {\n \t.f = cmd_add_port_meter_profile_trtcm_rfc4115_parsed,\n \t.data = NULL,\n-\t.help_str = \"add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs>\",\n+\t.help_str = \"add port meter profile trtcm_rfc4115 <port_id> <profile_id> <cir> <eir> <cbs> <ebs> <packet_mode>\",\n \t.tokens = {\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port,\n@@ -597,6 +630,7 @@ cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = {\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_eir,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_cbs,\n \t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_ebs,\n+\t\t(void *)&cmd_add_port_meter_profile_trtcm_rfc4115_packet_mode,\n \t\tNULL,\n \t},\n };\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 4e9089beaf..59f7b3ebd9 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2716,14 +2716,15 @@ add port meter profile (srTCM rfc2967)\n Add meter profile (srTCM rfc2697) to the ethernet device::\n \n testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id) \\\n- (cir) (cbs) (ebs)\n+ (cir) (cbs) (ebs) (packet_mode)\n \n where:\n \n * ``profile_id``: ID for the meter profile.\n-* ``cir``: Committed Information Rate (CIR) (bytes/second).\n-* ``cbs``: Committed Burst Size (CBS) (bytes).\n-* ``ebs``: Excess Burst Size (EBS) (bytes).\n+* ``cir``: Committed Information Rate (CIR) (bytes per second or packets per second).\n+* ``cbs``: Committed Burst Size (CBS) (bytes or packets).\n+* ``ebs``: Excess Burst Size (EBS) (bytes or packets).\n+* ``packet_mode``: Packets mode for meter profile.\n \n add port meter profile (trTCM rfc2968)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n@@ -2731,15 +2732,16 @@ add port meter profile (trTCM rfc2968)\n Add meter profile (srTCM rfc2698) to the ethernet device::\n \n testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id) \\\n- (cir) (pir) (cbs) (pbs)\n+ (cir) (pir) (cbs) (pbs) (packet_mode)\n \n where:\n \n * ``profile_id``: ID for the meter profile.\n-* ``cir``: Committed information rate (bytes/second).\n-* ``pir``: Peak information rate (bytes/second).\n-* ``cbs``: Committed burst size (bytes).\n-* ``pbs``: Peak burst size (bytes).\n+* ``cir``: Committed information rate (bytes per second or packets per second).\n+* ``pir``: Peak information rate (bytes per second or packets per second).\n+* ``cbs``: Committed burst size (bytes or packets).\n+* ``pbs``: Peak burst size (bytes or packets).\n+* ``packet_mode``: Packets mode for meter profile.\n \n add port meter profile (trTCM rfc4115)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n@@ -2747,15 +2749,16 @@ add port meter profile (trTCM rfc4115)\n Add meter profile (trTCM rfc4115) to the ethernet device::\n \n testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id) \\\n- (cir) (eir) (cbs) (ebs)\n+ (cir) (eir) (cbs) (ebs) (packet_mode)\n \n where:\n \n * ``profile_id``: ID for the meter profile.\n-* ``cir``: Committed information rate (bytes/second).\n-* ``eir``: Excess information rate (bytes/second).\n-* ``cbs``: Committed burst size (bytes).\n-* ``ebs``: Excess burst size (bytes).\n+* ``cir``: Committed information rate (bytes per second or packets per second).\n+* ``eir``: Excess information rate (bytes per second or packets per second).\n+* ``cbs``: Committed burst size (bytes or packets).\n+* ``ebs``: Excess burst size (bytes or packets).\n+* ``packet_mode``: Packets mode for meter profile.\n \n delete port meter profile\n ~~~~~~~~~~~~~~~~~~~~~~~~~\n", "prefixes": [ "v3", "2/4" ] }{ "id": 91000, "url": "