get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93720,
    "url": "http://patchwork.dpdk.org/api/patches/93720/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/8007029ea9e5129ea43f0c11708169406a16727f.1622548381.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": "<8007029ea9e5129ea43f0c11708169406a16727f.1622548381.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/8007029ea9e5129ea43f0c11708169406a16727f.1622548381.git.anatoly.burakov@intel.com",
    "date": "2021-06-01T12:00:30",
    "name": "[v1,1/7] power_intrinsics: allow monitor checks inversion",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fc90abe423c40a8539725210e4d8c41a67aed603",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/8007029ea9e5129ea43f0c11708169406a16727f.1622548381.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 17191,
            "url": "http://patchwork.dpdk.org/api/series/17191/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=17191",
            "date": "2021-06-01T12:00:29",
            "name": "Enhancements for PMD power management",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/17191/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/93720/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/93720/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 40EA1A0524;\n\tTue,  1 Jun 2021 14:00:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B38BF40FDF;\n\tTue,  1 Jun 2021 14:00:44 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 4C3BE40041\n for <dev@dpdk.org>; Tue,  1 Jun 2021 14:00:42 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Jun 2021 05:00:40 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.54])\n by fmsmga001.fm.intel.com with ESMTP; 01 Jun 2021 05:00:39 -0700"
        ],
        "IronPort-SDR": [
            "\n dZGciVnY9ofUahIM18m/baFphQpg8FJxj2pr8Eb5xYGEenyKTlQEYpGfGUyQvhlf01CScXqD+N\n uZqOmPYAYJ6g==",
            "\n InDbsWhm/ZEqci5aw/6cYFhMoXz7xJTUiBVYb/cR8KywDg9a7CSFTcX9ZNFsI6znas0U60bFt0\n i3cqM/jfrIOA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10001\"; a=\"203528466\"",
            "E=Sophos;i=\"5.83,239,1616482800\"; d=\"scan'208\";a=\"203528466\"",
            "E=Sophos;i=\"5.83,239,1616482800\"; d=\"scan'208\";a=\"549706980\""
        ],
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,\n Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "Cc": "ciara.loftus@intel.com,\n\tdavid.hunt@intel.com",
        "Date": "Tue,  1 Jun 2021 12:00:30 +0000",
        "Message-Id": "\n <8007029ea9e5129ea43f0c11708169406a16727f.1622548381.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<cover.1622548381.git.anatoly.burakov@intel.com>",
        "References": "<cover.1622548381.git.anatoly.burakov@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v1 1/7] power_intrinsics: allow monitor checks\n inversion",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Previously, the semantics of power monitor were such that we were\nchecking current value against the expected value, and if they matched,\nthen the sleep was aborted. This is somewhat inflexible, because it only\nallowed us to check for a specific value.\n\nThis commit adds an option to reverse the check, so that we can have\nmonitor sleep aborted if the expected value *doesn't* match what's in\nmemory. This allows us to both implement all currently implemented\ndriver code, as well as support more use cases which don't easily map to\nprevious semantics (such as waiting on writes to AF_XDP counter value).\n\nSince the old behavior is the default, no need to adjust existing\nimplementations.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/eal/include/generic/rte_power_intrinsics.h | 4 ++++\n lib/eal/x86/rte_power_intrinsics.c             | 5 ++++-\n 2 files changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/include/generic/rte_power_intrinsics.h b/lib/eal/include/generic/rte_power_intrinsics.h\nindex dddca3d41c..1006c2edfc 100644\n--- a/lib/eal/include/generic/rte_power_intrinsics.h\n+++ b/lib/eal/include/generic/rte_power_intrinsics.h\n@@ -31,6 +31,10 @@ struct rte_power_monitor_cond {\n \t                  *   4, or 8. Supplying any other value will result in\n \t                  *   an error.\n \t                  */\n+\tuint8_t invert;  /**< Invert check for expected value (e.g. instead of\n+\t                  *   checking if `val` matches something, check if\n+\t                  *   `val` *doesn't* match a particular value)\n+\t                  */\n };\n \n /**\ndiff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c\nindex 39ea9fdecd..5d944e9aa4 100644\n--- a/lib/eal/x86/rte_power_intrinsics.c\n+++ b/lib/eal/x86/rte_power_intrinsics.c\n@@ -117,7 +117,10 @@ rte_power_monitor(const struct rte_power_monitor_cond *pmc,\n \t\tconst uint64_t masked = cur_value & pmc->mask;\n \n \t\t/* if the masked value is already matching, abort */\n-\t\tif (masked == pmc->val)\n+\t\tif (!pmc->invert && masked == pmc->val)\n+\t\t\tgoto end;\n+\t\t/* same, but for inverse check */\n+\t\tif (pmc->invert && masked != pmc->val)\n \t\t\tgoto end;\n \t}\n \n",
    "prefixes": [
        "v1",
        "1/7"
    ]
}