get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 79535,
    "url": "http://patchwork.dpdk.org/api/patches/79535/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/c155c104b7974876674d01ff2d789f78d607f04a.1601640180.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<c155c104b7974876674d01ff2d789f78d607f04a.1601640180.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/c155c104b7974876674d01ff2d789f78d607f04a.1601640180.git.anatoly.burakov@intel.com",
    "date": "2020-10-02T12:03:05",
    "name": "l3fwd-power: make interrupt wakeup log thread safe",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2c143f20d4e660b17d6ff63cd72bb867c0592036",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Burakov, Anatoly",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/c155c104b7974876674d01ff2d789f78d607f04a.1601640180.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 12666,
            "url": "http://patchwork.dpdk.org/api/series/12666/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12666",
            "date": "2020-10-02T12:03:05",
            "name": "l3fwd-power: make interrupt wakeup log thread safe",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/12666/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/79535/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/79535/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 C41C2A04B5;\n\tFri,  2 Oct 2020 14:03:18 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1E4FE1D589;\n\tFri,  2 Oct 2020 14:03:17 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 2C16F1D583\n for <dev@dpdk.org>; Fri,  2 Oct 2020 14:03:14 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Oct 2020 05:03:07 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by fmsmga005.fm.intel.com with ESMTP; 02 Oct 2020 05:03:05 -0700"
        ],
        "IronPort-SDR": [
            "\n ANWY/BNf2ICeR3+3ik9QiE8sbZspuGGiA4xbrNMwuB+1i5e/uVqWYnCKke+WRs0Ac1t9gZ3/xV\n q2cE7azb2DkA==",
            "\n tABp9T0FrSJ99ZiQTkws4qrd9krU61gpYYWAdFdqr8IAR7Kx7Tj9ZH4lRTFiU0ZJatWB1mQs5K\n iau69hg19I7w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9761\"; a=\"160307121\"",
            "E=Sophos;i=\"5.77,327,1596524400\"; d=\"scan'208\";a=\"160307121\"",
            "E=Sophos;i=\"5.77,327,1596524400\"; d=\"scan'208\";a=\"515881407\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "David Hunt <david.hunt@intel.com>,\n\tanatoly.burakov@intel.com",
        "Date": "Fri,  2 Oct 2020 13:03:05 +0100",
        "Message-Id": "\n <c155c104b7974876674d01ff2d789f78d607f04a.1601640180.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] l3fwd-power: make interrupt wakeup log thread\n\tsafe",
        "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": "Currently, the interrupt status notification prevents log spam by\nremembering whether previous interrupt wakeup was due to traffic or due\nto timeout expiring. However, it is a single variable that can\npotentially be accessed from multiple threads, so it is not thread-safe.\n\nFix it by having per-lcore interrupt status.\n\nFixes: f4d1e19c293d (\"examples/l3fwd-power: add Rx interrupt timeout\")\nCc: anatoly.burakov@intel.com\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n examples/l3fwd-power/main.c | 19 ++++++++++++-------\n 1 file changed, 12 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex d0e6c9bd77..46eac7c3e0 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -821,20 +821,23 @@ power_freq_scaleup_heuristic(unsigned lcore_id,\n  *  0 on success\n  */\n static int\n-sleep_until_rx_interrupt(int num)\n+sleep_until_rx_interrupt(int num, int lcore)\n {\n \t/*\n \t * we want to track when we are woken up by traffic so that we can go\n-\t * back to sleep again without log spamming.\n+\t * back to sleep again without log spamming. Avoid cache line sharing\n+\t * to prevent threads stepping on each others' toes.\n \t */\n-\tstatic bool timeout;\n+\tstatic struct {\n+\t\tbool wakeup;\n+\t} __rte_cache_aligned status[RTE_MAX_LCORE];\n \tstruct rte_epoll_event event[num];\n \tint n, i;\n \tuint16_t port_id;\n \tuint8_t queue_id;\n \tvoid *data;\n \n-\tif (!timeout) {\n+\tif (!status[lcore].wakeup) {\n \t\tRTE_LOG(INFO, L3FWD_POWER,\n \t\t\t\t\"lcore %u sleeps until interrupt triggers\\n\",\n \t\t\t\trte_lcore_id());\n@@ -851,7 +854,7 @@ sleep_until_rx_interrupt(int num)\n \t\t\t\" port %d queue %d\\n\",\n \t\t\trte_lcore_id(), port_id, queue_id);\n \t}\n-\ttimeout = n == 0;\n+\tstatus[lcore].wakeup = n == 0;\n \n \treturn 0;\n }\n@@ -1050,7 +1053,8 @@ static int main_intr_loop(__rte_unused void *dummy)\n \t\t\t\tif (intr_en) {\n \t\t\t\t\tturn_on_off_intr(qconf, 1);\n \t\t\t\t\tsleep_until_rx_interrupt(\n-\t\t\t\t\t\t\tqconf->n_rx_queue);\n+\t\t\t\t\t\t\tqconf->n_rx_queue,\n+\t\t\t\t\t\t\tlcore_id);\n \t\t\t\t\tturn_on_off_intr(qconf, 0);\n \t\t\t\t\t/**\n \t\t\t\t\t * start receiving packets immediately\n@@ -1473,7 +1477,8 @@ main_legacy_loop(__rte_unused void *dummy)\n \t\t\t\tif (intr_en) {\n \t\t\t\t\tturn_on_off_intr(qconf, 1);\n \t\t\t\t\tsleep_until_rx_interrupt(\n-\t\t\t\t\t\tqconf->n_rx_queue);\n+\t\t\t\t\t\t\tqconf->n_rx_queue,\n+\t\t\t\t\t\t\tlcore_id);\n \t\t\t\t\tturn_on_off_intr(qconf, 0);\n \t\t\t\t\t/**\n \t\t\t\t\t * start receiving packets immediately\n",
    "prefixes": []
}