get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/5515/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 5515,
    "url": "http://patches.dpdk.org/api/patches/5515/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1434633528-23329-6-git-send-email-konstantin.ananyev@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": "<1434633528-23329-6-git-send-email-konstantin.ananyev@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1434633528-23329-6-git-send-email-konstantin.ananyev@intel.com",
    "date": "2015-06-18T13:18:48",
    "name": "[dpdk-dev,PATCHv2,5/5] testpmd: add new command to display RX/TX queue information",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "abc9aa3ba93beb41ba8b3e9786e37beda3e61b29",
    "submitter": {
        "id": 33,
        "url": "http://patches.dpdk.org/api/people/33/?format=api",
        "name": "Ananyev, Konstantin",
        "email": "konstantin.ananyev@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1434633528-23329-6-git-send-email-konstantin.ananyev@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/5515/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/5515/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 B3F77C69A;\n\tThu, 18 Jun 2015 15:19:07 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 335E9C680\n\tfor <dev@dpdk.org>; Thu, 18 Jun 2015 15:19:02 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 18 Jun 2015 06:19:00 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 18 Jun 2015 06:18:59 -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\tt5IDIwsd010632; Thu, 18 Jun 2015 14:18:59 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t5IDIwP9023419;\n\tThu, 18 Jun 2015 14:18:58 +0100",
            "(from kananye1@localhost)\n\tby sivswdev02.ir.intel.com with  id t5IDIwj8023415;\n\tThu, 18 Jun 2015 14:18:58 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,638,1427785200\"; d=\"scan'208\";a=\"729935508\"",
        "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 18 Jun 2015 14:18:48 +0100",
        "Message-Id": "<1434633528-23329-6-git-send-email-konstantin.ananyev@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com>",
        "References": "<1434560084-21237-2-git-send-email-konstantin.ananyev@intel.com>\n\t<1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com>",
        "Subject": "[dpdk-dev] [PATCHv2 5/5] 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  | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h |  2 ++\n 3 files changed, 117 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 8142910..a178801 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -5235,6 +5235,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@@ -8793,6 +8840,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 52917c7..5f76740 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -293,6 +293,73 @@ 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 inforamtion 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(\"\\nMax possible number of RXDs: %hu\", qinfo.max_desc);\n+\tprintf(\"\\nMin possible number of RXDs: %hu\", qinfo.min_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 inforamtion 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(\"\\nMax possible number of TXDs: %hu\", qinfo.max_desc);\n+\tprintf(\"\\nMin possible number of TXDs: %hu\", qinfo.min_desc);\n+\tprintf(\"\\n\");\n+}\n+\n+void\n port_infos_display(portid_t port_id)\n {\n \tstruct rte_port *port;\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex f2c84d9..bcbb632 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -476,6 +476,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",
        "PATCHv2",
        "5/5"
    ]
}