get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57705,
    "url": "https://patches.dpdk.org/api/patches/57705/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1565772870-24903-1-git-send-email-feifei.wang@arm.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": "<1565772870-24903-1-git-send-email-feifei.wang@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1565772870-24903-1-git-send-email-feifei.wang@arm.com",
    "date": "2019-08-14T08:54:30",
    "name": "examples/l3fwd: prefetch the content of the next packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5556f6226d22406002c6b4da9481167db80d5724",
    "submitter": {
        "id": 1391,
        "url": "https://patches.dpdk.org/api/people/1391/?format=api",
        "name": "Feifei Wang",
        "email": "feifei.wang@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1565772870-24903-1-git-send-email-feifei.wang@arm.com/mbox/",
    "series": [
        {
            "id": 6056,
            "url": "https://patches.dpdk.org/api/series/6056/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6056",
            "date": "2019-08-14T08:54:30",
            "name": "examples/l3fwd: prefetch the content of the next packet",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/6056/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/57705/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/57705/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 EF9C31BEA7;\n\tFri, 16 Aug 2019 00:11:04 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n\tby dpdk.org (Postfix) with ESMTP id 5F1BF1BDAC\n\tfor <dev@dpdk.org>; Wed, 14 Aug 2019 10:54:58 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D52FB344;\n\tWed, 14 Aug 2019 01:54:57 -0700 (PDT)",
            "from net-arm-c2400.shanghai.arm.com (net-arm-c2400.shanghai.arm.com\n\t[10.169.40.36])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t4BD023F694; Wed, 14 Aug 2019 01:54:56 -0700 (PDT)"
        ],
        "From": "Feifei Wang <feifei.wang@arm.com>",
        "To": "dev@dpdk.org",
        "Cc": "gavin.hu@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com,\n\tHonnappa.Nagarahalli@arm.com, nd@arm.com",
        "Date": "Wed, 14 Aug 2019 16:54:30 +0800",
        "Message-Id": "<1565772870-24903-1-git-send-email-feifei.wang@arm.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "X-Mailman-Approved-At": "Fri, 16 Aug 2019 00:11:03 +0200",
        "Subject": "[dpdk-dev] [PATCH] examples/l3fwd: prefetch the content of the next\n\tpacket",
        "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": "The cache-misses problem is very serious when the function\nlpm_cb_parse_ptype is called to read the content of packets. That is\nbecause the contents of packages previously stored in the cache are\noverwritten by the following instructions or variables.\nThus the prefetch order can be used to prefetch the next packet into\nthe cache to avoid CPU spending too much time on it.\n\nOn Octeon TX platform with built-in NIC, 12% performance gain was\nmeasured by running RFC2544 NDR test with l3fwd. Furthermore, the\ncache-misses event of the function lpm_cb_parse_ptype was reduced by\n20%, and the CPU task-clock of it dropped from 16.49% to 11.3%, based\non the forwarding test for one minute with the 64B packet.\nOn the dpaa2 platform, no performance improvement nor drop were seen\nwith this patch by running RFC2544 NDR test with l3fwd.\nOn the x86 platform, 15.7% performance gain was measured by running\nRFC2544 NDR test with l3fwd.\n\nSigned-off-by: Feifei Wang <feifei.wang@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Phil Yang <phil.yang@arm.com>\n---\n examples/l3fwd/l3fwd_lpm.c | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c\nindex 4143683..a3a65f7 100644\n--- a/examples/l3fwd/l3fwd_lpm.c\n+++ b/examples/l3fwd/l3fwd_lpm.c\n@@ -400,10 +400,17 @@ lpm_cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,\n \t\t   uint16_t max_pkts __rte_unused,\n \t\t   void *user_param __rte_unused)\n {\n-\tunsigned i;\n-\n-\tfor (i = 0; i < nb_pkts; ++i)\n+\tunsigned int i;\n+\n+\tif (unlikely(nb_pkts == 0))\n+\t\treturn nb_pkts;\n+\trte_prefetch0(rte_pktmbuf_mtod(pkts[0], struct ether_hdr *));\n+\tfor (i = 0; i < (unsigned int) (nb_pkts - 1); ++i) {\n+\t\trte_prefetch0(rte_pktmbuf_mtod(pkts[i+1],\n+\t\t\tstruct ether_hdr *));\n \t\tlpm_parse_ptype(pkts[i]);\n+\t}\n+\tlpm_parse_ptype(pkts[i]);\n \n \treturn nb_pkts;\n }\n",
    "prefixes": []
}