get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114928,
    "url": "http://patches.dpdk.org/api/patches/114928/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220812160748.287176-1-s.v.naga.harish.k@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": "<20220812160748.287176-1-s.v.naga.harish.k@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220812160748.287176-1-s.v.naga.harish.k@intel.com",
    "date": "2022-08-12T16:07:48",
    "name": "[v4,3/4] timer: fix function to stop all timers",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "56c33f01d96c1bbcdfb58876b53dc728f583168d",
    "submitter": {
        "id": 2280,
        "url": "http://patches.dpdk.org/api/people/2280/?format=api",
        "name": "Naga Harish K, S V",
        "email": "s.v.naga.harish.k@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220812160748.287176-1-s.v.naga.harish.k@intel.com/mbox/",
    "series": [
        {
            "id": 24300,
            "url": "http://patches.dpdk.org/api/series/24300/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24300",
            "date": "2022-08-12T16:07:13",
            "name": "[v4,1/4] eventdev/timer: add periodic event timer support",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/24300/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114928/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/114928/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 9643EA0543;\n\tFri, 12 Aug 2022 18:07:55 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8949C42BC2;\n\tFri, 12 Aug 2022 18:07:55 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 6667B42BC2;\n Fri, 12 Aug 2022 18:07:54 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Aug 2022 09:07:53 -0700",
            "from txandevlnx322.an.intel.com ([10.123.117.44])\n by orsmga006.jf.intel.com with ESMTP; 12 Aug 2022 09:07:52 -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=1660320474; x=1691856474;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=anzzft6slexbzIc4v7WGKL6WBmaz3E1wQMdI1qRgqm8=;\n b=MDv732NK3S7ID632IoFoetY0vemBvLZo51ybejORU991z+IDxB/29PPR\n aTwcrNEjlbD2jTLTGeyhv1GLbmLMukso7ufFOXM8ru31wVXL6BJiWDGgF\n 42gZpBPks5LFCeaP2blWb689kNXMzb+vqZjxMFDU1DWR7Sz2sZTaeZL7I\n jmYDWdcE1p6CMYX4bt5OFILws7vdK3AjZeAs9ipj0KEU3hR/szdxWof/B\n f5r9ETSZRkyPetH+0iYFuYWtnosfLHK/T57m7FozGHDiLVBAD9OntKJuh\n j3/7Cq3JJGjny+oGRM5NkDOXMXJtQ7XXbrqZfbOoGBu/SC8y2rypuxVLP w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10437\"; a=\"271396040\"",
            "E=Sophos;i=\"5.93,233,1654585200\"; d=\"scan'208\";a=\"271396040\"",
            "E=Sophos;i=\"5.93,233,1654585200\"; d=\"scan'208\";a=\"582135033\""
        ],
        "X-ExtLoop1": "1",
        "From": "Naga Harish K S V <s.v.naga.harish.k@intel.com>",
        "To": "erik.g.carrillo@intel.com",
        "Cc": "dev@dpdk.org,\n\tstable@dpdk.org",
        "Subject": "[PATCH v4 3/4] timer: fix function to stop all timers",
        "Date": "Fri, 12 Aug 2022 11:07:48 -0500",
        "Message-Id": "<20220812160748.287176-1-s.v.naga.harish.k@intel.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20220811153717.3992516-1-s.v.naga.harish.k@intel.com>",
        "References": "<20220811153717.3992516-1-s.v.naga.harish.k@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": "There is a possibility of deadlock in this API,\nas same spinlock is tried to be acquired in nested manner.\n\nIf the lcore that is stopping the timer is different from the lcore\nthat owns the timer, the timer list lock is acquired in timer_del(),\neven if local_is_locked is true. Because the same lock was already\nacquired in rte_timer_stop_all(), the thread will hang.\n\nThis patch removes the acquisition of nested lock.\n\nFixes: 821c51267bcd63a (\"timer: add function to stop all timers in a list\")\nCc: stable@dpdk.org\n\nSigned-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>\n---\n lib/timer/rte_timer.c | 13 ++++---------\n 1 file changed, 4 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/timer/rte_timer.c b/lib/timer/rte_timer.c\nindex 9994813d0d..85d67573eb 100644\n--- a/lib/timer/rte_timer.c\n+++ b/lib/timer/rte_timer.c\n@@ -580,7 +580,7 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,\n }\n \n static int\n-__rte_timer_stop(struct rte_timer *tim, int local_is_locked,\n+__rte_timer_stop(struct rte_timer *tim,\n \t\t struct rte_timer_data *timer_data)\n {\n \tunion rte_timer_status prev_status, status;\n@@ -602,7 +602,7 @@ __rte_timer_stop(struct rte_timer *tim, int local_is_locked,\n \n \t/* remove it from list */\n \tif (prev_status.state == RTE_TIMER_PENDING) {\n-\t\ttimer_del(tim, prev_status, local_is_locked, priv_timer);\n+\t\ttimer_del(tim, prev_status, 0, priv_timer);\n \t\t__TIMER_STAT_ADD(priv_timer, pending, -1);\n \t}\n \n@@ -631,7 +631,7 @@ rte_timer_alt_stop(uint32_t timer_data_id, struct rte_timer *tim)\n \n \tTIMER_DATA_VALID_GET_OR_ERR_RET(timer_data_id, timer_data, -EINVAL);\n \n-\treturn __rte_timer_stop(tim, 0, timer_data);\n+\treturn __rte_timer_stop(tim, timer_data);\n }\n \n /* loop until rte_timer_stop() succeed */\n@@ -987,21 +987,16 @@ rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores,\n \t\twalk_lcore = walk_lcores[i];\n \t\tpriv_timer = &timer_data->priv_timer[walk_lcore];\n \n-\t\trte_spinlock_lock(&priv_timer->list_lock);\n-\n \t\tfor (tim = priv_timer->pending_head.sl_next[0];\n \t\t     tim != NULL;\n \t\t     tim = next_tim) {\n \t\t\tnext_tim = tim->sl_next[0];\n \n-\t\t\t/* Call timer_stop with lock held */\n-\t\t\t__rte_timer_stop(tim, 1, timer_data);\n+\t\t\t__rte_timer_stop(tim, timer_data);\n \n \t\t\tif (f)\n \t\t\t\tf(tim, f_arg);\n \t\t}\n-\n-\t\trte_spinlock_unlock(&priv_timer->list_lock);\n \t}\n \n \treturn 0;\n",
    "prefixes": [
        "v4",
        "3/4"
    ]
}