get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117461,
    "url": "http://patches.dpdk.org/api/patches/117461/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221006125247.1018265-1-harry.van.haaren@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": "<20221006125247.1018265-1-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221006125247.1018265-1-harry.van.haaren@intel.com",
    "date": "2022-10-06T12:52:47",
    "name": "[v3] test/service: fix spurious failures by extending timeout",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5d2ccac91755ba8726ba95a96061a13f8f369cae",
    "submitter": {
        "id": 317,
        "url": "http://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@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/20221006125247.1018265-1-harry.van.haaren@intel.com/mbox/",
    "series": [
        {
            "id": 25011,
            "url": "http://patches.dpdk.org/api/series/25011/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25011",
            "date": "2022-10-06T12:52:47",
            "name": "[v3] test/service: fix spurious failures by extending timeout",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/25011/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/117461/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/117461/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6D41BA00C2;\n\tThu,  6 Oct 2022 14:53:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E019A42C53;\n\tThu,  6 Oct 2022 14:53:00 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 08ACA42C3C;\n Thu,  6 Oct 2022 14:52:58 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Oct 2022 05:52:58 -0700",
            "from silpixa00401454.ir.intel.com ([10.55.128.131])\n by orsmga003.jf.intel.com with ESMTP; 06 Oct 2022 05:52:55 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1665060779; x=1696596779;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=nL4H6OtGIcW1CQ5e7KP2WRAc1ENXskwse89ezTGrMNE=;\n b=FtoZL5YjjYB89JiW0gRlFcNMvi5oJ/ZnRwgo5MbsJUzFpkk3jh+2ABco\n /eXBhpiszAJXzA70Ei02Q+fhCTyjhwLRzyBPOdElcKet+8PhhllM+N3tY\n LUXKBm5krv+aRRYIp3OJdeZlrrH6gVFKGW6wT/snF8q6Cy1CFpcuVC4Jr\n zl2LqJhZUhsdSQyQuVNShOi+DmnvHKTa1IN6vIwbCuAscrKWUhxhwEzX4\n WtwQmu1Rb5OP+wHKsHDuGdqJZz5uudobvZ/kPnlOq+QbZN4hOYXg6NZdY\n fYewkxolXaz2J+Pqx+RRvRqQUAfbJyFqQ7pLymlllr4PB6fuTrY7ag+/i A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10491\"; a=\"290691131\"",
            "E=Sophos;i=\"5.95,163,1661842800\"; d=\"scan'208\";a=\"290691131\"",
            "E=McAfee;i=\"6500,9779,10491\"; a=\"575811797\"",
            "E=Sophos;i=\"5.95,163,1661842800\"; d=\"scan'208\";a=\"575811797\""
        ],
        "X-ExtLoop1": "1",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, dpdklab@iol.unh.edu, ci@dpdk.org,\n Honnappa.Nagarahalli@arm.com, mb@smartsharesystems.com,\n mattias.ronnblom@ericsson.com, thomas@monjalon.net,\n Harry van Haaren <harry.van.haaren@intel.com>",
        "Subject": "[PATCH v3] test/service: fix spurious failures by extending timeout",
        "Date": "Thu,  6 Oct 2022 12:52:47 +0000",
        "Message-Id": "<20221006125247.1018265-1-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221006081729.578475-1-harry.van.haaren@intel.com>",
        "References": "<20221006081729.578475-1-harry.van.haaren@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "This commit extends the timeout for service_may_be_active()\nfrom 100ms to 1000ms. Local testing on a idle and loaded system\n(compiling DPDK with all cores) always completes after 1 ms.\n\nThe wait time for a service-lcore to finish is also extended\nfrom 100ms to 1000ms.\n\nThe same timeout waiting code was duplicated in two tests, and\nis now refactored to a standalone function avoiding duplication.\n\nReported-by: David Marchand <david.marchand@redhat.com>\nSuggested-by: Mattias Ronnblom <mattias.ronnblom@ericsson.com>\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nv3:\n- Use #define for timeout, and delay(1) (Mattias)\n- Rework slcore-wait to use TIMEOUT_MS as well.\n\nv2:\n- v1 addressed only testcase 15 issue, v2 also addresses test\n  case 5, which has an service-lcore wait code-path.\n---\n app/test/test_service_cores.c | 49 ++++++++++++++++-------------------\n 1 file changed, 23 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c\nindex 359b6dcd8b..637fcd7cf9 100644\n--- a/app/test/test_service_cores.c\n+++ b/app/test/test_service_cores.c\n@@ -22,6 +22,7 @@ static uint64_t service_tick;\n static uint32_t service_remote_launch_flag;\n \n #define SERVICE_DELAY 1\n+#define TIMEOUT_MS 1000\n \n #define DUMMY_SERVICE_NAME \"dummy_service\"\n #define MT_SAFE_SERVICE_NAME \"mt_safe_service\"\n@@ -123,15 +124,15 @@ unregister_all(void)\n \treturn TEST_SUCCESS;\n }\n \n-/* Wait until service lcore not active, or for 100x SERVICE_DELAY */\n+/* Wait until service lcore not active, or for TIMEOUT_MS */\n static void\n wait_slcore_inactive(uint32_t slcore_id)\n {\n \tint i;\n \n \tfor (i = 0; rte_service_lcore_may_be_active(slcore_id) == 1 &&\n-\t\t\ti < 100; i++)\n-\t\trte_delay_ms(SERVICE_DELAY);\n+\t\t\ti < TIMEOUT_MS; i++)\n+\t\trte_delay_ms(1);\n }\n \n /* register a single dummy service */\n@@ -921,12 +922,25 @@ service_lcore_start_stop(void)\n \treturn unregister_all();\n }\n \n+static int\n+service_ensure_stopped_with_timeout(uint32_t sid)\n+{\n+\t/* give the service time to stop running */\n+\tint i;\n+\tfor (i = 0; i < TIMEOUT_MS; i++) {\n+\t\tif (!rte_service_may_be_active(sid))\n+\t\t\tbreak;\n+\t\trte_delay_ms(1);\n+\t}\n+\n+\treturn rte_service_may_be_active(sid);\n+}\n+\n /* stop a service and wait for it to become inactive */\n static int\n service_may_be_active(void)\n {\n \tconst uint32_t sid = 0;\n-\tint i;\n \n \t/* expected failure cases */\n \tTEST_ASSERT_EQUAL(-EINVAL, rte_service_may_be_active(10000),\n@@ -946,19 +960,11 @@ service_may_be_active(void)\n \tTEST_ASSERT_EQUAL(1, service_lcore_running_check(),\n \t\t\t\"Service core expected to poll service but it didn't\");\n \n-\t/* stop the service */\n+\t/* stop the service, and wait for not-active with timeout */\n \tTEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0),\n \t\t\t\"Error: Service stop returned non-zero\");\n-\n-\t/* give the service 100ms to stop running */\n-\tfor (i = 0; i < 100; i++) {\n-\t\tif (!rte_service_may_be_active(sid))\n-\t\t\tbreak;\n-\t\trte_delay_ms(SERVICE_DELAY);\n-\t}\n-\n-\tTEST_ASSERT_EQUAL(0, rte_service_may_be_active(sid),\n-\t\t\t  \"Error: Service not stopped after 100ms\");\n+\tTEST_ASSERT_EQUAL(0, service_ensure_stopped_with_timeout(sid),\n+\t\t\t  \"Error: Service not stopped after timeout period.\");\n \n \treturn unregister_all();\n }\n@@ -972,7 +978,6 @@ service_active_two_cores(void)\n \t\treturn TEST_SKIPPED;\n \n \tconst uint32_t sid = 0;\n-\tint i;\n \n \tuint32_t lcore = rte_get_next_lcore(/* start core */ -1,\n \t\t\t\t\t    /* skip main */ 1,\n@@ -1002,16 +1007,8 @@ service_active_two_cores(void)\n \t/* stop the service */\n \tTEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0),\n \t\t\t\"Error: Service stop returned non-zero\");\n-\n-\t/* give the service 100ms to stop running */\n-\tfor (i = 0; i < 100; i++) {\n-\t\tif (!rte_service_may_be_active(sid))\n-\t\t\tbreak;\n-\t\trte_delay_ms(SERVICE_DELAY);\n-\t}\n-\n-\tTEST_ASSERT_EQUAL(0, rte_service_may_be_active(sid),\n-\t\t\t  \"Error: Service not stopped after 100ms\");\n+\tTEST_ASSERT_EQUAL(0, service_ensure_stopped_with_timeout(sid),\n+\t\t\t  \"Error: Service not stopped after timeout period.\");\n \n \treturn unregister_all();\n }\n",
    "prefixes": [
        "v3"
    ]
}