Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/55424/?format=api
http://patches.dpdk.org/api/patches/55424/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1561566633-12329-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": "<1561566633-12329-7-git-send-email-tjozwiakgm@gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1561566633-12329-7-git-send-email-tjozwiakgm@gmail.com", "date": "2019-06-26T16:30:32", "name": "[v3,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/1561566633-12329-7-git-send-email-tjozwiakgm@gmail.com/mbox/", "series": [ { "id": 5183, "url": "http://patches.dpdk.org/api/series/5183/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5183", "date": "2019-06-26T16:30:26", "name": "add multiple cores feature to test-compress-perf", "version": 3, "mbox": "http://patches.dpdk.org/series/5183/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/55424/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/55424/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 22E802E8F;\n\tWed, 26 Jun 2019 18:31:06 +0200 (CEST)", "from mail-wm1-f67.google.com (mail-wm1-f67.google.com\n\t[209.85.128.67]) by dpdk.org (Postfix) with ESMTP id A87EB2BB5\n\tfor <dev@dpdk.org>; Wed, 26 Jun 2019 18:30:52 +0200 (CEST)", "by mail-wm1-f67.google.com with SMTP id v19so2744640wmj.5\n\tfor <dev@dpdk.org>; Wed, 26 Jun 2019 09:30:52 -0700 (PDT)", "from localhost.localdomain\n\t(178.43.130.103.ipv4.supernova.orange.pl. [178.43.130.103])\n\tby smtp.gmail.com with ESMTPSA id\n\tn10sm16989663wrw.83.2019.06.26.09.30.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 26 Jun 2019 09:30:51 -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=vJmq5DaP1Wt8GCjaDZEZhPlf5UC13Z3m+XChLBtGZXk=;\n\tb=qNCCq9CuKXMM3VNSmQ06HZRe4RsrAVnFw6SXGGhjm460T5uAgiWu3FtpLPTl8XVoGT\n\tYy2wKz1ifyPPYPB5oGTpluVlnnKYbJfOzC5Sg3Y6Z2aXLnAmmcVxsJMRx0DjnqVNTMwV\n\tQTr3XoNuMvlW3MSOQUuo08EivHV1vUmnHaa0iFkW/IRkG/7XC049Pen59ReIQUBAhooM\n\t0YmNwlutyEPTw3GSb16B/vV5ObebNcrJAel8ppGJpwMN2g9IXdvXLoRu99B/02qYTSlJ\n\toGV7/Brr+8qiIX1fTVwI5zJ1q5+Et0dwUeMbIQn78BXT/054VzU7BT287YyWhi26s0a9\n\tfCeQ==", "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=vJmq5DaP1Wt8GCjaDZEZhPlf5UC13Z3m+XChLBtGZXk=;\n\tb=N4xabFyC4n6I9BXh5lMmt8IM888xWz1VnCAWakKvMtyQXml/4UFUXXMufe5LzSg2mZ\n\t3DL8g7mZGKifCVy5ri6/IyGWUTENWkBXfsmjnGOZFnM3Dbto75rrIJVkvvp7hLI7NEx7\n\tkY9PH0ErBqPK/NznQIgZF6Jq/12xXngRhwKwqEvybWpmzSA694IlWB3wVCBuWLQkUUtx\n\t1Q0pM4C6zDK79A/LUhPTjIhCOHiASX0tYDmWkP9JuSKQyH4c7Ta2M5b2O5mD9q/PcN9d\n\tshKk9x7bbz2OA5Yp/KOfl88bx0ZtxisqxJk93OoICdbXFOZ4hStFotDL0DWIZq0BRfdL\n\t7A9w==", "X-Gm-Message-State": "APjAAAVQlIMRbTevWbOijKOUp7ONoHH1oiS3y7k0AyZCSeInYmR2cDSn\n\tdefxWMSOlXSOfI573zZEf0PwDOc/SbR9VA==", "X-Google-Smtp-Source": "APXvYqwWNKhnbmlTenROTBr8OsA2sjVPfLQWb1cj6Cp6K6EdkcMho3IPWvEP4lO0WSrFZs4Om4e5EA==", "X-Received": "by 2002:a1c:ab06:: with SMTP id u6mr3254104wme.125.1561566652141;\n\tWed, 26 Jun 2019 09:30:52 -0700 (PDT)", "From": "Tomasz Jozwiak <tjozwiakgm@gmail.com>", "To": "dev@dpdk.org, fiona.trahe@intel.com, tjozwiakgm@gmail.com,\n\tshallyv@marvell.com, arturx.trybula@intel.com", "Date": "Wed, 26 Jun 2019 18:30:32 +0200", "Message-Id": "<1561566633-12329-7-git-send-email-tjozwiakgm@gmail.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1561566633-12329-1-git-send-email-tjozwiakgm@gmail.com>", "References": "<1560032553-15528-1-git-send-email-tjozwiakgm@gmail.com>\n\t<1561566633-12329-1-git-send-email-tjozwiakgm@gmail.com>", "Subject": "[dpdk-dev] [PATCH v3 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 5f27bae..9effccc 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 1044532..77b279b 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@@ -430,8 +450,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": [ "v3", "6/7" ] }{ "id": 55424, "url": "