get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116310,
    "url": "https://patches.dpdk.org/api/patches/116310/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220914153319.1887248-2-s.v.naga.harish.k@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20220914153319.1887248-2-s.v.naga.harish.k@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220914153319.1887248-2-s.v.naga.harish.k@intel.com",
    "date": "2022-09-14T15:33:18",
    "name": "[v7,2/3] timer: fix function to stop all timers",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "56c33f01d96c1bbcdfb58876b53dc728f583168d",
    "submitter": {
        "id": 2280,
        "url": "https://patches.dpdk.org/api/people/2280/?format=api",
        "name": "Naga Harish K, S V",
        "email": "s.v.naga.harish.k@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220914153319.1887248-2-s.v.naga.harish.k@intel.com/mbox/",
    "series": [
        {
            "id": 24662,
            "url": "https://patches.dpdk.org/api/series/24662/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24662",
            "date": "2022-09-14T15:33:17",
            "name": "[v7,1/3] eventdev/timer: add periodic event timer support",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/24662/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116310/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/116310/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 0318FA00C5;\n\tWed, 14 Sep 2022 17:33:33 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 93A01427FF;\n\tWed, 14 Sep 2022 17:33:27 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 9418E4021E;\n Wed, 14 Sep 2022 17:33:25 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Sep 2022 08:33:25 -0700",
            "from txandevlnx322.an.intel.com ([10.123.117.44])\n by fmsmga008.fm.intel.com with ESMTP; 14 Sep 2022 08:33:24 -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=1663169605; x=1694705605;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=anzzft6slexbzIc4v7WGKL6WBmaz3E1wQMdI1qRgqm8=;\n b=n6xincbZUYCETolCqC7BGATcODiN77ZRTsDpmGU6xsAVRe+OCN046Hri\n GCoaV0qJAxIEjeOuZh6/4Pgi0UNR6n8zTg4IgsKlH1NmJOKHWQWLUGaOz\n /PCIxP8eV/mN7fJSxSc0F0uopeRKy74NkPsPiqAyapqV+lZwc+OH8rBY3\n 8h7I7l9clf4VPJTWNg0Jw8XBfqaT/AqQppkMPHy13tX+t2ggarV76i5P0\n FGXC7DtcjDX7mFjMVxea8CL13WWa4DCTUL6HfGIZrO2YLmXxzdZL/XXGb\n C9CSQYPR1oBnCwtJ4ojOJcJG/TLfLSw805ntgaPD+i4kT1w4nMnEfFFax A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10470\"; a=\"298457278\"",
            "E=Sophos;i=\"5.93,315,1654585200\"; d=\"scan'208\";a=\"298457278\"",
            "E=Sophos;i=\"5.93,315,1654585200\"; d=\"scan'208\";a=\"679096666\""
        ],
        "X-ExtLoop1": "1",
        "From": "Naga Harish K S V <s.v.naga.harish.k@intel.com>",
        "To": "jerinj@marvell.com",
        "Cc": "dev@dpdk.org, erik.g.carrillo@intel.com, pbhagavatula@marvell.com,\n sthotton@marvell.com, stable@dpdk.org",
        "Subject": "[PATCH v7 2/3] timer: fix function to stop all timers",
        "Date": "Wed, 14 Sep 2022 10:33:18 -0500",
        "Message-Id": "<20220914153319.1887248-2-s.v.naga.harish.k@intel.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20220914153319.1887248-1-s.v.naga.harish.k@intel.com>",
        "References": "<20220914135147.1846550-1-s.v.naga.harish.k@intel.com>\n <20220914153319.1887248-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": [
        "v7",
        "2/3"
    ]
}