get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54575,
    "url": "http://patches.dpdk.org/api/patches/54575/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1560032553-15528-7-git-send-email-tjozwiakgm@gmail.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": "<1560032553-15528-7-git-send-email-tjozwiakgm@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1560032553-15528-7-git-send-email-tjozwiakgm@gmail.com",
    "date": "2019-06-08T22:22:32",
    "name": "[v2,6/7] app/test-compress-perf: add force process termination",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "23032e8c6983d34f6ce0054b6bb6055c39fb9130",
    "submitter": {
        "id": 1263,
        "url": "http://patches.dpdk.org/api/people/1263/?format=api",
        "name": "Tomasz Jóźwiak",
        "email": "tjozwiakgm@gmail.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/1560032553-15528-7-git-send-email-tjozwiakgm@gmail.com/mbox/",
    "series": [
        {
            "id": 4958,
            "url": "http://patches.dpdk.org/api/series/4958/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4958",
            "date": "2019-06-08T22:22:26",
            "name": "add multiple cores feature to test-compress-perf",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4958/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54575/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/54575/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 AB24F1BD78;\n\tSun,  9 Jun 2019 00:22:57 +0200 (CEST)",
            "from mail-lf1-f66.google.com (mail-lf1-f66.google.com\n\t[209.85.167.66]) by dpdk.org (Postfix) with ESMTP id D68F41BD27\n\tfor <dev@dpdk.org>; Sun,  9 Jun 2019 00:22:49 +0200 (CEST)",
            "by mail-lf1-f66.google.com with SMTP id 136so4114484lfa.8\n\tfor <dev@dpdk.org>; Sat, 08 Jun 2019 15:22:49 -0700 (PDT)",
            "from tj-idea-500s.lan (user-5-173-144-53.play-internet.pl.\n\t[5.173.144.53]) by smtp.gmail.com with ESMTPSA id\n\tw28sm1060597ljd.12.2019.06.08.15.22.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSat, 08 Jun 2019 15:22:48 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=Z0O2VKZma8y0COQpod10IIkJNUPgEfCBXA22Izo8oOY=;\n\tb=N2GPo3zl9OEJHDgjm1u0UifVLp8DDer4UtFHnslb3cTXr8jpWaoAvkh1SYW1smqByN\n\tUGfOTuzd1xvYnbc31VYKlHNV7j9w85EIQ9nuIbNFsYz8/HFf2w8wiZsI1caefi2fOt1m\n\tH9iY4u9RWgN473GI3TnSFLPlGZ191WtvHcQBVvkEFOgyqZ8lNvQyT4pGTn4b1pVS2xmZ\n\tNjKUOCohedyk+QveWePjJAK5Ps+m6M63AYKcP8nxJIWAr6SUkCSqf32797f53uBSMF5r\n\tO6Bh/7xFZb3/Zddwm9WBkuowSqkg0Pp0E7uR7VppmZPT5rKHeWl8sMy22rJ3Uit4asMP\n\tSh9Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=Z0O2VKZma8y0COQpod10IIkJNUPgEfCBXA22Izo8oOY=;\n\tb=V7Y2TwYWhAoT8fIVbKqR5UONDgUHm1U6EFMrgYI7Co/DvHuPF+HjslpEEWvC8EJVQJ\n\t5mweU1PJzKo3FCfOmJ39b36mmqwIRvTYMxT7+BV3Y7pnEAJwdYoTkHZBV5xkmi2FR7Cf\n\tErbOZEIEM/wWv0bDDxQvgrrP4flj6jUR2gq5KRPk/qj7vX/j/RN9p7iQBJ0luuy7smjC\n\tL/R0IIiixeHv/pfzN9nV3nm/RgcQqkGWOQK3RIkgnc1FripzmeALjyk6mhasqldDOvNE\n\tP80xbERt/1yZfZCst+ONAY4pVfxcumSAbz35fX6llm3ihnDpkWKCgZlkbOby7YM39jCA\n\t/ExA==",
        "X-Gm-Message-State": "APjAAAWBFxQqXj29QPvxgTFRWWgMjBFuL2YggwXOx0FSQmGSxdIFx4k6\n\tUCFbSFFp8gUmrqKNzEy4XreErM2Csyg=",
        "X-Google-Smtp-Source": "APXvYqxKsDk8GWuwEU+aPHOoeP7Qm7j1Eo94GtYQKi8xtO0qkBivTW2apemVI3u4kLApjV9RyAzO+g==",
        "X-Received": "by 2002:ac2:5446:: with SMTP id\n\td6mr29873095lfn.138.1560032569281; \n\tSat, 08 Jun 2019 15:22:49 -0700 (PDT)",
        "From": "Tomasz Jozwiak <tjozwiakgm@gmail.com>",
        "To": "dev@dpdk.org, fiona.trahe@intel.com, tjozwiakgm@gmail.com,\n\tshallyv@marvell.com",
        "Date": "Sun,  9 Jun 2019 00:22:32 +0200",
        "Message-Id": "<1560032553-15528-7-git-send-email-tjozwiakgm@gmail.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1560032553-15528-1-git-send-email-tjozwiakgm@gmail.com>",
        "References": "<1559203588-24046-1-git-send-email-tomaszx.jozwiak@intel.com>\n\t<1560032553-15528-1-git-send-email-tjozwiakgm@gmail.com>",
        "Subject": "[dpdk-dev] [PATCH v2 6/7] app/test-compress-perf: add force process\n\ttermination",
        "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: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\n\nThis patch adds a possibility to force controlled process termination\nas a result of two signals: SIGTERM and SIGINT\n\nSigned-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\n---\n app/test-compress-perf/comp_perf_options.h        |  1 +\n app/test-compress-perf/comp_perf_test_benchmark.c | 13 ++++++++++++\n app/test-compress-perf/comp_perf_test_verify.c    | 14 ++++++++++++\n app/test-compress-perf/main.c                     | 26 +++++++++++++++++++++--\n 4 files changed, 52 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-compress-perf/comp_perf_options.h b/app/test-compress-perf/comp_perf_options.h\nindex 79e63d5..534212d 100644\n--- a/app/test-compress-perf/comp_perf_options.h\n+++ b/app/test-compress-perf/comp_perf_options.h\n@@ -68,6 +68,7 @@ struct comp_test_data {\n \n \tdouble ratio;\n \tenum cleanup_st cleanup;\n+\tint perf_comp_force_stop;\n };\n \n int\ndiff --git a/app/test-compress-perf/comp_perf_test_benchmark.c b/app/test-compress-perf/comp_perf_test_benchmark.c\nindex 9b0b146..b38b33c 100644\n--- a/app/test-compress-perf/comp_perf_test_benchmark.c\n+++ b/app/test-compress-perf/comp_perf_test_benchmark.c\n@@ -183,6 +183,9 @@ main_loop(struct cperf_benchmark_ctx *ctx, enum rte_comp_xform_type type)\n \t\t\t\tops[op_id]->private_xform = priv_xform;\n \t\t\t}\n \n+\t\t\tif (unlikely(test_data->perf_comp_force_stop))\n+\t\t\t\tgoto end;\n+\n \t\t\tnum_enq = rte_compressdev_enqueue_burst(dev_id,\n \t\t\t\t\t\t\t\tmem->qp_id, ops,\n \t\t\t\t\t\t\t\tnum_ops);\n@@ -241,6 +244,9 @@ main_loop(struct cperf_benchmark_ctx *ctx, enum rte_comp_xform_type type)\n \n \t\t/* Dequeue the last operations */\n \t\twhile (total_deq_ops < total_ops) {\n+\t\t\tif (unlikely(test_data->perf_comp_force_stop))\n+\t\t\t\tgoto end;\n+\n \t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id,\n \t\t\t\t\t\t\t   mem->qp_id,\n \t\t\t\t\t\t\t   deq_ops,\n@@ -305,6 +311,13 @@ main_loop(struct cperf_benchmark_ctx *ctx, enum rte_comp_xform_type type)\n \trte_mempool_put_bulk(mem->op_pool, (void **)ops, allocated);\n \trte_compressdev_private_xform_free(dev_id, priv_xform);\n \trte_free(ops);\n+\n+\tif (test_data->perf_comp_force_stop) {\n+\t\tRTE_LOG(ERR, USER1,\n+\t\t      \"lcore: %d Perf. test has been aborted by user\\n\",\n+\t\t\tmem->lcore_id);\n+\t\tres = -1;\n+\t}\n \treturn res;\n }\n \ndiff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c\nindex c2aab70..b2cd7a0 100644\n--- a/app/test-compress-perf/comp_perf_test_verify.c\n+++ b/app/test-compress-perf/comp_perf_test_verify.c\n@@ -187,6 +187,9 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)\n \t\t\t\tops[op_id]->private_xform = priv_xform;\n \t\t\t}\n \n+\t\t\tif (unlikely(test_data->perf_comp_force_stop))\n+\t\t\t\tgoto end;\n+\n \t\t\tnum_enq = rte_compressdev_enqueue_burst(dev_id,\n \t\t\t\t\t\t\t\tmem->qp_id, ops,\n \t\t\t\t\t\t\t\tnum_ops);\n@@ -267,6 +270,9 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)\n \n \t\t/* Dequeue the last operations */\n \t\twhile (total_deq_ops < total_ops) {\n+\t\t\tif (unlikely(test_data->perf_comp_force_stop))\n+\t\t\t\tgoto end;\n+\n \t\t\tnum_deq = rte_compressdev_dequeue_burst(dev_id,\n \t\t\t\t\t\t\tmem->qp_id,\n \t\t\t\t\t\t\tdeq_ops,\n@@ -345,6 +351,14 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)\n \trte_mempool_put_bulk(mem->op_pool, (void **)ops, allocated);\n \trte_compressdev_private_xform_free(dev_id, priv_xform);\n \trte_free(ops);\n+\n+\tif (test_data->perf_comp_force_stop) {\n+\t\tRTE_LOG(ERR, USER1,\n+\t\t      \"lcore: %d Perf. test has been aborted by user\\n\",\n+\t\t\tmem->lcore_id);\n+\t\tres = -1;\n+\t}\n+\n \treturn res;\n }\n \ndiff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c\nindex f8e5f15..a9022f6 100644\n--- a/app/test-compress-perf/main.c\n+++ b/app/test-compress-perf/main.c\n@@ -2,6 +2,10 @@\n  * Copyright(c) 2018 Intel Corporation\n  */\n \n+#include <signal.h>\n+#include <sys/types.h>\n+#include <unistd.h>\n+\n #include <rte_malloc.h>\n #include <rte_eal.h>\n #include <rte_log.h>\n@@ -42,6 +46,8 @@ static const struct cperf_test cperf_testmap[] = {\n \t}\n };\n \n+static struct comp_test_data *test_data;\n+\n static int\n comp_perf_check_capabilities(struct comp_test_data *test_data, uint8_t cdev_id)\n {\n@@ -283,12 +289,24 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)\n \treturn ret;\n }\n \n+static void\n+comp_perf_cleanup_on_signal(int signalNumber __rte_unused)\n+{\n+\ttest_data->perf_comp_force_stop = 1;\n+}\n+\n+static void\n+comp_perf_register_cleanup_on_signal(void)\n+{\n+\tsignal(SIGTERM, comp_perf_cleanup_on_signal);\n+\tsignal(SIGINT, comp_perf_cleanup_on_signal);\n+}\n+\n int\n main(int argc, char **argv)\n {\n \tuint8_t level_idx = 0;\n \tint ret, i;\n-\tstruct comp_test_data *test_data;\n \tvoid *ctx[RTE_MAX_LCORE] = {};\n \tuint8_t enabled_cdevs[RTE_COMPRESS_MAX_DEVS];\n \tint nb_compressdevs = 0;\n@@ -310,6 +328,8 @@ main(int argc, char **argv)\n \t\trte_exit(EXIT_FAILURE, \"Cannot reserve memory in socket %d\\n\",\n \t\t\t\trte_socket_id());\n \n+\tcomp_perf_register_cleanup_on_signal();\n+\n \tret = EXIT_SUCCESS;\n \ttest_data->cleanup = ST_TEST_DATA;\n \tcomp_perf_options_default(test_data);\n@@ -429,8 +449,10 @@ main(int argc, char **argv)\n \t\t/* fallthrough */\n \tcase ST_COMPDEV:\n \t\tfor (i = 0; i < nb_compressdevs &&\n-\t\t\t\ti < RTE_COMPRESS_MAX_DEVS; i++)\n+\t\t     i < RTE_COMPRESS_MAX_DEVS; i++) {\n \t\t\trte_compressdev_stop(enabled_cdevs[i]);\n+\t\t\trte_compressdev_close(enabled_cdevs[i]);\n+\t\t}\n \t\t/* fallthrough */\n \tcase ST_TEST_DATA:\n \t\trte_free(test_data);\n",
    "prefixes": [
        "v2",
        "6/7"
    ]
}