Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51309/?format=api
http://patches.dpdk.org/api/patches/51309/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190319012010.16793-5-gage.eads@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": "<20190319012010.16793-5-gage.eads@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190319012010.16793-5-gage.eads@intel.com", "date": "2019-03-19T01:20:08", "name": "[v8,4/6] test_ring: add lock-free ring autotest", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "1f65cb9627c7ba77d9cd15bf2d6ba2320d889ff4", "submitter": { "id": 586, "url": "http://patches.dpdk.org/api/people/586/?format=api", "name": "Eads, Gage", "email": "gage.eads@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190319012010.16793-5-gage.eads@intel.com/mbox/", "series": [ { "id": 3791, "url": "http://patches.dpdk.org/api/series/3791/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3791", "date": "2019-03-19T01:20:04", "name": "Add lock-free ring and mempool handler", "version": 8, "mbox": "http://patches.dpdk.org/series/3791/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/51309/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/51309/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 312284CAF;\n\tTue, 19 Mar 2019 02:20:56 +0100 (CET)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id EE72B324D\n\tfor <dev@dpdk.org>; Tue, 19 Mar 2019 02:20:45 +0100 (CET)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Mar 2019 18:20:45 -0700", "from txasoft-yocto.an.intel.com ([10.123.72.192])\n\tby orsmga008.jf.intel.com with ESMTP; 18 Mar 2019 18:20:43 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.58,495,1544515200\"; d=\"scan'208\";a=\"126564258\"", "From": "Gage Eads <gage.eads@intel.com>", "To": "dev@dpdk.org", "Cc": "olivier.matz@6wind.com, arybchenko@solarflare.com,\n\tbruce.richardson@intel.com, konstantin.ananyev@intel.com,\n\tstephen@networkplumber.org, jerinj@marvell.com, mczekaj@marvell.com, \n\tnd@arm.com, Ola.Liljedahl@arm.com, gage.eads@intel.com", "Date": "Mon, 18 Mar 2019 20:20:08 -0500", "Message-Id": "<20190319012010.16793-5-gage.eads@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20190319012010.16793-1-gage.eads@intel.com>", "References": "<20190318213555.17345-1-gage.eads@intel.com>\n\t<20190319012010.16793-1-gage.eads@intel.com>", "Subject": "[dpdk-dev] [PATCH v8 4/6] test_ring: add lock-free ring autotest", "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": "ring_nb_autotest re-uses the ring_autotest code by wrapping its top-level\nfunction with one that takes a 'flags' argument.\n\nSigned-off-by: Gage Eads <gage.eads@intel.com>\n---\n app/test/test_ring.c | 61 ++++++++++++++++++++++++++++++++--------------------\n 1 file changed, 38 insertions(+), 23 deletions(-)", "diff": "diff --git a/app/test/test_ring.c b/app/test/test_ring.c\nindex aaf1e70ad..400b1bffd 100644\n--- a/app/test/test_ring.c\n+++ b/app/test/test_ring.c\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright(c) 2010-2014 Intel Corporation\n+ * Copyright(c) 2010-2019 Intel Corporation\n */\n \n #include <string.h>\n@@ -601,18 +601,20 @@ test_ring_burst_basic(struct rte_ring *r)\n * it will always fail to create ring with a wrong ring size number in this function\n */\n static int\n-test_ring_creation_with_wrong_size(void)\n+test_ring_creation_with_wrong_size(unsigned int flags)\n {\n \tstruct rte_ring * rp = NULL;\n \n \t/* Test if ring size is not power of 2 */\n-\trp = rte_ring_create(\"test_bad_ring_size\", RING_SIZE + 1, SOCKET_ID_ANY, 0);\n+\trp = rte_ring_create(\"test_bad_ring_size\", RING_SIZE + 1,\n+\t\t\t SOCKET_ID_ANY, flags);\n \tif (NULL != rp) {\n \t\treturn -1;\n \t}\n \n \t/* Test if ring size is exceeding the limit */\n-\trp = rte_ring_create(\"test_bad_ring_size\", (RTE_RING_SZ_MASK + 1), SOCKET_ID_ANY, 0);\n+\trp = rte_ring_create(\"test_bad_ring_size\", (RTE_RING_SZ_MASK + 1),\n+\t\t\t SOCKET_ID_ANY, flags);\n \tif (NULL != rp) {\n \t\treturn -1;\n \t}\n@@ -623,11 +625,11 @@ test_ring_creation_with_wrong_size(void)\n * it tests if it would always fail to create ring with an used ring name\n */\n static int\n-test_ring_creation_with_an_used_name(void)\n+test_ring_creation_with_an_used_name(unsigned int flags)\n {\n \tstruct rte_ring * rp;\n \n-\trp = rte_ring_create(\"test\", RING_SIZE, SOCKET_ID_ANY, 0);\n+\trp = rte_ring_create(\"test\", RING_SIZE, SOCKET_ID_ANY, flags);\n \tif (NULL != rp)\n \t\treturn -1;\n \n@@ -639,10 +641,10 @@ test_ring_creation_with_an_used_name(void)\n * function to fail correctly\n */\n static int\n-test_create_count_odd(void)\n+test_create_count_odd(unsigned int flags)\n {\n \tstruct rte_ring *r = rte_ring_create(\"test_ring_count\",\n-\t\t\t4097, SOCKET_ID_ANY, 0 );\n+\t\t\t4097, SOCKET_ID_ANY, flags);\n \tif(r != NULL){\n \t\treturn -1;\n \t}\n@@ -665,7 +667,7 @@ test_lookup_null(void)\n * it tests some more basic ring operations\n */\n static int\n-test_ring_basic_ex(void)\n+test_ring_basic_ex(unsigned int flags)\n {\n \tint ret = -1;\n \tunsigned i;\n@@ -679,7 +681,7 @@ test_ring_basic_ex(void)\n \t}\n \n \trp = rte_ring_create(\"test_ring_basic_ex\", RING_SIZE, SOCKET_ID_ANY,\n-\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ);\n+\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ | flags);\n \tif (rp == NULL) {\n \t\tprintf(\"test_ring_basic_ex fail to create ring\\n\");\n \t\tgoto fail_test;\n@@ -737,22 +739,22 @@ test_ring_basic_ex(void)\n }\n \n static int\n-test_ring_with_exact_size(void)\n+test_ring_with_exact_size(unsigned int flags)\n {\n \tstruct rte_ring *std_ring = NULL, *exact_sz_ring = NULL;\n-\tvoid *ptr_array[16];\n+\tvoid *ptr_array[1024];\n \tstatic const unsigned int ring_sz = RTE_DIM(ptr_array);\n \tunsigned int i;\n \tint ret = -1;\n \n \tstd_ring = rte_ring_create(\"std\", ring_sz, rte_socket_id(),\n-\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ);\n+\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ | flags);\n \tif (std_ring == NULL) {\n \t\tprintf(\"%s: error, can't create std ring\\n\", __func__);\n \t\tgoto end;\n \t}\n \texact_sz_ring = rte_ring_create(\"exact sz\", ring_sz, rte_socket_id(),\n-\t\t\tRING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);\n+\t\tRING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ | flags);\n \tif (exact_sz_ring == NULL) {\n \t\tprintf(\"%s: error, can't create exact size ring\\n\", __func__);\n \t\tgoto end;\n@@ -770,7 +772,7 @@ test_ring_with_exact_size(void)\n \t}\n \t/*\n \t * check that the exact_sz_ring can hold one more element than the\n-\t * standard ring. (16 vs 15 elements)\n+\t * standard ring. (1024 vs 1023 elements)\n \t */\n \tfor (i = 0; i < ring_sz - 1; i++) {\n \t\trte_ring_enqueue(std_ring, NULL);\n@@ -808,17 +810,17 @@ test_ring_with_exact_size(void)\n }\n \n static int\n-test_ring(void)\n+__test_ring(unsigned int flags)\n {\n \tstruct rte_ring *r = NULL;\n \n \t/* some more basic operations */\n-\tif (test_ring_basic_ex() < 0)\n+\tif (test_ring_basic_ex(flags) < 0)\n \t\tgoto test_fail;\n \n \trte_atomic32_init(&synchro);\n \n-\tr = rte_ring_create(\"test\", RING_SIZE, SOCKET_ID_ANY, 0);\n+\tr = rte_ring_create(\"test\", RING_SIZE, SOCKET_ID_ANY, flags);\n \tif (r == NULL)\n \t\tgoto test_fail;\n \n@@ -837,27 +839,27 @@ test_ring(void)\n \t\tgoto test_fail;\n \n \t/* basic operations */\n-\tif ( test_create_count_odd() < 0){\n+\tif (test_create_count_odd(flags) < 0) {\n \t\tprintf(\"Test failed to detect odd count\\n\");\n \t\tgoto test_fail;\n \t} else\n \t\tprintf(\"Test detected odd count\\n\");\n \n-\tif ( test_lookup_null() < 0){\n+\tif (test_lookup_null() < 0) {\n \t\tprintf(\"Test failed to detect NULL ring lookup\\n\");\n \t\tgoto test_fail;\n \t} else\n \t\tprintf(\"Test detected NULL ring lookup\\n\");\n \n \t/* test of creating ring with wrong size */\n-\tif (test_ring_creation_with_wrong_size() < 0)\n+\tif (test_ring_creation_with_wrong_size(flags) < 0)\n \t\tgoto test_fail;\n \n \t/* test of creation ring with an used name */\n-\tif (test_ring_creation_with_an_used_name() < 0)\n+\tif (test_ring_creation_with_an_used_name(flags) < 0)\n \t\tgoto test_fail;\n \n-\tif (test_ring_with_exact_size() < 0)\n+\tif (test_ring_with_exact_size(flags) < 0)\n \t\tgoto test_fail;\n \n \t/* dump the ring status */\n@@ -873,4 +875,17 @@ test_ring(void)\n \treturn -1;\n }\n \n+static int\n+test_ring(void)\n+{\n+\treturn __test_ring(0);\n+}\n+\n+static int\n+test_lf_ring(void)\n+{\n+\treturn __test_ring(RING_F_LF);\n+}\n+\n REGISTER_TEST_COMMAND(ring_autotest, test_ring);\n+REGISTER_TEST_COMMAND(ring_lf_autotest, test_lf_ring);\n", "prefixes": [ "v8", "4/6" ] }{ "id": 51309, "url": "