Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75673/?format=api
http://patches.dpdk.org/api/patches/75673/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1597795557-39612-2-git-send-email-nicolas.chautru@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": "<1597795557-39612-2-git-send-email-nicolas.chautru@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1597795557-39612-2-git-send-email-nicolas.chautru@intel.com", "date": "2020-08-19T00:05:51", "name": "[v3,1/7] app/bbdev: add explicit ut for latency vs validation", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5a55880d688412590bd99d5aee6568b0adfd6897", "submitter": { "id": 1314, "url": "http://patches.dpdk.org/api/people/1314/?format=api", "name": "Chautru, Nicolas", "email": "nicolas.chautru@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/1597795557-39612-2-git-send-email-nicolas.chautru@intel.com/mbox/", "series": [ { "id": 11698, "url": "http://patches.dpdk.org/api/series/11698/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11698", "date": "2020-08-19T00:05:50", "name": "BBDEV test updates", "version": 3, "mbox": "http://patches.dpdk.org/series/11698/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75673/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/75673/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CB146A04AF;\n\tWed, 19 Aug 2020 02:07:58 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C53CB1C043;\n\tWed, 19 Aug 2020 02:07:52 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id B49B75F69\n for <dev@dpdk.org>; Wed, 19 Aug 2020 02:07:50 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Aug 2020 17:07:48 -0700", "from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210])\n by orsmga007.jf.intel.com with ESMTP; 18 Aug 2020 17:07:48 -0700" ], "IronPort-SDR": [ "\n s6V8VSk7e+QjHcS6Y/Qs0mOQw8Rz7LsITN7iSFnRcl2jdZ6k1mw4um5Avt3lLHjdzhuxE02VAw\n Pz1Oz82p/fKw==", "\n mTWYZYdzJOuIFjwzUMEU9upjbzCg8Dn/dRXyYA4mkAtjU6Qs6ux2Wl3/Z/0zNwffoBPG+idETm\n QDfJ1ynXy5fg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9717\"; a=\"142653489\"", "E=Sophos;i=\"5.76,329,1592895600\"; d=\"scan'208\";a=\"142653489\"", "E=Sophos;i=\"5.76,329,1592895600\"; d=\"scan'208\";a=\"336789146\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Nicolas Chautru <nicolas.chautru@intel.com>", "To": "dev@dpdk.org,\n\takhil.goyal@nxp.com", "Cc": "bruce.richardson@intel.com,\n\tNicolas Chautru <nicolas.chautru@intel.com>", "Date": "Tue, 18 Aug 2020 17:05:51 -0700", "Message-Id": "<1597795557-39612-2-git-send-email-nicolas.chautru@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1597795557-39612-1-git-send-email-nicolas.chautru@intel.com>", "References": "<1597795557-39612-1-git-send-email-nicolas.chautru@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 1/7] app/bbdev: add explicit ut for latency vs\n\tvalidation", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Adding explicit different ut when testing for validation\nor latency (early termination enabled or not).\n\nSigned-off-by: Nicolas Chautru <nicolas.chautru@intel.com>\n---\n app/test-bbdev/test_bbdev_perf.c | 92 ++++++++++++++++++++++++++++++++++++++--\n 1 file changed, 88 insertions(+), 4 deletions(-)", "diff": "diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c\nindex 45c0d62..1319afd 100644\n--- a/app/test-bbdev/test_bbdev_perf.c\n+++ b/app/test-bbdev/test_bbdev_perf.c\n@@ -3928,12 +3928,14 @@ typedef int (test_case_function)(struct active_device *ad,\n \treturn i;\n }\n \n+/* Test case for latency/validation for LDPC Decoder */\n static int\n latency_test_ldpc_dec(struct rte_mempool *mempool,\n \t\tstruct test_buffers *bufs, struct rte_bbdev_dec_op *ref_op,\n \t\tint vector_mask, uint16_t dev_id, uint16_t queue_id,\n \t\tconst uint16_t num_to_process, uint16_t burst_sz,\n-\t\tuint64_t *total_time, uint64_t *min_time, uint64_t *max_time)\n+\t\tuint64_t *total_time, uint64_t *min_time, uint64_t *max_time,\n+\t\tbool disable_et)\n {\n \tint ret = TEST_SUCCESS;\n \tuint16_t i, j, dequeued;\n@@ -3955,7 +3957,7 @@ typedef int (test_case_function)(struct active_device *ad,\n \t\t\t\t\"rte_bbdev_dec_op_alloc_bulk() failed\");\n \n \t\t/* For latency tests we need to disable early termination */\n-\t\tif (check_bit(ref_op->ldpc_dec.op_flags,\n+\t\tif (disable_et && check_bit(ref_op->ldpc_dec.op_flags,\n \t\t\t\tRTE_BBDEV_LDPC_ITERATION_STOP_ENABLE))\n \t\t\tref_op->ldpc_dec.op_flags -=\n \t\t\t\t\tRTE_BBDEV_LDPC_ITERATION_STOP_ENABLE;\n@@ -4177,7 +4179,7 @@ typedef int (test_case_function)(struct active_device *ad,\n \tTEST_ASSERT_NOT_NULL(op_type_str, \"Invalid op type: %u\", op_type);\n \n \tprintf(\"+ ------------------------------------------------------- +\\n\");\n-\tprintf(\"== test: validation/latency\\ndev: %s, burst size: %u, num ops: %u, op type: %s\\n\",\n+\tprintf(\"== test: latency\\ndev: %s, burst size: %u, num ops: %u, op type: %s\\n\",\n \t\t\tinfo.dev_name, burst_sz, num_to_process, op_type_str);\n \n \tif (op_type == RTE_BBDEV_OP_TURBO_DEC)\n@@ -4199,7 +4201,83 @@ typedef int (test_case_function)(struct active_device *ad,\n \t\titer = latency_test_ldpc_dec(op_params->mp, bufs,\n \t\t\t\top_params->ref_dec_op, op_params->vector_mask,\n \t\t\t\tad->dev_id, queue_id, num_to_process,\n+\t\t\t\tburst_sz, &total_time, &min_time, &max_time,\n+\t\t\t\ttrue);\n+\telse\n+\t\titer = latency_test_enc(op_params->mp, bufs,\n+\t\t\t\t\top_params->ref_enc_op,\n+\t\t\t\t\tad->dev_id, queue_id,\n+\t\t\t\t\tnum_to_process, burst_sz, &total_time,\n+\t\t\t\t\t&min_time, &max_time);\n+\n+\tif (iter <= 0)\n+\t\treturn TEST_FAILED;\n+\n+\tprintf(\"Operation latency:\\n\"\n+\t\t\t\"\\tavg: %lg cycles, %lg us\\n\"\n+\t\t\t\"\\tmin: %lg cycles, %lg us\\n\"\n+\t\t\t\"\\tmax: %lg cycles, %lg us\\n\",\n+\t\t\t(double)total_time / (double)iter,\n+\t\t\t(double)(total_time * 1000000) / (double)iter /\n+\t\t\t(double)rte_get_tsc_hz(), (double)min_time,\n+\t\t\t(double)(min_time * 1000000) / (double)rte_get_tsc_hz(),\n+\t\t\t(double)max_time, (double)(max_time * 1000000) /\n+\t\t\t(double)rte_get_tsc_hz());\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+validation_test(struct active_device *ad,\n+\t\tstruct test_op_params *op_params)\n+{\n+\tint iter;\n+\tuint16_t burst_sz = op_params->burst_sz;\n+\tconst uint16_t num_to_process = op_params->num_to_process;\n+\tconst enum rte_bbdev_op_type op_type = test_vector.op_type;\n+\tconst uint16_t queue_id = ad->queue_ids[0];\n+\tstruct test_buffers *bufs = NULL;\n+\tstruct rte_bbdev_info info;\n+\tuint64_t total_time, min_time, max_time;\n+\tconst char *op_type_str;\n+\n+\ttotal_time = max_time = 0;\n+\tmin_time = UINT64_MAX;\n+\n+\tTEST_ASSERT_SUCCESS((burst_sz > MAX_BURST),\n+\t\t\t\"BURST_SIZE should be <= %u\", MAX_BURST);\n+\n+\trte_bbdev_info_get(ad->dev_id, &info);\n+\tbufs = &op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];\n+\n+\top_type_str = rte_bbdev_op_type_str(op_type);\n+\tTEST_ASSERT_NOT_NULL(op_type_str, \"Invalid op type: %u\", op_type);\n+\n+\tprintf(\"+ ------------------------------------------------------- +\\n\");\n+\tprintf(\"== test: validation\\ndev: %s, burst size: %u, num ops: %u, op type: %s\\n\",\n+\t\t\tinfo.dev_name, burst_sz, num_to_process, op_type_str);\n+\n+\tif (op_type == RTE_BBDEV_OP_TURBO_DEC)\n+\t\titer = latency_test_dec(op_params->mp, bufs,\n+\t\t\t\top_params->ref_dec_op, op_params->vector_mask,\n+\t\t\t\tad->dev_id, queue_id, num_to_process,\n \t\t\t\tburst_sz, &total_time, &min_time, &max_time);\n+\telse if (op_type == RTE_BBDEV_OP_TURBO_ENC)\n+\t\titer = latency_test_enc(op_params->mp, bufs,\n+\t\t\t\top_params->ref_enc_op, ad->dev_id, queue_id,\n+\t\t\t\tnum_to_process, burst_sz, &total_time,\n+\t\t\t\t&min_time, &max_time);\n+\telse if (op_type == RTE_BBDEV_OP_LDPC_ENC)\n+\t\titer = latency_test_ldpc_enc(op_params->mp, bufs,\n+\t\t\t\top_params->ref_enc_op, ad->dev_id, queue_id,\n+\t\t\t\tnum_to_process, burst_sz, &total_time,\n+\t\t\t\t&min_time, &max_time);\n+\telse if (op_type == RTE_BBDEV_OP_LDPC_DEC)\n+\t\titer = latency_test_ldpc_dec(op_params->mp, bufs,\n+\t\t\t\top_params->ref_dec_op, op_params->vector_mask,\n+\t\t\t\tad->dev_id, queue_id, num_to_process,\n+\t\t\t\tburst_sz, &total_time, &min_time, &max_time,\n+\t\t\t\tfalse);\n \telse\n \t\titer = latency_test_enc(op_params->mp, bufs,\n \t\t\t\t\top_params->ref_enc_op,\n@@ -4859,6 +4937,12 @@ typedef int (test_case_function)(struct active_device *ad,\n }\n \n static int\n+validation_tc(void)\n+{\n+\treturn run_test_case(validation_test);\n+}\n+\n+static int\n interrupt_tc(void)\n {\n \treturn run_test_case(throughput_test);\n@@ -4889,7 +4973,7 @@ typedef int (test_case_function)(struct active_device *ad,\n \t.setup = testsuite_setup,\n \t.teardown = testsuite_teardown,\n \t.unit_test_cases = {\n-\t\tTEST_CASE_ST(ut_setup, ut_teardown, latency_tc),\n+\t\tTEST_CASE_ST(ut_setup, ut_teardown, validation_tc),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\n", "prefixes": [ "v3", "1/7" ] }{ "id": 75673, "url": "