Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8068/?format=api
https://patches.dpdk.org/api/patches/8068/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445950311-20497-9-git-send-email-konstantin.ananyev@intel.com/", "project": { "id": 1, "url": "https://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": "<1445950311-20497-9-git-send-email-konstantin.ananyev@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1445950311-20497-9-git-send-email-konstantin.ananyev@intel.com", "date": "2015-10-27T12:51:50", "name": "[dpdk-dev,PATCHv7,8/9] testpmd: add new command to display RX/TX queue information", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "28e8b190908046313d99a318b33c26c8a0cd9e87", "submitter": { "id": 33, "url": "https://patches.dpdk.org/api/people/33/?format=api", "name": "Ananyev, Konstantin", "email": "konstantin.ananyev@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445950311-20497-9-git-send-email-konstantin.ananyev@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8068/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8068/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 3691C8DA3;\n\tTue, 27 Oct 2015 13:52:27 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 364055A65\n\tfor <dev@dpdk.org>; Tue, 27 Oct 2015 13:52:22 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga103.fm.intel.com with ESMTP; 27 Oct 2015 05:52:21 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 27 Oct 2015 05:52:19 -0700", "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt9RCqJsv028745; Tue, 27 Oct 2015 12:52:19 GMT", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t9RCqI2A020608;\n\tTue, 27 Oct 2015 12:52:18 GMT", "(from kananye1@localhost)\n\tby sivswdev02.ir.intel.com with id t9RCqIpc020604;\n\tTue, 27 Oct 2015 12:52:18 GMT" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,205,1444719600\"; d=\"scan'208\";a=\"588888825\"", "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 27 Oct 2015 12:51:50 +0000", "Message-Id": "<1445950311-20497-9-git-send-email-konstantin.ananyev@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": [ "<1445950311-20497-1-git-send-email-konstantin.ananyev@intel.com>", "<1445515592-25920-2-git-send-email-konstantin.ananyev@intel.com>" ], "References": [ "<1445950311-20497-1-git-send-email-konstantin.ananyev@intel.com>", "<1445515592-25920-2-git-send-email-konstantin.ananyev@intel.com>" ], "Subject": "[dpdk-dev] [PATCHv7 8/9] testpmd: add new command to display RX/TX\n\tqueue information", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <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": "Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n app/test-pmd/cmdline.c | 48 +++++++++++++++++++++++++++++++\n app/test-pmd/config.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h | 2 ++\n 3 files changed, 127 insertions(+)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0f8f48f..ea2b8a8 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -5305,6 +5305,53 @@ cmdline_parse_inst_t cmd_showport = {\n \t},\n };\n \n+/* *** SHOW QUEUE INFO *** */\n+struct cmd_showqueue_result {\n+\tcmdline_fixed_string_t show;\n+\tcmdline_fixed_string_t type;\n+\tcmdline_fixed_string_t what;\n+\tuint8_t portnum;\n+\tuint16_t queuenum;\n+};\n+\n+static void\n+cmd_showqueue_parsed(void *parsed_result,\n+\t__attribute__((unused)) struct cmdline *cl,\n+\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_showqueue_result *res = parsed_result;\n+\n+\tif (!strcmp(res->type, \"rxq\"))\n+\t\trx_queue_infos_display(res->portnum, res->queuenum);\n+\telse if (!strcmp(res->type, \"txq\"))\n+\t\ttx_queue_infos_display(res->portnum, res->queuenum);\n+}\n+\n+cmdline_parse_token_string_t cmd_showqueue_show =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showqueue_result, show, \"show\");\n+cmdline_parse_token_string_t cmd_showqueue_type =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showqueue_result, type, \"rxq#txq\");\n+cmdline_parse_token_string_t cmd_showqueue_what =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showqueue_result, what, \"info\");\n+cmdline_parse_token_num_t cmd_showqueue_portnum =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, portnum, UINT8);\n+cmdline_parse_token_num_t cmd_showqueue_queuenum =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_showqueue_result, queuenum, UINT16);\n+\n+cmdline_parse_inst_t cmd_showqueue = {\n+\t.f = cmd_showqueue_parsed,\n+\t.data = NULL,\n+\t.help_str = \"show rxq|txq info <port number> <queue_number>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_showqueue_show,\n+\t\t(void *)&cmd_showqueue_type,\n+\t\t(void *)&cmd_showqueue_what,\n+\t\t(void *)&cmd_showqueue_portnum,\n+\t\t(void *)&cmd_showqueue_queuenum,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** READ PORT REGISTER *** */\n struct cmd_read_reg_result {\n \tcmdline_fixed_string_t read;\n@@ -8910,6 +8957,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_help_long,\n \t(cmdline_parse_inst_t *)&cmd_quit,\n \t(cmdline_parse_inst_t *)&cmd_showport,\n+\t(cmdline_parse_inst_t *)&cmd_showqueue,\n \t(cmdline_parse_inst_t *)&cmd_showportall,\n \t(cmdline_parse_inst_t *)&cmd_showcfg,\n \t(cmdline_parse_inst_t *)&cmd_start,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cf2aa6e..aad2ab6 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -293,6 +293,69 @@ nic_stats_mapping_display(portid_t port_id)\n }\n \n void\n+rx_queue_infos_display(portid_t port_id, uint16_t queue_id)\n+{\n+\tstruct rte_eth_rxq_info qinfo;\n+\tint32_t rc;\n+\tstatic const char *info_border = \"*********************\";\n+\n+\trc = rte_eth_rx_queue_info_get(port_id, queue_id, &qinfo);\n+\tif (rc != 0) {\n+\t\tprintf(\"Failed to retrieve information for port: %hhu, \"\n+\t\t\t\"RX queue: %hu\\nerror desc: %s(%d)\\n\",\n+\t\t\tport_id, queue_id, strerror(-rc), rc);\n+\t\treturn;\n+\t}\n+\n+\tprintf(\"\\n%s Infos for port %-2u, RX queue %-2u %s\",\n+\t info_border, port_id, queue_id, info_border);\n+\n+\tprintf(\"\\nMempool: %s\", (qinfo.mp == NULL) ? \"NULL\" : qinfo.mp->name);\n+\tprintf(\"\\nRX prefetch threshold: %hhu\", qinfo.conf.rx_thresh.pthresh);\n+\tprintf(\"\\nRX host threshold: %hhu\", qinfo.conf.rx_thresh.hthresh);\n+\tprintf(\"\\nRX writeback threshold: %hhu\", qinfo.conf.rx_thresh.wthresh);\n+\tprintf(\"\\nRX free threshold: %hu\", qinfo.conf.rx_free_thresh);\n+\tprintf(\"\\nRX drop packets: %s\",\n+\t\t(qinfo.conf.rx_drop_en != 0) ? \"on\" : \"off\");\n+\tprintf(\"\\nRX deferred start: %s\",\n+\t\t(qinfo.conf.rx_deferred_start != 0) ? \"on\" : \"off\");\n+\tprintf(\"\\nRX scattered packets: %s\",\n+\t\t(qinfo.scattered_rx != 0) ? \"on\" : \"off\");\n+\tprintf(\"\\nNumber of RXDs: %hu\", qinfo.nb_desc);\n+\tprintf(\"\\n\");\n+}\n+\n+void\n+tx_queue_infos_display(portid_t port_id, uint16_t queue_id)\n+{\n+\tstruct rte_eth_txq_info qinfo;\n+\tint32_t rc;\n+\tstatic const char *info_border = \"*********************\";\n+\n+\trc = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);\n+\tif (rc != 0) {\n+\t\tprintf(\"Failed to retrieve information for port: %hhu, \"\n+\t\t\t\"TX queue: %hu\\nerror desc: %s(%d)\\n\",\n+\t\t\tport_id, queue_id, strerror(-rc), rc);\n+\t\treturn;\n+\t}\n+\n+\tprintf(\"\\n%s Infos for port %-2u, TX queue %-2u %s\",\n+\t info_border, port_id, queue_id, info_border);\n+\n+\tprintf(\"\\nTX prefetch threshold: %hhu\", qinfo.conf.tx_thresh.pthresh);\n+\tprintf(\"\\nTX host threshold: %hhu\", qinfo.conf.tx_thresh.hthresh);\n+\tprintf(\"\\nTX writeback threshold: %hhu\", qinfo.conf.tx_thresh.wthresh);\n+\tprintf(\"\\nTX RS threshold: %hu\", qinfo.conf.tx_rs_thresh);\n+\tprintf(\"\\nTX free threshold: %hu\", qinfo.conf.tx_free_thresh);\n+\tprintf(\"\\nTX flags: %#x\", qinfo.conf.txq_flags);\n+\tprintf(\"\\nTX deferred start: %s\",\n+\t\t(qinfo.conf.tx_deferred_start != 0) ? \"on\" : \"off\");\n+\tprintf(\"\\nNumber of TXDs: %hu\", qinfo.nb_desc);\n+\tprintf(\"\\n\");\n+}\n+\n+void\n port_infos_display(portid_t port_id)\n {\n \tstruct rte_port *port;\n@@ -380,6 +443,20 @@ port_infos_display(portid_t port_id)\n \t\t\tprintf(\" %s\\n\", (p ? p : \"unknown\"));\n \t\t}\n \t}\n+\n+\tprintf(\"Max possible RX queues: %u\\n\", dev_info.max_rx_queues);\n+\tprintf(\"Max possible number of RXDs per queue: %hu\\n\",\n+\t\tdev_info.rx_desc_lim.nb_max);\n+\tprintf(\"Min possible number of RXDs per queue: %hu\\n\",\n+\t\tdev_info.rx_desc_lim.nb_min);\n+\tprintf(\"RXDs number alignment: %hu\\n\", dev_info.rx_desc_lim.nb_align);\n+\n+\tprintf(\"Max possible TX queues: %u\\n\", dev_info.max_tx_queues);\n+\tprintf(\"Max possible number of TXDs per queue: %hu\\n\",\n+\t\tdev_info.tx_desc_lim.nb_max);\n+\tprintf(\"Min possible number of TXDs per queue: %hu\\n\",\n+\t\tdev_info.tx_desc_lim.nb_min);\n+\tprintf(\"TXDs number alignment: %hu\\n\", dev_info.tx_desc_lim.nb_align);\n }\n \n int\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex f925df7..5ea773f 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -479,6 +479,8 @@ void nic_xstats_display(portid_t port_id);\n void nic_xstats_clear(portid_t port_id);\n void nic_stats_mapping_display(portid_t port_id);\n void port_infos_display(portid_t port_id);\n+void rx_queue_infos_display(portid_t port_idi, uint16_t queue_id);\n+void tx_queue_infos_display(portid_t port_idi, uint16_t queue_id);\n void fwd_lcores_config_display(void);\n void fwd_config_display(void);\n void rxtx_config_display(void);\n", "prefixes": [ "dpdk-dev", "PATCHv7", "8/9" ] }{ "id": 8068, "url": "