get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 9043,
    "url": "http://patches.dpdk.org/api/patches/9043/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1448279148-14283-1-git-send-email-david.hunt@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": "<1448279148-14283-1-git-send-email-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1448279148-14283-1-git-send-email-david.hunt@intel.com",
    "date": "2015-11-23T11:45:48",
    "name": "[dpdk-dev] test: fix crash in pmd_perf_test",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d9840bb373cc3e1b7904be03373f2b79dd0b8efe",
    "submitter": {
        "id": 342,
        "url": "http://patches.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1448279148-14283-1-git-send-email-david.hunt@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/9043/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/9043/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0ABFB8E91;\n\tMon, 23 Nov 2015 12:46:20 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 5612C8E90\n\tfor <dev@dpdk.org>; Mon, 23 Nov 2015 12:46:18 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP; 23 Nov 2015 03:46:07 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga002.jf.intel.com with ESMTP; 23 Nov 2015 03:46:06 -0800",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ttANBk5uQ000890; Mon, 23 Nov 2015 11:46:05 GMT",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id tANBk5Z2014323;\n\tMon, 23 Nov 2015 11:46:05 GMT",
            "(from dhunt5@localhost)\n\tby sivswdev02.ir.intel.com with  id tANBk5cY014319;\n\tMon, 23 Nov 2015 11:46:05 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,336,1444719600\"; d=\"scan'208\";a=\"857528400\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 23 Nov 2015 11:45:48 +0000",
        "Message-Id": "<1448279148-14283-1-git-send-email-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Subject": "[dpdk-dev] [PATCH] test: fix crash in pmd_perf_test",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "Fix crash in pmd_perf_test autotest (div by 0) when no packets received\nAlso fixes the fact that the test passes even if exec_burst fails\n\nTo repeat the issue:\n  The system must be incorrectly set up so that all packets will be lost, \n  i.e. no loopback cable, etc. This is an edge case, but still the test\n  should not crash or pass when failing.\n  run the test app\n  RTE>> set_rxtx_sc poll_before_xmit\n  RTE>> pmd_perf_autotest \n  --snip--\n  > Generate 4096 packets @socket 1\n  > start to receive total expect 4096\n  > 4096 packets lost, IDLE 10000 times\n  > Floating point exception (core dumped)\n\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n app/test/test_pmd_perf.c | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c\nindex 8f55640..25b4d09 100644\n--- a/app/test/test_pmd_perf.c\n+++ b/app/test/test_pmd_perf.c\n@@ -626,7 +626,10 @@ timeout:\n \n \trte_free(pkts_burst);\n \n-\treturn diff_tsc / total;\n+\tif (total > 0)\n+\t\treturn diff_tsc / total;\n+\telse\n+\t\treturn -1;\n }\n \n static int\n@@ -673,8 +676,10 @@ exec_burst(uint32_t flags, int lcore)\n \n \t/* wait for polling finished */\n \tdiff_tsc = rte_eal_wait_lcore(lcore);\n-\tif (diff_tsc < 0)\n+\tif (diff_tsc < 0) {\n+\t\tprintf(\"exec_burst: Failed to measure cycles per packet\\n\");\n \t\treturn -1;\n+\t}\n \n \tprintf(\"Result: %d cycles per packet\\n\", diff_tsc);\n \n@@ -811,7 +816,8 @@ test_pmd_perf(void)\n \t\t\treturn -1;\n \t} else if (sc_flag == SC_BURST_POLL_FIRST ||\n \t\t   sc_flag == SC_BURST_XMIT_FIRST)\n-\t\texec_burst(sc_flag, slave_id);\n+\t\tif (exec_burst(sc_flag, slave_id) < 0)\n+\t\t\treturn -1;\n \n \t/* port tear down */\n \tfor (portid = 0; portid < nb_ports; portid++) {\n",
    "prefixes": [
        "dpdk-dev"
    ]
}