Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/68771/?format=api
http://patches.dpdk.org/api/patches/68771/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200417133639.14019-10-konstantin.ananyev@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": "<20200417133639.14019-10-konstantin.ananyev@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200417133639.14019-10-konstantin.ananyev@intel.com", "date": "2020-04-17T13:36:39", "name": "[v4,9/9] test/ring: add functional tests for new sync modes", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1233927ab7b060dcda075968a4d4d17050befb0b", "submitter": { "id": 33, "url": "http://patches.dpdk.org/api/people/33/?format=api", "name": "Ananyev, Konstantin", "email": "konstantin.ananyev@intel.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200417133639.14019-10-konstantin.ananyev@intel.com/mbox/", "series": [ { "id": 9464, "url": "http://patches.dpdk.org/api/series/9464/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9464", "date": "2020-04-17T13:36:30", "name": "New sync modes for ring", "version": 4, "mbox": "http://patches.dpdk.org/series/9464/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/68771/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/68771/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 DF2A5A058A;\n\tFri, 17 Apr 2020 15:39:34 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AC2331E8AC;\n\tFri, 17 Apr 2020 15:37:47 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by dpdk.org (Postfix) with ESMTP id 57F211E8FA\n for <dev@dpdk.org>; Fri, 17 Apr 2020 15:37:41 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Apr 2020 06:37:40 -0700", "from sivswdev08.ir.intel.com ([10.237.217.47])\n by orsmga003.jf.intel.com with ESMTP; 17 Apr 2020 06:37:38 -0700" ], "IronPort-SDR": [ "\n cNrjhEH6noReiYO8yebHBbt+NEUjNBkn6RTsUZlWqgO3vrnTbIHTJHFo0t2uCQPKEu+FzSVP7y\n 4Iav9Rd/9YlQ==", "\n 7Jtf9+6IZGxhCg/rfwq6lVoUsyBvkr4kjhAPK+grcXn5iOTiWpsM8eo6fqVej9VL9aoug2mL1c\n v4T2JDOKKbGQ==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.72,395,1580803200\"; d=\"scan'208\";a=\"254210053\"", "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>", "To": "dev@dpdk.org", "Cc": "honnappa.nagarahalli@arm.com, david.marchand@redhat.com,\n jielong.zjl@antfin.com, Konstantin Ananyev <konstantin.ananyev@intel.com>", "Date": "Fri, 17 Apr 2020 14:36:39 +0100", "Message-Id": "<20200417133639.14019-10-konstantin.ananyev@intel.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20200417133639.14019-1-konstantin.ananyev@intel.com>", "References": "<20200403174235.23308-1-konstantin.ananyev@intel.com>\n <20200417133639.14019-1-konstantin.ananyev@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 9/9] test/ring: add functional tests for new\n\tsync modes", "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": "Extend test_ring_autotest with new test-cases for RTS/HTS sync modes.\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n app/test/test_ring.c | 93 ++++++++++++++++++++++++++++++++++----------\n 1 file changed, 73 insertions(+), 20 deletions(-)", "diff": "diff --git a/app/test/test_ring.c b/app/test/test_ring.c\nindex fbcd109b1..e21557cd9 100644\n--- a/app/test/test_ring.c\n+++ b/app/test/test_ring.c\n@@ -203,7 +203,8 @@ test_ring_negative_tests(void)\n * Random number of elements are enqueued and dequeued.\n */\n static int\n-test_ring_burst_bulk_tests1(unsigned int api_type)\n+test_ring_burst_bulk_tests1(unsigned int api_type, unsigned int create_flags,\n+\tconst char *tname)\n {\n \tstruct rte_ring *r;\n \tvoid **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;\n@@ -213,12 +214,11 @@ test_ring_burst_bulk_tests1(unsigned int api_type)\n \tconst unsigned int rsz = RING_SIZE - 1;\n \n \tfor (i = 0; i < RTE_DIM(esize); i++) {\n-\t\ttest_ring_print_test_string(\"Test standard ring\", api_type,\n-\t\t\t\t\t\tesize[i]);\n+\t\ttest_ring_print_test_string(tname, api_type, esize[i]);\n \n \t\t/* Create the ring */\n \t\tr = test_ring_create(\"test_ring_burst_bulk_tests\", esize[i],\n-\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, 0);\n+\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, create_flags);\n \n \t\t/* alloc dummy object pointers */\n \t\tsrc = test_ring_calloc(RING_SIZE * 2, esize[i]);\n@@ -294,7 +294,8 @@ test_ring_burst_bulk_tests1(unsigned int api_type)\n * dequeued data.\n */\n static int\n-test_ring_burst_bulk_tests2(unsigned int api_type)\n+test_ring_burst_bulk_tests2(unsigned int api_type, unsigned int create_flags,\n+\tconst char *tname)\n {\n \tstruct rte_ring *r;\n \tvoid **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;\n@@ -302,12 +303,11 @@ test_ring_burst_bulk_tests2(unsigned int api_type)\n \tunsigned int i;\n \n \tfor (i = 0; i < RTE_DIM(esize); i++) {\n-\t\ttest_ring_print_test_string(\"Test standard ring\", api_type,\n-\t\t\t\t\t\tesize[i]);\n+\t\ttest_ring_print_test_string(tname, api_type, esize[i]);\n \n \t\t/* Create the ring */\n \t\tr = test_ring_create(\"test_ring_burst_bulk_tests\", esize[i],\n-\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, 0);\n+\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, create_flags);\n \n \t\t/* alloc dummy object pointers */\n \t\tsrc = test_ring_calloc(RING_SIZE * 2, esize[i]);\n@@ -390,7 +390,8 @@ test_ring_burst_bulk_tests2(unsigned int api_type)\n * Enqueue and dequeue to cover the entire ring length.\n */\n static int\n-test_ring_burst_bulk_tests3(unsigned int api_type)\n+test_ring_burst_bulk_tests3(unsigned int api_type, unsigned int create_flags,\n+\tconst char *tname)\n {\n \tstruct rte_ring *r;\n \tvoid **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;\n@@ -398,12 +399,11 @@ test_ring_burst_bulk_tests3(unsigned int api_type)\n \tunsigned int i, j;\n \n \tfor (i = 0; i < RTE_DIM(esize); i++) {\n-\t\ttest_ring_print_test_string(\"Test standard ring\", api_type,\n-\t\t\t\t\t\tesize[i]);\n+\t\ttest_ring_print_test_string(tname, api_type, esize[i]);\n \n \t\t/* Create the ring */\n \t\tr = test_ring_create(\"test_ring_burst_bulk_tests\", esize[i],\n-\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, 0);\n+\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, create_flags);\n \n \t\t/* alloc dummy object pointers */\n \t\tsrc = test_ring_calloc(RING_SIZE * 2, esize[i]);\n@@ -465,7 +465,8 @@ test_ring_burst_bulk_tests3(unsigned int api_type)\n * Enqueue till the ring is full and dequeue till the ring becomes empty.\n */\n static int\n-test_ring_burst_bulk_tests4(unsigned int api_type)\n+test_ring_burst_bulk_tests4(unsigned int api_type, unsigned int create_flags,\n+\tconst char *tname)\n {\n \tstruct rte_ring *r;\n \tvoid **src = NULL, **cur_src = NULL, **dst = NULL, **cur_dst = NULL;\n@@ -474,12 +475,11 @@ test_ring_burst_bulk_tests4(unsigned int api_type)\n \tunsigned int num_elems;\n \n \tfor (i = 0; i < RTE_DIM(esize); i++) {\n-\t\ttest_ring_print_test_string(\"Test standard ring\", api_type,\n-\t\t\t\t\t\tesize[i]);\n+\t\ttest_ring_print_test_string(tname, api_type, esize[i]);\n \n \t\t/* Create the ring */\n \t\tr = test_ring_create(\"test_ring_burst_bulk_tests\", esize[i],\n-\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, 0);\n+\t\t\t\t\tRING_SIZE, SOCKET_ID_ANY, create_flags);\n \n \t\t/* alloc dummy object pointers */\n \t\tsrc = test_ring_calloc(RING_SIZE * 2, esize[i]);\n@@ -815,7 +815,23 @@ test_ring_with_exact_size(void)\n static int\n test_ring(void)\n {\n+\tint32_t rc;\n \tunsigned int i, j;\n+\tconst char *tname;\n+\n+\tstatic const struct {\n+\t\tuint32_t create_flags;\n+\t\tconst char *name;\n+\t} test_sync_modes[] = {\n+\t\t{\n+\t\t\tRING_F_MP_RTS_ENQ | RING_F_MC_RTS_DEQ,\n+\t\t\t\"Test MT_RTS ring\",\n+\t\t},\n+\t\t{\n+\t\t\tRING_F_MP_HTS_ENQ | RING_F_MC_HTS_DEQ,\n+\t\t\t\"Test MT_HTS ring\",\n+\t\t},\n+\t};\n \n \t/* Negative test cases */\n \tif (test_ring_negative_tests() < 0)\n@@ -832,30 +848,67 @@ test_ring(void)\n \t * The test cases are split into smaller test cases to\n \t * help clang compile faster.\n \t */\n+\ttname = \"Test standard ring\";\n+\n \tfor (j = TEST_RING_ELEM_BULK; j <= TEST_RING_ELEM_BURST; j <<= 1)\n \t\tfor (i = TEST_RING_THREAD_DEF;\n \t\t\t\t\ti <= TEST_RING_THREAD_MPMC; i <<= 1)\n-\t\t\tif (test_ring_burst_bulk_tests1(i | j) < 0)\n+\t\t\tif (test_ring_burst_bulk_tests1(i | j, 0, tname) < 0)\n \t\t\t\tgoto test_fail;\n \n \tfor (j = TEST_RING_ELEM_BULK; j <= TEST_RING_ELEM_BURST; j <<= 1)\n \t\tfor (i = TEST_RING_THREAD_DEF;\n \t\t\t\t\ti <= TEST_RING_THREAD_MPMC; i <<= 1)\n-\t\t\tif (test_ring_burst_bulk_tests2(i | j) < 0)\n+\t\t\tif (test_ring_burst_bulk_tests2(i | j, 0, tname) < 0)\n \t\t\t\tgoto test_fail;\n \n \tfor (j = TEST_RING_ELEM_BULK; j <= TEST_RING_ELEM_BURST; j <<= 1)\n \t\tfor (i = TEST_RING_THREAD_DEF;\n \t\t\t\t\ti <= TEST_RING_THREAD_MPMC; i <<= 1)\n-\t\t\tif (test_ring_burst_bulk_tests3(i | j) < 0)\n+\t\t\tif (test_ring_burst_bulk_tests3(i | j, 0, tname) < 0)\n \t\t\t\tgoto test_fail;\n \n \tfor (j = TEST_RING_ELEM_BULK; j <= TEST_RING_ELEM_BURST; j <<= 1)\n \t\tfor (i = TEST_RING_THREAD_DEF;\n \t\t\t\t\ti <= TEST_RING_THREAD_MPMC; i <<= 1)\n-\t\t\tif (test_ring_burst_bulk_tests4(i | j) < 0)\n+\t\t\tif (test_ring_burst_bulk_tests4(i | j, 0, tname) < 0)\n+\t\t\t\tgoto test_fail;\n+\n+\t/* Burst and bulk operations with MT_RTS and MT_HTS sync modes */\n+\tfor (i = 0; i != RTE_DIM(test_sync_modes); i++) {\n+\t\tfor (j = TEST_RING_ELEM_BULK; j <= TEST_RING_ELEM_BURST;\n+\t\t\t\tj <<= 1) {\n+\n+\t\t\trc = test_ring_burst_bulk_tests1(\n+\t\t\t\tTEST_RING_THREAD_DEF | j,\n+\t\t\t\ttest_sync_modes[i].create_flags,\n+\t\t\t\ttest_sync_modes[i].name);\n+\t\t\tif (rc < 0)\n+\t\t\t\tgoto test_fail;\n+\n+\t\t\trc = test_ring_burst_bulk_tests2(\n+\t\t\t\tTEST_RING_THREAD_DEF | j,\n+\t\t\t\ttest_sync_modes[i].create_flags,\n+\t\t\t\ttest_sync_modes[i].name);\n+\t\t\tif (rc < 0)\n \t\t\t\tgoto test_fail;\n \n+\t\t\trc = test_ring_burst_bulk_tests3(\n+\t\t\t\tTEST_RING_THREAD_DEF | j,\n+\t\t\t\ttest_sync_modes[i].create_flags,\n+\t\t\t\ttest_sync_modes[i].name);\n+\t\t\tif (rc < 0)\n+\t\t\t\tgoto test_fail;\n+\n+\t\t\trc = test_ring_burst_bulk_tests3(\n+\t\t\t\tTEST_RING_THREAD_DEF | j,\n+\t\t\t\ttest_sync_modes[i].create_flags,\n+\t\t\t\ttest_sync_modes[i].name);\n+\t\t\tif (rc < 0)\n+\t\t\t\tgoto test_fail;\n+\t\t}\n+\t}\n+\n \t/* dump the ring status */\n \trte_ring_list_dump(stdout);\n \n", "prefixes": [ "v4", "9/9" ] }{ "id": 68771, "url": "