get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57033,
    "url": "http://patches.dpdk.org/api/patches/57033/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190724135515.15123-2-adamx.dybkowski@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": "<20190724135515.15123-2-adamx.dybkowski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190724135515.15123-2-adamx.dybkowski@intel.com",
    "date": "2019-07-24T13:55:15",
    "name": "[v7,1/1] app/test-compress-perf: provide more detailed report",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "19452aa577d5065a54cd3455ebfb0ec150625e68",
    "submitter": {
        "id": 1322,
        "url": "http://patches.dpdk.org/api/people/1322/?format=api",
        "name": "Dybkowski, AdamX",
        "email": "adamx.dybkowski@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190724135515.15123-2-adamx.dybkowski@intel.com/mbox/",
    "series": [
        {
            "id": 5709,
            "url": "http://patches.dpdk.org/api/series/5709/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5709",
            "date": "2019-07-24T13:55:14",
            "name": "add extra features to test-compress-perf",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/5709/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/57033/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/57033/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 4EC641C1FF;\n\tWed, 24 Jul 2019 16:13:36 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 97B3C1C1D5\n\tfor <dev@dpdk.org>; Wed, 24 Jul 2019 16:13:27 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Jul 2019 07:13:27 -0700",
            "from adamdybx-mobl.ger.corp.intel.com (HELO localhost.localdomain)\n\t([10.104.14.184])\n\tby fmsmga001.fm.intel.com with ESMTP; 24 Jul 2019 07:13:26 -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,303,1559545200\"; d=\"scan'208\";a=\"189104844\"",
        "From": "Adam Dybkowski <adamx.dybkowski@intel.com>",
        "To": "dev@dpdk.org,\n\tfiona.trahe@intel.com",
        "Cc": "Artur Trybula <arturx.trybula@intel.com>,\n\tAdam Dybkowski <adamx.dybkowski@intel.com>",
        "Date": "Wed, 24 Jul 2019 15:55:15 +0200",
        "Message-Id": "<20190724135515.15123-2-adamx.dybkowski@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190724135515.15123-1-adamx.dybkowski@intel.com>",
        "References": "<20190724125323.15654-2-adamx.dybkowski@intel.com>\n\t<20190724135515.15123-1-adamx.dybkowski@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 1/1] app/test-compress-perf: provide more\n\tdetailed report",
        "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: Artur Trybula <arturx.trybula@intel.com>\n\nThis patch adds extra features to the compress performance\ntest. Some important parameters (memory allocation,\nnumber of ops, number of segments) are calculated and\nprinted out.\nInformation about threads, cores, devices and queue-pairs\nis also printed.\n\nSigned-off-by: Artur Trybula <arturx.trybula@intel.com>\nSigned-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>\n---\n .../comp_perf_test_benchmark.c                | 21 ++++-\n .../comp_perf_test_common.c                   | 94 ++++++++++++++++++-\n .../comp_perf_test_common.h                   |  6 ++\n app/test-compress-perf/main.c                 |  4 +-\n 4 files changed, 120 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test-compress-perf/comp_perf_test_benchmark.c b/app/test-compress-perf/comp_perf_test_benchmark.c\nindex aa1f8eea2..887459449 100644\n--- a/app/test-compress-perf/comp_perf_test_benchmark.c\n+++ b/app/test-compress-perf/comp_perf_test_benchmark.c\n@@ -329,9 +329,26 @@ cperf_benchmark_test_runner(void *test_ctx)\n \tstruct comp_test_data *test_data = ctx->ver.options;\n \tuint32_t lcore = rte_lcore_id();\n \tstatic rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);\n+\tint i, ret = EXIT_SUCCESS;\n \n \tctx->ver.mem.lcore_id = lcore;\n-\tint i, ret = EXIT_SUCCESS;\n+\n+\t/*\n+\t * printing information about current compression thread\n+\t */\n+\tif (rte_atomic16_test_and_set(&ctx->ver.mem.print_info_once))\n+\t\tprintf(\"    lcore: %u,\"\n+\t\t\t\t\" driver name: %s,\"\n+\t\t\t\t\" device name: %s,\"\n+\t\t\t\t\" device id: %u,\"\n+\t\t\t\t\" socket id: %u,\"\n+\t\t\t\t\" queue pair id: %u\\n\",\n+\t\t\tlcore,\n+\t\t\tctx->ver.options->driver_name,\n+\t\t\trte_compressdev_name_get(ctx->ver.mem.dev_id),\n+\t\t\tctx->ver.mem.dev_id,\n+\t\t\trte_compressdev_socket_id(ctx->ver.mem.dev_id),\n+\t\t\tctx->ver.mem.qp_id);\n \n \t/*\n \t * First the verification part is needed\n@@ -374,7 +391,7 @@ cperf_benchmark_test_runner(void *test_ctx)\n \t\t\t1000000000;\n \n \tif (rte_atomic16_test_and_set(&display_once)) {\n-\t\tprintf(\"%12s%6s%12s%17s%15s%16s\\n\",\n+\t\tprintf(\"\\n%12s%6s%12s%17s%15s%16s\\n\",\n \t\t\t\"lcore id\", \"Level\", \"Comp size\", \"Comp ratio [%]\",\n \t\t\t\"Comp [Gbps]\", \"Decomp [Gbps]\");\n \t}\ndiff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c\nindex 472c76686..28be9f257 100644\n--- a/app/test-compress-perf/comp_perf_test_common.c\n+++ b/app/test-compress-perf/comp_perf_test_common.c\n@@ -16,6 +16,18 @@\n \n #define DIV_CEIL(a, b)  ((a) / (b) + ((a) % (b) != 0))\n \n+struct cperf_buffer_info {\n+\tuint16_t total_segments;\n+\tuint16_t segment_sz;\n+\tuint16_t last_segment_sz;\n+\tuint32_t total_buffs;\t      /*number of buffers = number of ops*/\n+\tuint16_t segments_per_buff;\n+\tuint16_t segments_per_last_buff;\n+\tsize_t input_data_sz;\n+};\n+\n+static struct cperf_buffer_info buffer_info;\n+\n int\n param_range_check(uint16_t size, const struct rte_param_log2_range *range)\n {\n@@ -170,6 +182,13 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,\n \t\t\t\t\" could not be allocated\\n\");\n \t\treturn -1;\n \t}\n+\n+\tbuffer_info.total_segments = total_segs;\n+\tbuffer_info.segment_sz = test_data->seg_sz;\n+\tbuffer_info.total_buffs = mem->total_bufs;\n+\tbuffer_info.segments_per_buff = test_data->max_sgl_segs;\n+\tbuffer_info.input_data_sz = test_data->input_data_sz;\n+\n \treturn 0;\n }\n \n@@ -178,9 +197,10 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)\n {\n \tuint32_t remaining_data = test_data->input_data_sz;\n \tuint8_t *input_data_ptr = test_data->input_data;\n-\tsize_t data_sz;\n+\tsize_t data_sz = 0;\n \tuint8_t *data_addr;\n \tuint32_t i, j;\n+\tuint16_t segs_per_mbuf = 0;\n \n \tfor (i = 0; i < mem->total_bufs; i++) {\n \t\t/* Allocate data in input mbuf and copy data from input file */\n@@ -204,7 +224,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)\n \t\tremaining_data -= data_sz;\n \n \t\t/* Already one segment in the mbuf */\n-\t\tuint16_t segs_per_mbuf = 1;\n+\t\tsegs_per_mbuf = 1;\n \n \t\t/* Chain mbufs if needed for input mbufs */\n \t\twhile (segs_per_mbuf < test_data->max_sgl_segs\n@@ -281,5 +301,75 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)\n \t\t}\n \t}\n \n+\tbuffer_info.segments_per_last_buff = segs_per_mbuf;\n+\tbuffer_info.last_segment_sz = data_sz;\n+\n \treturn 0;\n }\n+\n+void\n+print_test_dynamics(void)\n+{\n+\tuint32_t opt_total_segs = DIV_CEIL(buffer_info.input_data_sz,\n+\t\t\tMAX_SEG_SIZE);\n+\n+\tif (buffer_info.total_buffs > 1) {\n+\t\tprintf(\"\\nWarning: for the current input parameters, number\"\n+\t\t\t\t\" of ops is higher than one, which may result\"\n+\t\t\t\t\" in sub-optimal performance.\\n\");\n+\t\tprintf(\"To improve the performance (for the current\"\n+\t\t\t\t\" input data) following parameters are\"\n+\t\t\t\t\" suggested:\\n\");\n+\t\tprintf(\"\t* Segment size: %d\\n\", MAX_SEG_SIZE);\n+\t\tprintf(\"\t* Number of segments: %u\\n\", opt_total_segs);\n+\t} else if (buffer_info.total_buffs == 1) {\n+\t\tprintf(\"\\nInfo: there is only one op with %u segments -\"\n+\t\t\t\t\" the compression ratio is the best.\\n\",\n+\t\t\tbuffer_info.segments_per_last_buff);\n+\t\tif (buffer_info.segment_sz < MAX_SEG_SIZE)\n+\t\t\tprintf(\"To reduce compression time, please use\"\n+\t\t\t\t\t\" bigger segment size: %d.\\n\",\n+\t\t\t\tMAX_SEG_SIZE);\n+\t\telse if (buffer_info.segment_sz == MAX_SEG_SIZE)\n+\t\t\tprintf(\"Segment size is optimal for the best\"\n+\t\t\t\t\t\" performance.\\n\");\n+\t} else\n+\t\tprintf(\"Warning: something wrong happened!!\\n\");\n+\n+\tprintf(\"\\nFor the current input parameters (segment size = %u,\"\n+\t\t\t\" maximum segments per SGL = %u):\\n\",\n+\t\tbuffer_info.segment_sz,\n+\t\tbuffer_info.segments_per_buff);\n+\tprintf(\"\t* Total number of buffers: %d\\n\",\n+\t\tbuffer_info.total_segments);\n+\tprintf(\"\t* %u buffer(s) %u bytes long, last buffer %u\"\n+\t\t\t\" byte(s) long\\n\",\n+\t\tbuffer_info.total_segments - 1,\n+\t\tbuffer_info.segment_sz,\n+\t\tbuffer_info.last_segment_sz);\n+\tprintf(\"\t* Number of ops: %u\\n\", buffer_info.total_buffs);\n+\tprintf(\"\t* Total memory allocation: %u\\n\",\n+\t\t(buffer_info.total_segments - 1) * buffer_info.segment_sz\n+\t\t+ buffer_info.last_segment_sz);\n+\tif (buffer_info.total_buffs > 1)\n+\t\tprintf(\"\t* %u ops: %u segment(s) in each,\"\n+\t\t\t\t\" segment size %u\\n\",\n+\t\t\tbuffer_info.total_buffs - 1,\n+\t\t\tbuffer_info.segments_per_buff,\n+\t\t\tbuffer_info.segment_sz);\n+\tif (buffer_info.segments_per_last_buff > 1) {\n+\t\tprintf(\"\t* 1 op %u segments:\\n\",\n+\t\t\t\tbuffer_info.segments_per_last_buff);\n+\t\tprintf(\"\t\to %u segment size %u\\n\",\n+\t\t\tbuffer_info.segments_per_last_buff - 1,\n+\t\t\tbuffer_info.segment_sz);\n+\t\tprintf(\"\t\to last segment size %u\\n\",\n+\t\t\tbuffer_info.last_segment_sz);\n+\t} else if (buffer_info.segments_per_last_buff == 1) {\n+\t\tprintf(\"\t* 1 op (the last one): %u segment %u\"\n+\t\t\t\t\" byte(s) long\\n\\n\",\n+\t\t\tbuffer_info.segments_per_last_buff,\n+\t\t\tbuffer_info.last_segment_sz);\n+\t}\n+\tprintf(\"\\n\");\n+}\ndiff --git a/app/test-compress-perf/comp_perf_test_common.h b/app/test-compress-perf/comp_perf_test_common.h\nindex 9c11e3a00..c9e0c9081 100644\n--- a/app/test-compress-perf/comp_perf_test_common.h\n+++ b/app/test-compress-perf/comp_perf_test_common.h\n@@ -13,6 +13,9 @@ struct cperf_mem_resources {\n \tuint8_t dev_id;\n \tuint16_t qp_id;\n \tuint8_t lcore_id;\n+\n+\trte_atomic16_t print_info_once;\n+\n \tuint32_t total_bufs;\n \tuint8_t *compressed_data;\n \tuint8_t *decompressed_data;\n@@ -38,4 +41,7 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,\n int\n prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem);\n \n+void\n+print_test_dynamics(void);\n+\n #endif /* _COMP_PERF_TEST_COMMON_H_ */\ndiff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c\nindex e746e4708..e7ac412e6 100644\n--- a/app/test-compress-perf/main.c\n+++ b/app/test-compress-perf/main.c\n@@ -363,7 +363,7 @@ main(int argc, char **argv)\n \n \tprintf(\"App uses socket: %u\\n\", rte_socket_id());\n \tprintf(\"Burst size = %u\\n\", test_data->burst_sz);\n-\tprintf(\"File size = %zu\\n\", test_data->input_data_sz);\n+\tprintf(\"Input data size = %zu\\n\", test_data->input_data_sz);\n \n \ttest_data->cleanup = ST_DURING_TEST;\n \ttotal_nb_qps = nb_compressdevs * test_data->nb_qps;\n@@ -390,6 +390,8 @@ main(int argc, char **argv)\n \t\ti++;\n \t}\n \n+\tprint_test_dynamics(); /* constructors must be executed first */\n+\n \twhile (test_data->level <= test_data->level_lst.max) {\n \n \t\ti = 0;\n",
    "prefixes": [
        "v7",
        "1/1"
    ]
}