Show a patch.

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

{
    "id": 338,
    "url": "https://patches.dpdk.org/api/patches/338/",
    "web_url": "https://patches.dpdk.org/patch/338/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<7F861DC0615E0C47A872E6F3C5FCDDBD011A997D@BPXM14GP.gisp.nec.co.jp>",
    "date": "2014-09-11T07:50:52",
    "name": "[dpdk-dev,memnic,5/7] pmd: packet receiving optimization with prefetch",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "957f6b0d50e5326d218218ad45b47cafe32006cf",
    "submitter": {
        "id": 38,
        "url": "https://patches.dpdk.org/api/people/38/",
        "name": "Hiroshi Shimamoto",
        "email": "h-shimamoto@ct.jp.nec.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/338/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/338/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/338/checks/",
    "tags": {},
    "headers": {
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Thread-Index": "Ac/NlNdJ9sUcXVTvQa2evqSexnR1cA==",
        "Cc": "Hayato Momma <h-momma@ce.jp.nec.com>",
        "X-MS-Has-Attach": "",
        "X-Original-To": "patchwork@dpdk.org",
        "Date": "Thu, 11 Sep 2014 07:50:52 +0000",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-ID": "<7F861DC0615E0C47A872E6F3C5FCDDBD011A997D@BPXM14GP.gisp.nec.co.jp>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Accept-Language": "ja-JP, en-US",
        "X-MS-TNEF-Correlator": "",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "x-originating-ip": "[10.205.5.123]",
        "Errors-To": "dev-bounces@dpdk.org",
        "MIME-Version": "1.0",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 063D35909;\n\tThu, 11 Sep 2014 09:54:14 +0200 (CEST)",
            "from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52])\n\tby dpdk.org (Postfix) with ESMTP id D38465901\n\tfor <dev@dpdk.org>; Thu, 11 Sep 2014 09:54:12 +0200 (CEST)",
            "from mailgate3.nec.co.jp ([10.7.69.160])\n\tby tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id s8B7xOZ3014388\n\tfor <dev@dpdk.org>; Thu, 11 Sep 2014 16:59:24 +0900 (JST)",
            "from mailsv.nec.co.jp (imss62.nec.co.jp [10.7.69.157]) by\n\tmailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP\n\tid s8B7xN208085 for <dev@dpdk.org>;\n\tThu, 11 Sep 2014 16:59:23 +0900 (JST)",
            "from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7])\n\tby mailsv.nec.co.jp (8.13.8/8.13.4) with ESMTP id s8B7xNoJ022521\n\tfor <dev@dpdk.org>; Thu, 11 Sep 2014 16:59:23 +0900 (JST)",
            "from bpxc99gp.gisp.nec.co.jp ([10.38.151.144] [10.38.151.144]) by\n\tmail02.kamome.nec.co.jp with ESMTP id BT-MMP-1858451;\n\tThu, 11 Sep 2014 16:50:54 +0900",
            "from BPXM14GP.gisp.nec.co.jp ([169.254.1.238]) by\n\tBPXC16GP.gisp.nec.co.jp ([10.38.151.144]) with mapi id 14.02.0328.011;\n\tThu, 11 Sep 2014 16:50:53 +0900"
        ],
        "From": "Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>",
        "Precedence": "list",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Content-Transfer-Encoding": "quoted-printable",
        "Subject": "[dpdk-dev] [memnic PATCH 5/7] pmd: packet receiving optimization\n\twith prefetch",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "To": "\"dev@dpdk.org\" <dev@dpdk.org>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "Content-Language": "ja-JP",
        "Content-Type": "text/plain; charset=\"iso-2022-jp\"",
        "Delivered-To": "patchwork@dpdk.org",
        "Thread-Topic": "[memnic PATCH 5/7] pmd: packet receiving optimization with\n\tprefetch",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>\n\nPrefetch the next packet area to reduce memory stall cycles.\n\nPrefetching the next packet area could hide memory stall, because the next\narea will be accessed just after processing the current receive operations.\n\nWe can see performance improvements with memnic-tester.\nUsing Xeon E5-2697 v2 @ 2.70GHz, 4 vCPU.\n size |  before  |  after\n   64 | 4.59Mpps | 5.54Mpps\n  128 | 4.87Mpps | 5.46Mpps\n  256 | 4.72Mpps | 5.21Mpps\n  512 | 4.41Mpps | 4.50Mpps\n 1024 | 3.64Mpps | 3.71Mpps\n 1280 | 3.15Mpps | 3.21Mpps\n 1518 | 2.87Mpps | 2.92Mpps\n\nSigned-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>\nReviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>\n---\n pmd/pmd_memnic.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/pmd/pmd_memnic.c b/pmd/pmd_memnic.c\nindex c22a14d..dbe5033 100644\n--- a/pmd/pmd_memnic.c\n+++ b/pmd/pmd_memnic.c\n@@ -286,7 +286,7 @@ static uint16_t memnic_recv_pkts(void *rx_queue,\n \tuint16_t nr;\n \tuint64_t pkts, bytes, errs;\n \tuint32_t framesz = adapter->framesz;\n-\tint idx;\n+\tint idx, next;\n \tstruct rte_eth_stats *st = &adapter->stats[rte_lcore_id()];\n \n \tif (!adapter->nic->hdr.valid)\n@@ -298,6 +298,11 @@ static uint16_t memnic_recv_pkts(void *rx_queue,\n \t\tp = &data->packets[idx];\n \t\tif (p->status != MEMNIC_PKT_ST_FILLED)\n \t\t\tbreak;\n+\t\t/* prefetch the next area */\n+\t\tnext = idx;\n+\t\tif (++next >= MEMNIC_NR_PACKET)\n+\t\t\tnext = 0;\n+\t\trte_prefetch0(&data->packets[next]);\n \t\tif (p->len > framesz) {\n \t\t\terrs++;\n \t\t\tgoto drop;\n@@ -318,9 +323,7 @@ static uint16_t memnic_recv_pkts(void *rx_queue,\n drop:\n \t\trte_compiler_barrier();\n \t\tp->status = MEMNIC_PKT_ST_FREE;\n-\n-\t\tif (++idx >= MEMNIC_NR_PACKET)\n-\t\t\tidx = 0;\n+\t\tidx = next;\n \t}\n \tadapter->up_idx = idx;\n \n",
    "prefixes": [
        "dpdk-dev",
        "memnic",
        "5/7"
    ]
}