get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64264,
    "url": "http://patches.dpdk.org/api/patches/64264/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200107122201.30910-2-nipun.gupta@nxp.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": "<20200107122201.30910-2-nipun.gupta@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200107122201.30910-2-nipun.gupta@nxp.com",
    "date": "2020-01-07T12:22:01",
    "name": "[2/2,v2] examples/l3fwd: support multiple eth Rx queues in event mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5ffe96424af080b5a49ba62f3dc8c30f926388aa",
    "submitter": {
        "id": 471,
        "url": "http://patches.dpdk.org/api/people/471/?format=api",
        "name": "Nipun Gupta",
        "email": "nipun.gupta@nxp.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200107122201.30910-2-nipun.gupta@nxp.com/mbox/",
    "series": [
        {
            "id": 8002,
            "url": "http://patches.dpdk.org/api/series/8002/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8002",
            "date": "2020-01-07T12:22:00",
            "name": "[1/2,v2] examples/l3fwd: set default schedule type as atomic",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8002/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64264/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/64264/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 91D69A04F6;\n\tTue,  7 Jan 2020 13:39:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6DDD81D629;\n\tTue,  7 Jan 2020 13:39:18 +0100 (CET)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id 8B2681C1D7\n for <dev@dpdk.org>; Tue,  7 Jan 2020 13:39:14 +0100 (CET)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 048101A0183;\n Tue,  7 Jan 2020 13:39:14 +0100 (CET)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D2B721A0341;\n Tue,  7 Jan 2020 13:39:07 +0100 (CET)",
            "from GDB1.ap.freescale.net (gdb1.ap.freescale.net [10.232.132.179])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3F4F7402DE;\n Tue,  7 Jan 2020 20:39:00 +0800 (SGT)"
        ],
        "From": "Nipun Gupta <nipun.gupta@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "pbhagavatula@marvell.com, jerinj@marvell.com, hemant.agrawal@nxp.com,\n akhil.goyal@nxp.com, marko.kovacevic@intel.com, orika@mellanox.com,\n bruce.richardson@intel.com, radu.nicolau@intel.com,\n tomasz.kantecki@intel.com, skori@marvell.com,\n Nipun Gupta <nipun.gupta@nxp.com>",
        "Date": "Tue,  7 Jan 2020 17:52:01 +0530",
        "Message-Id": "<20200107122201.30910-2-nipun.gupta@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200107122201.30910-1-nipun.gupta@nxp.com>",
        "References": "<20200106043445.14334-1-nipun.gupta@nxp.com>\n <20200107122201.30910-1-nipun.gupta@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH 2/2 v2] examples/l3fwd: support multiple eth Rx\n\tqueues in event mode",
        "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 <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": "This patch adds support of multiple Ethernet RX queues\nfor the event dev mode.\n\nSigned-off-by: Nipun Gupta <nipun.gupta@nxp.com>\n---\n\nChanges in v2:\n - Update command line argument to '--event-eth-rxqs' instead of\n   '--event-eth-queues'\n - Correctly printed the number of RX queues being created\n\n examples/l3fwd/l3fwd_event.c | 59 ++++++++++++++++++++++++++++--------\n examples/l3fwd/l3fwd_event.h |  4 +++\n examples/l3fwd/main.c        |  8 +++--\n 3 files changed, 56 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c\nindex 9fea11bd9..1289bc9ab 100644\n--- a/examples/l3fwd/l3fwd_event.c\n+++ b/examples/l3fwd/l3fwd_event.c\n@@ -40,12 +40,32 @@ parse_eventq_sync(const char *optarg)\n \t\tevt_rsrc->sched_type = RTE_SCHED_TYPE_PARALLEL;\n }\n \n+static void\n+parse_event_eth_rx_queues(const char *eth_rx_queues)\n+{\n+\tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n+\tchar *end = NULL;\n+\tuint8_t num_eth_rx_queues;\n+\n+\t/* parse decimal string */\n+\tnum_eth_rx_queues = strtoul(eth_rx_queues, &end, 10);\n+\tif ((eth_rx_queues[0] == '\\0') || (end == NULL) || (*end != '\\0'))\n+\t\treturn;\n+\n+\tif (num_eth_rx_queues == 0)\n+\t\treturn;\n+\n+\tevt_rsrc->eth_rx_queues = num_eth_rx_queues;\n+}\n+\n static void\n l3fwd_parse_eventdev_args(char **argv, int argc)\n {\n \tconst struct option eventdev_lgopts[] = {\n \t\t{CMD_LINE_OPT_MODE, 1, 0, CMD_LINE_OPT_MODE_NUM},\n \t\t{CMD_LINE_OPT_EVENTQ_SYNC, 1, 0, CMD_LINE_OPT_EVENTQ_SYNC_NUM},\n+\t\t{CMD_LINE_OPT_EVENT_ETH_RX_QUEUES, 1, 0,\n+\t\t\t\tCMD_LINE_OPT_EVENT_ETH_RX_QUEUES_NUM},\n \t\t{NULL, 0, 0, 0}\n \t};\n \tchar *prgname = argv[0];\n@@ -64,6 +84,10 @@ l3fwd_parse_eventdev_args(char **argv, int argc)\n \t\t\tparse_eventq_sync(optarg);\n \t\t\tbreak;\n \n+\t\tcase CMD_LINE_OPT_EVENT_ETH_RX_QUEUES_NUM:\n+\t\t\tparse_event_eth_rx_queues(optarg);\n+\t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tprint_usage(prgname);\n \t\t\texit(1);\n@@ -85,6 +109,7 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf)\n \tstruct rte_eth_rxconf rxconf;\n \tunsigned int nb_mbuf;\n \tuint16_t port_id;\n+\tuint8_t eth_qid;\n \tint32_t ret;\n \n \t/* initialize all ports */\n@@ -99,7 +124,8 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf)\n \t\t/* init port */\n \t\tprintf(\"Initializing port %d ... \", port_id);\n \t\tfflush(stdout);\n-\t\tprintf(\"Creating queues: nb_rxq=1 nb_txq=1...\\n\");\n+\t\tprintf(\"Creating queues: nb_rxq=%d nb_txq=1...\\n\",\n+\t\t       evt_rsrc->eth_rx_queues);\n \n \t\trte_eth_dev_info_get(port_id, &dev_info);\n \t\tif (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)\n@@ -118,7 +144,8 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf)\n \t\t\t       local_port_conf.rx_adv_conf.rss_conf.rss_hf);\n \t\t}\n \n-\t\tret = rte_eth_dev_configure(port_id, 1, 1, &local_port_conf);\n+\t\tret = rte_eth_dev_configure(port_id, evt_rsrc->eth_rx_queues,\n+\t\t\t\t\t    1, &local_port_conf);\n \t\tif (ret < 0)\n \t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t \"Cannot configure device: err=%d, port=%d\\n\",\n@@ -161,20 +188,26 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf)\n \t\t\t\t\t  8192u);\n \t\t\tret = init_mem(port_id, nb_mbuf);\n \t\t}\n-\t\t/* init one Rx queue per port */\n+\t\t/* init Rx queues per port */\n \t\trxconf = dev_info.default_rxconf;\n \t\trxconf.offloads = local_port_conf.rxmode.offloads;\n-\t\tif (!evt_rsrc->per_port_pool)\n-\t\t\tret = rte_eth_rx_queue_setup(port_id, 0, nb_rxd, 0,\n-\t\t\t\t\t&rxconf, evt_rsrc->pkt_pool[0][0]);\n-\t\telse\n-\t\t\tret = rte_eth_rx_queue_setup(port_id, 0, nb_rxd, 0,\n-\t\t\t\t\t&rxconf,\n+\n+\t\tfor (eth_qid = 0; eth_qid < evt_rsrc->eth_rx_queues;\n+\t\t     eth_qid++) {\n+\t\t\tif (!evt_rsrc->per_port_pool)\n+\t\t\t\tret = rte_eth_rx_queue_setup(port_id, eth_qid,\n+\t\t\t\t\tnb_rxd, 0, &rxconf,\n+\t\t\t\t\tevt_rsrc->pkt_pool[0][0]);\n+\t\t\telse\n+\t\t\t\tret = rte_eth_rx_queue_setup(port_id, eth_qid,\n+\t\t\t\t\tnb_rxd, 0, &rxconf,\n \t\t\t\t\tevt_rsrc->pkt_pool[port_id][0]);\n-\t\tif (ret < 0)\n-\t\t\trte_exit(EXIT_FAILURE,\n-\t\t\t\t \"rte_eth_rx_queue_setup: err=%d, \"\n-\t\t\t\t \"port=%d\\n\", ret, port_id);\n+\t\t\tif (ret < 0)\n+\t\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t\t \"rte_eth_rx_queue_setup: err=%d, \"\n+\t\t\t\t\t \"port=%d, eth_qid: %d\\n\",\n+\t\t\t\t\t ret, port_id, eth_qid);\n+\t\t}\n \n \t\t/* init one Tx queue per port */\n \t\ttxconf = dev_info.default_txconf;\ndiff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h\nindex 470aedc61..c79458eec 100644\n--- a/examples/l3fwd/l3fwd_event.h\n+++ b/examples/l3fwd/l3fwd_event.h\n@@ -21,10 +21,12 @@\n \n #define CMD_LINE_OPT_MODE \"mode\"\n #define CMD_LINE_OPT_EVENTQ_SYNC \"eventq-sched\"\n+#define CMD_LINE_OPT_EVENT_ETH_RX_QUEUES \"event-eth-rxqs\"\n \n enum {\n \tCMD_LINE_OPT_MODE_NUM = 265,\n \tCMD_LINE_OPT_EVENTQ_SYNC_NUM,\n+\tCMD_LINE_OPT_EVENT_ETH_RX_QUEUES_NUM,\n };\n \n typedef uint32_t (*event_device_setup_cb)(void);\n@@ -82,6 +84,7 @@ struct l3fwd_event_resources {\n \tuint8_t deq_depth;\n \tuint8_t has_burst;\n \tuint8_t enabled;\n+\tuint8_t eth_rx_queues;\n \tuint8_t nb_args;\n \tchar **args;\n };\n@@ -104,6 +107,7 @@ l3fwd_get_eventdev_rsrc(void)\n \n \t\tmemset(mz->addr, 0, sizeof(struct l3fwd_event_resources));\n \t\trsrc->sched_type = RTE_SCHED_TYPE_ATOMIC;\n+\t\trsrc->eth_rx_queues = 1;\n \n \t\treturn mz->addr;\n \t}\ndiff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex 68998f42c..b76942a9b 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -285,7 +285,8 @@ print_usage(const char *prgname)\n \t\t\" [--parse-ptype]\"\n \t\t\" [--per-port-pool]\"\n \t\t\" [--mode]\"\n-\t\t\" [--eventq-sched]\\n\\n\"\n+\t\t\" [--eventq-sched]\"\n+\t\t\" [--event-eth-rxqs]\\n\\n\"\n \n \t\t\"  -p PORTMASK: Hexadecimal bitmask of ports to configure\\n\"\n \t\t\"  -P : Enable promiscuous mode\\n\"\n@@ -306,7 +307,10 @@ print_usage(const char *prgname)\n \t\t\"  --eventq-sched: Event queue synchronization method \"\n \t\t\"                  ordered, atomic or parallel.\\n\\t\\t\"\n \t\t\"\t\t   Default: atomic\\n\\t\\t\"\n-\t\t\"                  Valid only if --mode=eventdev\\n\\n\",\n+\t\t\"                  Valid only if --mode=eventdev\\n\"\n+\t\t\"  --event-eth-rxqs: Number of ethernet RX queues per device.\\n\\t\\t\"\n+\t\t\"\t\t     Default: 1\\n\\t\\t\"\n+\t\t\"\t\t     Valid only if --mode=eventdev\\n\\n\",\n \t\tprgname);\n }\n \n",
    "prefixes": [
        "2/2",
        "v2"
    ]
}