get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59430,
    "url": "https://patches.dpdk.org/api/patches/59430/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190919093850.460-5-marcinx.baran@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": "<20190919093850.460-5-marcinx.baran@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190919093850.460-5-marcinx.baran@intel.com",
    "date": "2019-09-19T09:38:48",
    "name": "[v4,4/6] examples/ioat: add two threads configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ef5befd35e10b2b7ff15ff027388701e42c6cc4",
    "submitter": {
        "id": 1430,
        "url": "https://patches.dpdk.org/api/people/1430/?format=api",
        "name": "Marcin Baran",
        "email": "marcinx.baran@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190919093850.460-5-marcinx.baran@intel.com/mbox/",
    "series": [
        {
            "id": 6447,
            "url": "https://patches.dpdk.org/api/series/6447/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6447",
            "date": "2019-09-19T09:38:44",
            "name": "examples/ioat: sample app on ioat driver usage",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/6447/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/59430/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/59430/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 A543B1EDA6;\n\tThu, 19 Sep 2019 11:39:28 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 7CDE61ED98\n\tfor <dev@dpdk.org>; Thu, 19 Sep 2019 11:39:22 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Sep 2019 02:39:22 -0700",
            "from baranmx-mobl.ger.corp.intel.com ([10.103.104.83])\n\tby orsmga002.jf.intel.com with ESMTP; 19 Sep 2019 02:39:20 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,523,1559545200\"; d=\"scan'208\";a=\"199341473\"",
        "From": "Marcin Baran <marcinx.baran@intel.com>",
        "To": "dev@dpdk.org,\n\tbruce.richardson@intel.com",
        "Cc": "Pawel Modrak <pawelx.modrak@intel.com>,\n\tMarcin Baran <marcinx.baran@intel.com>",
        "Date": "Thu, 19 Sep 2019 11:38:48 +0200",
        "Message-Id": "<20190919093850.460-5-marcinx.baran@intel.com>",
        "X-Mailer": "git-send-email 2.22.0.windows.1",
        "In-Reply-To": "<20190919093850.460-1-marcinx.baran@intel.com>",
        "References": "<20190918091139.1430-1-marcinx.baran@intel.com>\n\t<20190919093850.460-1-marcinx.baran@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 4/6] examples/ioat: add two threads\n\tconfiguration",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Pawel Modrak <pawelx.modrak@intel.com>\n\nAdded possibility to use two lcores: first for\npacket receiving and copying, second for packets\nsending.\n\nSigned-off-by: Pawel Modrak <pawelx.modrak@intel.com>\nSigned-off-by: Marcin Baran <marcinx.baran@intel.com>\n---\n examples/ioat/ioatfwd.c | 92 ++++++++++++++++++++++++++++++-----------\n 1 file changed, 67 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c\nindex c66ce7e49..4c51db6bd 100644\n--- a/examples/ioat/ioatfwd.c\n+++ b/examples/ioat/ioatfwd.c\n@@ -161,7 +161,6 @@ ioat_enqueue_packets(struct rte_mbuf **pkts,\n \trte_mempool_put_bulk(ioat_pktmbuf_pool, (void *)&pkts_copy[i],\n \t\tnb_rx - i);\n \n-\n \treturn ret;\n }\n \n@@ -226,8 +225,8 @@ ioat_tx_port(struct rxtx_port_config *tx_config)\n \tstruct rte_mbuf *mbufs_dst[MAX_PKT_BURST];\n \n \tif (copy_mode == COPY_MODE_IOAT_NUM) {\n-\t\t/* Deque the mbufs from IOAT device. */\n \t\tfor (i = 0; i < tx_config->nb_queues; i++) {\n+\t\t\t/* Deque the mbufs from IOAT device. */\n \t\t\tnb_dq = rte_ioat_completed_copies(\n \t\t\t\ttx_config->ioat_ids[i], MAX_PKT_BURST,\n \t\t\t\t(void *)mbufs_src, (void *)mbufs_dst);\n@@ -256,31 +255,64 @@ ioat_tx_port(struct rxtx_port_config *tx_config)\n \t\t\t\t\tnb_dq - nb_tx);\n \t\t}\n \t} else {\n-\t\t/* Deque the mbufs from rx_to_tx_ring. */\n-\t\tnb_dq = rte_ring_dequeue_burst(tx_config->rx_to_tx_ring,\n-\t\t\t(void *)mbufs_dst, MAX_PKT_BURST, NULL);\n-\n-\t\tif (nb_dq == 0)\n-\t\t\treturn;\n-\n-\t\t/* Update macs if enabled */\n-\t\tif (mac_updating) {\n-\t\t\tfor (i = 0; i < nb_dq; i++)\n-\t\t\t\tupdate_mac_addrs(mbufs_dst[i],\n-\t\t\t\t\ttx_config->rxtx_port);\n-\t\t}\n+\t\tfor (i = 0; i < tx_config->nb_queues; i++) {\n+\t\t\t/* Deque the mbufs from IOAT device. */\n+\t\t\tnb_dq = rte_ring_dequeue_burst(tx_config->rx_to_tx_ring,\n+\t\t\t\t(void *)mbufs_dst, MAX_PKT_BURST, NULL);\n \n-\t\tconst uint16_t nb_tx = rte_eth_tx_burst(tx_config->rxtx_port,\n-\t\t\t0, (void *)mbufs_dst, nb_dq);\n+\t\t\tif (nb_dq == 0)\n+\t\t\t\treturn;\n \n-\t\t/* Free any unsent packets. */\n-\t\tif (unlikely(nb_tx < nb_dq))\n-\t\t\trte_mempool_put_bulk(ioat_pktmbuf_pool,\n-\t\t\t(void *)&mbufs_dst[nb_tx],\n-\t\t\t\tnb_dq - nb_tx);\n+\t\t\t/* Update macs if enabled */\n+\t\t\tif (mac_updating) {\n+\t\t\t\tfor (j = 0; j < nb_dq; j++)\n+\t\t\t\t\tupdate_mac_addrs(mbufs_dst[j],\n+\t\t\t\t\t\ttx_config->rxtx_port);\n+\t\t\t}\n+\n+\t\t\tconst uint16_t nb_tx =\n+\t\t\t\trte_eth_tx_burst(tx_config->rxtx_port, 0,\n+\t\t\t\t\t(void *)mbufs_dst, nb_dq);\n+\n+\t\t\t/* Free any unsent packets. */\n+\t\t\tif (unlikely(nb_tx < nb_dq))\n+\t\t\t\trte_mempool_put_bulk(ioat_pktmbuf_pool,\n+\t\t\t\t(void *)&mbufs_dst[nb_tx],\n+\t\t\t\t\tnb_dq - nb_tx);\n+\t\t}\n \t}\n }\n \n+/* Main rx processing loop for IOAT rawdev. */\n+static void\n+rx_main_loop(void)\n+{\n+\tuint16_t i;\n+\tuint16_t nb_ports = cfg.nb_ports;\n+\n+\tRTE_LOG(INFO, IOAT, \"Entering main rx loop for copy on lcore %u\\n\",\n+\t\trte_lcore_id());\n+\n+\twhile (!force_quit)\n+\t\tfor (i = 0; i < nb_ports; i++)\n+\t\t\tioat_rx_port(&cfg.ports[i]);\n+}\n+\n+/* Main tx processing loop for hardware copy. */\n+static void\n+tx_main_loop(void)\n+{\n+\tuint16_t i;\n+\tuint16_t nb_ports = cfg.nb_ports;\n+\n+\tRTE_LOG(INFO, IOAT, \"Entering main tx loop for copy on lcore %u\\n\",\n+\t\trte_lcore_id());\n+\n+\twhile (!force_quit)\n+\t\tfor (i = 0; i < nb_ports; i++)\n+\t\t\tioat_tx_port(&cfg.ports[i]);\n+}\n+\n /* Main rx and tx loop if only one slave lcore available */\n static void\n rxtx_main_loop(void)\n@@ -305,9 +337,19 @@ static void start_forwarding_cores(void)\n \tRTE_LOG(INFO, IOAT, \"Entering %s on lcore %u\\n\",\n \t\t__func__, rte_lcore_id());\n \n-\tlcore_id = rte_get_next_lcore(lcore_id, true, true);\n-\trte_eal_remote_launch((lcore_function_t *)rxtx_main_loop,\n-\t\tNULL, lcore_id);\n+\tif (cfg.nb_lcores == 1) {\n+\t\tlcore_id = rte_get_next_lcore(lcore_id, true, true);\n+\t\trte_eal_remote_launch((lcore_function_t *)rxtx_main_loop,\n+\t\t\tNULL, lcore_id);\n+\t} else if (cfg.nb_lcores > 1) {\n+\t\tlcore_id = rte_get_next_lcore(lcore_id, true, true);\n+\t\trte_eal_remote_launch((lcore_function_t *)rx_main_loop,\n+\t\t\tNULL, lcore_id);\n+\n+\t\tlcore_id = rte_get_next_lcore(lcore_id, true, true);\n+\t\trte_eal_remote_launch((lcore_function_t *)tx_main_loop, NULL,\n+\t\t\tlcore_id);\n+\t}\n }\n \n /* Display usage */\n",
    "prefixes": [
        "v4",
        "4/6"
    ]
}