get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21008,
    "url": "https://patches.dpdk.org/api/patches/21008/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1488354455-142764-12-git-send-email-david.hunt@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": "<1488354455-142764-12-git-send-email-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1488354455-142764-12-git-send-email-david.hunt@intel.com",
    "date": "2017-03-01T07:47:28",
    "name": "[dpdk-dev,v8,11/18] test: add perf test for distributor burst mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "519bea0459de2ff9f9aa718438b0c2a8abe75933",
    "submitter": {
        "id": 342,
        "url": "https://patches.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1488354455-142764-12-git-send-email-david.hunt@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/21008/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/21008/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 15324F96C;\n\tWed,  1 Mar 2017 15:47:55 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 34BDA4CE4\n\tfor <dev@dpdk.org>; Wed,  1 Mar 2017 15:47:22 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Mar 2017 06:47:21 -0800",
            "from silpixa00397515.ir.intel.com (HELO\n\tsilpixa00397515.ger.corp.intel.com) ([10.237.223.14])\n\tby fmsmga001.fm.intel.com with ESMTP; 01 Mar 2017 06:47:20 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.35,226,1484035200\"; d=\"scan'208\";\n\ta=\"1117076577\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com,\n\tDavid Hunt <david.hunt@intel.com>",
        "Date": "Wed,  1 Mar 2017 07:47:28 +0000",
        "Message-Id": "<1488354455-142764-12-git-send-email-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1488354455-142764-1-git-send-email-david.hunt@intel.com>",
        "References": "<1487647073-129064-2-git-send-email-david.hunt@intel.com>\n\t<1488354455-142764-1-git-send-email-david.hunt@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 11/18] test: add perf test for distributor\n\tburst 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": "<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": "Signed-off-by: David Hunt <david.hunt@intel.com>\n---\n test/test/test_distributor_perf.c | 75 ++++++++++++++++++++++++++-------------\n 1 file changed, 51 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/test/test/test_distributor_perf.c b/test/test/test_distributor_perf.c\nindex 1dd326b..732d86d 100644\n--- a/test/test/test_distributor_perf.c\n+++ b/test/test/test_distributor_perf.c\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2017 Intel Corporation. All rights reserved.\n  *   All rights reserved.\n  *\n  *   Redistribution and use in source and binary forms, with or without\n@@ -41,8 +41,9 @@\n #include <rte_mbuf.h>\n #include <rte_distributor.h>\n \n-#define ITER_POWER 20 /* log 2 of how many iterations we do when timing. */\n-#define BURST 32\n+#define ITER_POWER_CL 25 /* log 2 of how many iterations  for Cache Line test */\n+#define ITER_POWER 21 /* log 2 of how many iterations we do when timing. */\n+#define BURST 64\n #define BIG_BATCH 1024\n \n /* static vars - zero initialized by default */\n@@ -54,7 +55,8 @@ struct worker_stats {\n } __rte_cache_aligned;\n struct worker_stats worker_stats[RTE_MAX_LCORE];\n \n-/* worker thread used for testing the time to do a round-trip of a cache\n+/*\n+ * worker thread used for testing the time to do a round-trip of a cache\n  * line between two cores and back again\n  */\n static void\n@@ -69,7 +71,8 @@ flip_bit(volatile uint64_t *arg)\n \t}\n }\n \n-/* test case to time the number of cycles to round-trip a cache line between\n+/*\n+ * test case to time the number of cycles to round-trip a cache line between\n  * two cores and back again.\n  */\n static void\n@@ -86,7 +89,7 @@ time_cache_line_switch(void)\n \t\trte_pause();\n \n \tconst uint64_t start_time = rte_rdtsc();\n-\tfor (i = 0; i < (1 << ITER_POWER); i++) {\n+\tfor (i = 0; i < (1 << ITER_POWER_CL); i++) {\n \t\twhile (*pdata)\n \t\t\trte_pause();\n \t\t*pdata = 1;\n@@ -98,13 +101,14 @@ time_cache_line_switch(void)\n \t*pdata = 2;\n \trte_eal_wait_lcore(slaveid);\n \tprintf(\"==== Cache line switch test ===\\n\");\n-\tprintf(\"Time for %u iterations = %\"PRIu64\" ticks\\n\", (1<<ITER_POWER),\n+\tprintf(\"Time for %u iterations = %\"PRIu64\" ticks\\n\", (1<<ITER_POWER_CL),\n \t\t\tend_time-start_time);\n \tprintf(\"Ticks per iteration = %\"PRIu64\"\\n\\n\",\n-\t\t\t(end_time-start_time) >> ITER_POWER);\n+\t\t\t(end_time-start_time) >> ITER_POWER_CL);\n }\n \n-/* returns the total count of the number of packets handled by the worker\n+/*\n+ * returns the total count of the number of packets handled by the worker\n  * functions given below.\n  */\n static unsigned\n@@ -123,7 +127,8 @@ clear_packet_count(void)\n \tmemset(&worker_stats, 0, sizeof(worker_stats));\n }\n \n-/* this is the basic worker function for performance tests.\n+/*\n+ * This is the basic worker function for performance tests.\n  * it does nothing but return packets and count them.\n  */\n static int\n@@ -151,14 +156,15 @@ handle_work(void *arg)\n \treturn 0;\n }\n \n-/* this basic performance test just repeatedly sends in 32 packets at a time\n+/*\n+ * This basic performance test just repeatedly sends in 32 packets at a time\n  * to the distributor and verifies at the end that we got them all in the worker\n  * threads and finally how long per packet the processing took.\n  */\n static inline int\n perf_test(struct rte_distributor *d, struct rte_mempool *p)\n {\n-\tunsigned i;\n+\tunsigned int i;\n \tuint64_t start, end;\n \tstruct rte_mbuf *bufs[BURST];\n \n@@ -181,7 +187,8 @@ perf_test(struct rte_distributor *d, struct rte_mempool *p)\n \t\trte_distributor_process(d, NULL, 0);\n \t} while (total_packet_count() < (BURST << ITER_POWER));\n \n-\tprintf(\"=== Performance test of distributor ===\\n\");\n+\trte_distributor_clear_returns(d);\n+\n \tprintf(\"Time per burst:  %\"PRIu64\"\\n\", (end - start) >> ITER_POWER);\n \tprintf(\"Time per packet: %\"PRIu64\"\\n\\n\",\n \t\t\t((end - start) >> ITER_POWER)/BURST);\n@@ -201,9 +208,10 @@ perf_test(struct rte_distributor *d, struct rte_mempool *p)\n static void\n quit_workers(struct rte_distributor *d, struct rte_mempool *p)\n {\n-\tconst unsigned num_workers = rte_lcore_count() - 1;\n-\tunsigned i;\n+\tconst unsigned int num_workers = rte_lcore_count() - 1;\n+\tunsigned int i;\n \tstruct rte_mbuf *bufs[RTE_MAX_LCORE];\n+\n \trte_mempool_get_bulk(p, (void *)bufs, num_workers);\n \n \tquit = 1;\n@@ -222,7 +230,8 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)\n static int\n test_distributor_perf(void)\n {\n-\tstatic struct rte_distributor *d;\n+\tstatic struct rte_distributor *ds;\n+\tstatic struct rte_distributor *db;\n \tstatic struct rte_mempool *p;\n \n \tif (rte_lcore_count() < 2) {\n@@ -233,17 +242,28 @@ test_distributor_perf(void)\n \t/* first time how long it takes to round-trip a cache line */\n \ttime_cache_line_switch();\n \n-\tif (d == NULL) {\n-\t\td = rte_distributor_create(\"Test_perf\", rte_socket_id(),\n+\tif (ds == NULL) {\n+\t\tds = rte_distributor_create(\"Test_perf\", rte_socket_id(),\n \t\t\t\trte_lcore_count() - 1,\n \t\t\t\tRTE_DIST_ALG_SINGLE);\n-\t\tif (d == NULL) {\n+\t\tif (ds == NULL) {\n \t\t\tprintf(\"Error creating distributor\\n\");\n \t\t\treturn -1;\n \t\t}\n \t} else {\n-\t\trte_distributor_flush(d);\n-\t\trte_distributor_clear_returns(d);\n+\t\trte_distributor_clear_returns(ds);\n+\t}\n+\n+\tif (db == NULL) {\n+\t\tdb = rte_distributor_create(\"Test_burst\", rte_socket_id(),\n+\t\t\t\trte_lcore_count() - 1,\n+\t\t\t\tRTE_DIST_ALG_BURST);\n+\t\tif (db == NULL) {\n+\t\t\tprintf(\"Error creating burst distributor\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t} else {\n+\t\trte_distributor_clear_returns(db);\n \t}\n \n \tconst unsigned nb_bufs = (511 * rte_lcore_count()) < BIG_BATCH ?\n@@ -257,10 +277,17 @@ test_distributor_perf(void)\n \t\t}\n \t}\n \n-\trte_eal_mp_remote_launch(handle_work, d, SKIP_MASTER);\n-\tif (perf_test(d, p) < 0)\n+\tprintf(\"=== Performance test of distributor (single mode) ===\\n\");\n+\trte_eal_mp_remote_launch(handle_work, ds, SKIP_MASTER);\n+\tif (perf_test(ds, p) < 0)\n+\t\treturn -1;\n+\tquit_workers(ds, p);\n+\n+\tprintf(\"=== Performance test of distributor (burst mode) ===\\n\");\n+\trte_eal_mp_remote_launch(handle_work, db, SKIP_MASTER);\n+\tif (perf_test(db, p) < 0)\n \t\treturn -1;\n-\tquit_workers(d, p);\n+\tquit_workers(db, p);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "v8",
        "11/18"
    ]
}