get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35120,
    "url": "http://patches.dpdk.org/api/patches/35120/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180212045314.171616-3-qi.z.zhang@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": "<20180212045314.171616-3-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180212045314.171616-3-qi.z.zhang@intel.com",
    "date": "2018-02-12T04:53:12",
    "name": "[dpdk-dev,2/4] app/testpmd: add parameters for deferred queue setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ce24077affb6f688d8692cb041ca0d44064e231c",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.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/20180212045314.171616-3-qi.z.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35120/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/35120/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 046A01B344;\n\tMon, 12 Feb 2018 05:53:27 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 055A31B314\n\tfor <dev@dpdk.org>; Mon, 12 Feb 2018 05:53:23 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Feb 2018 20:53:23 -0800",
            "from dpdk51.sh.intel.com ([10.67.110.184])\n\tby fmsmga001.fm.intel.com with ESMTP; 11 Feb 2018 20:53:22 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,500,1511856000\"; d=\"scan'208\";a=\"30009479\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net",
        "Cc": "dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com,\n\tarybchenko@solarflare.com, konstantin.ananyev@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Mon, 12 Feb 2018 12:53:12 +0800",
        "Message-Id": "<20180212045314.171616-3-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180212045314.171616-1-qi.z.zhang@intel.com>",
        "References": "<20180212045314.171616-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/4] app/testpmd: add parameters for deferred\n\tqueue setup",
        "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://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": "<https://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": "Add two parameters:\nrxq-setup: set the number of RX queues be setup before device started\ntxq-setup: set the number of TX queues be setup before device started.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n app/test-pmd/parameters.c             | 29 +++++++++++++++++++++++++++++\n app/test-pmd/testpmd.c                |  8 ++++++--\n app/test-pmd/testpmd.h                |  2 ++\n doc/guides/testpmd_app_ug/run_app.rst | 12 ++++++++++++\n 4 files changed, 49 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c\nindex 97d22b860..497259ee7 100644\n--- a/app/test-pmd/parameters.c\n+++ b/app/test-pmd/parameters.c\n@@ -146,8 +146,12 @@ usage(char* progname)\n \tprintf(\"  --rss-ip: set RSS functions to IPv4/IPv6 only .\\n\");\n \tprintf(\"  --rss-udp: set RSS functions to IPv4/IPv6 + UDP.\\n\");\n \tprintf(\"  --rxq=N: set the number of RX queues per port to N.\\n\");\n+\tprintf(\"  --rxq-setup=N: set the number of RX queues be setup before\"\n+\t       \"device start to N.\\n\");\n \tprintf(\"  --rxd=N: set the number of descriptors in RX rings to N.\\n\");\n \tprintf(\"  --txq=N: set the number of TX queues per port to N.\\n\");\n+\tprintf(\"  --txq-setup=N: set the number of TX queues be setup before\"\n+\t       \"device start to N.\\n\");\n \tprintf(\"  --txd=N: set the number of descriptors in TX rings to N.\\n\");\n \tprintf(\"  --burst=N: set the number of packets per burst to N.\\n\");\n \tprintf(\"  --mbcache=N: set the cache of mbuf memory pool to N.\\n\");\n@@ -596,7 +600,9 @@ launch_args_parse(int argc, char** argv)\n \t\t{ \"rss-ip\",\t\t\t0, 0, 0 },\n \t\t{ \"rss-udp\",\t\t\t0, 0, 0 },\n \t\t{ \"rxq\",\t\t\t1, 0, 0 },\n+\t\t{ \"rxq-setup\",\t\t\t1, 0, 0 },\n \t\t{ \"txq\",\t\t\t1, 0, 0 },\n+\t\t{ \"txq-setup\",\t\t\t1, 0, 0 },\n \t\t{ \"rxd\",\t\t\t1, 0, 0 },\n \t\t{ \"txd\",\t\t\t1, 0, 0 },\n \t\t{ \"burst\",\t\t\t1, 0, 0 },\n@@ -933,6 +939,15 @@ launch_args_parse(int argc, char** argv)\n \t\t\t\t\t\t  \" >= 0 && <= %u\\n\", n,\n \t\t\t\t\t\t  get_allowed_max_nb_rxq(&pid));\n \t\t\t}\n+\t\t\tif (!strcmp(lgopts[opt_idx].name, \"rxq-setup\")) {\n+\t\t\t\tn = atoi(optarg);\n+\t\t\t\tif (n >= 0 && check_nb_rxq((queueid_t)n) == 0)\n+\t\t\t\t\tnb_rxq_setup = (queueid_t) n;\n+\t\t\t\telse\n+\t\t\t\t\trte_exit(EXIT_FAILURE, \"rxq-setup %d invalid - must be\"\n+\t\t\t\t\t\t  \" >= 0 && <= %u\\n\", n,\n+\t\t\t\t\t\t  get_allowed_max_nb_rxq(&pid));\n+\t\t\t}\n \t\t\tif (!strcmp(lgopts[opt_idx].name, \"txq\")) {\n \t\t\t\tn = atoi(optarg);\n \t\t\t\tif (n >= 0 && check_nb_txq((queueid_t)n) == 0)\n@@ -942,6 +957,15 @@ launch_args_parse(int argc, char** argv)\n \t\t\t\t\t\t  \" >= 0 && <= %u\\n\", n,\n \t\t\t\t\t\t  get_allowed_max_nb_txq(&pid));\n \t\t\t}\n+\t\t\tif (!strcmp(lgopts[opt_idx].name, \"txq-setup\")) {\n+\t\t\t\tn = atoi(optarg);\n+\t\t\t\tif (n >= 0 && check_nb_txq((queueid_t)n) == 0)\n+\t\t\t\t\tnb_txq_setup = (queueid_t) n;\n+\t\t\t\telse\n+\t\t\t\t\trte_exit(EXIT_FAILURE, \"txq-setup %d invalid - must be\"\n+\t\t\t\t\t\t  \" >= 0 && <= %u\\n\", n,\n+\t\t\t\t\t\t  get_allowed_max_nb_txq(&pid));\n+\t\t\t}\n \t\t\tif (!nb_rxq && !nb_txq) {\n \t\t\t\trte_exit(EXIT_FAILURE, \"Either rx or tx queues should \"\n \t\t\t\t\t\t\"be non-zero\\n\");\n@@ -1119,4 +1143,9 @@ launch_args_parse(int argc, char** argv)\n \t/* Set offload configuration from command line parameters. */\n \trx_mode.offloads = rx_offloads;\n \ttx_mode.offloads = tx_offloads;\n+\n+\tif (nb_rxq_setup > nb_rxq)\n+\t\tnb_rxq_setup = nb_rxq;\n+\tif (nb_txq_setup > nb_txq)\n+\t\tnb_txq_setup = nb_txq;\n }\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 46dc22c94..790e7359c 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -207,6 +207,10 @@ uint8_t dcb_test = 0;\n  */\n queueid_t nb_rxq = 1; /**< Number of RX queues per port. */\n queueid_t nb_txq = 1; /**< Number of TX queues per port. */\n+queueid_t nb_rxq_setup = MAX_QUEUE_ID;\n+/**< Number of RX queues per port start when dev_start. */\n+queueid_t nb_txq_setup = MAX_QUEUE_ID;\n+/**< Number of TX queues per port start when dev_start  */\n \n /*\n  * Configurable number of RX/TX ring descriptors.\n@@ -1594,7 +1598,7 @@ start_port(portid_t pid)\n \t\t\t/* Apply Tx offloads configuration */\n \t\t\tport->tx_conf.offloads = port->dev_conf.txmode.offloads;\n \t\t\t/* setup tx queues */\n-\t\t\tfor (qi = 0; qi < nb_txq; qi++) {\n+\t\t\tfor (qi = 0; qi < nb_txq_setup; qi++) {\n \t\t\t\tif ((numa_support) &&\n \t\t\t\t\t(txring_numa[pi] != NUMA_NO_CONFIG))\n \t\t\t\t\tdiag = rte_eth_tx_queue_setup(pi, qi,\n@@ -1622,7 +1626,7 @@ start_port(portid_t pid)\n \t\t\t/* Apply Rx offloads configuration */\n \t\t\tport->rx_conf.offloads = port->dev_conf.rxmode.offloads;\n \t\t\t/* setup rx queues */\n-\t\t\tfor (qi = 0; qi < nb_rxq; qi++) {\n+\t\t\tfor (qi = 0; qi < nb_rxq_setup; qi++) {\n \t\t\t\tif ((numa_support) &&\n \t\t\t\t\t(rxring_numa[pi] != NUMA_NO_CONFIG)) {\n \t\t\t\t\tstruct rte_mempool * mp =\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 153abea05..1a423eb8c 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -373,6 +373,8 @@ extern uint64_t rss_hf;\n \n extern queueid_t nb_rxq;\n extern queueid_t nb_txq;\n+extern queueid_t nb_rxq_setup;\n+extern queueid_t nb_txq_setup;\n \n extern uint16_t nb_rxd;\n extern uint16_t nb_txd;\ndiff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst\nindex 1fd53958a..63dbec407 100644\n--- a/doc/guides/testpmd_app_ug/run_app.rst\n+++ b/doc/guides/testpmd_app_ug/run_app.rst\n@@ -354,6 +354,12 @@ The commandline options are:\n     Set the number of RX queues per port to N, where 1 <= N <= 65535.\n     The default value is 1.\n \n+*   ``--rxq-setup=N``\n+\n+    Set the number of RX queues will be setup before device started,\n+    where 0 <= N <= 65535. The default value is rxq, if the number is\n+    larger than rxq, it will be set to rxq automatically.\n+\n *   ``--rxd=N``\n \n     Set the number of descriptors in the RX rings to N, where N > 0.\n@@ -364,6 +370,12 @@ The commandline options are:\n     Set the number of TX queues per port to N, where 1 <= N <= 65535.\n     The default value is 1.\n \n+*   ``--txq-setup=N``\n+\n+    Set the number of TX queues will be setup before device started,\n+    where 0 <= N <= 65535. The default value is rxq, if the number is\n+    larger than txq, it will be set to txq automatically.\n+\n *   ``--txd=N``\n \n     Set the number of descriptors in the TX rings to N, where N > 0.\n",
    "prefixes": [
        "dpdk-dev",
        "2/4"
    ]
}