get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44490,
    "url": "http://patches.dpdk.org/api/patches/44490/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1536572016-18134-26-git-send-email-arybchenko@solarflare.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": "<1536572016-18134-26-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536572016-18134-26-git-send-email-arybchenko@solarflare.com",
    "date": "2018-09-10T09:33:24",
    "name": "[25/37] net/sfc/base: add API to inform libefx of hardware removal",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c2e48ffefda15485e49d9d2810f7f96e6f8e1c15",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1536572016-18134-26-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 1244,
            "url": "http://patches.dpdk.org/api/series/1244/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1244",
            "date": "2018-09-10T09:33:01",
            "name": "net/sfc: update base driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1244/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44490/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/44490/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 803347CE7;\n\tMon, 10 Sep 2018 11:34:33 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 240734C9F\n\tfor <dev@dpdk.org>; Mon, 10 Sep 2018 11:33:53 +0200 (CEST)",
            "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id\n\t76B95780069 for <dev@dpdk.org>; Mon, 10 Sep 2018 09:33:52 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Mon, 10 Sep 2018 02:33:48 -0700",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Mon, 10 Sep 2018 02:33:48 -0700",
            "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tw8A9XkHR023845; Mon, 10 Sep 2018 10:33:46 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t8E2041626D2; Mon, 10 Sep 2018 10:33:46 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Andy Moreton <amoreton@solarflare.com>",
        "Date": "Mon, 10 Sep 2018 10:33:24 +0100",
        "Message-ID": "<1536572016-18134-26-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1536572016-18134-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1536572016-18134-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.5.1010-24084.005",
        "X-TM-AS-Result": "No-6.959200-4.000000-10",
        "X-TMASE-MatchedRID": "0UUeOgJVC+RdFN0T1voizz+4a4C1bX1BGEfoClqBl86en0qBdy7fjGRV\n\tafH3iZmYRB4o3Hb/MDC42Q68Rp7DiW94Ipa1otxoSjc25srXNgj/lBG+uXYJkLw2tvOM+/MnNR3\n\tCad/nFs1B/6T0eWCz/bR/4ZyrTbfcqH7dGVt6/4kHwuCWPSIIAOWNJG9IamrcHY64nxYpfpU3Aw\n\tihR7/Pv+LzNWBegCW2wgn7iDBesS15zdAzex5xZkqI+9VC4oXsnXNeD6IV797yLZdoo4/aSOJQX\n\tiArPmxWFGvu2Ug6EwCUTGVAhB5EbQ==",
        "X-TM-AS-User-Approved-Sender": "No",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--6.959200-4.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24084.005",
        "X-MDID": "1536572033-UKOdFBUIDOT1",
        "Subject": "[dpdk-dev] [PATCH 25/37] net/sfc/base: add API to inform libefx of\n\thardware removal",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Andy Moreton <amoreton@solarflare.com>\n\nThe efx_nic_hw_unavailable() checks ensure that if the NIC hardware\nhas failed or has been physically removed then libefx will stop\nfurther attempts to access the hardware.\n\nAdd an interface for libefx clients to force unavailability, so the\nhardware is treated as dead or removed even if still physically present.\n\nSigned-off-by: Andy Moreton <amoreton@solarflare.com>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/base/ef10_impl.h |  4 ++++\n drivers/net/sfc/base/ef10_nic.c  | 12 ++++++++++--\n drivers/net/sfc/base/efx.h       |  4 ++++\n drivers/net/sfc/base/efx_impl.h  |  1 +\n drivers/net/sfc/base/efx_nic.c   | 18 ++++++++++++++++--\n 5 files changed, 35 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h\nindex 0214a75ef..2819ae6ed 100644\n--- a/drivers/net/sfc/base/ef10_impl.h\n+++ b/drivers/net/sfc/base/ef10_impl.h\n@@ -194,6 +194,10 @@ extern\t__checkReturn\tboolean_t\n ef10_nic_hw_unavailable(\n \t__in\t\tefx_nic_t *enp);\n \n+extern\t\t\tvoid\n+ef10_nic_set_hw_unavailable(\n+\t__in\t\tefx_nic_t *enp);\n+\n #if EFSYS_OPT_DIAG\n \n extern\t__checkReturn\tefx_rc_t\ndiff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c\nindex ff96a7ff2..0a2474f3e 100644\n--- a/drivers/net/sfc/base/ef10_nic.c\n+++ b/drivers/net/sfc/base/ef10_nic.c\n@@ -2320,12 +2320,20 @@ ef10_nic_hw_unavailable(\n \treturn (B_FALSE);\n \n unavail:\n-\tEFSYS_PROBE(hw_unavail);\n-\tenp->en_reset_flags |= EFX_RESET_HW_UNAVAIL;\n+\tef10_nic_set_hw_unavailable(enp);\n \n \treturn (B_TRUE);\n }\n \n+\t\t\tvoid\n+ef10_nic_set_hw_unavailable(\n+\t__in\t\tefx_nic_t *enp)\n+{\n+\tEFSYS_PROBE(hw_unavail);\n+\tenp->en_reset_flags |= EFX_RESET_HW_UNAVAIL;\n+}\n+\n+\n \t\t\tvoid\n ef10_nic_fini(\n \t__in\t\tefx_nic_t *enp)\ndiff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h\nindex fce519037..0982a34d6 100644\n--- a/drivers/net/sfc/base/efx.h\n+++ b/drivers/net/sfc/base/efx.h\n@@ -159,6 +159,10 @@ extern\t__checkReturn\tboolean_t\n efx_nic_hw_unavailable(\n \t__in\t\tefx_nic_t *enp);\n \n+extern\t\t\tvoid\n+efx_nic_set_hw_unavailable(\n+\t__in\t\tefx_nic_t *enp);\n+\n #if EFSYS_OPT_DIAG\n \n extern\t__checkReturn\tefx_rc_t\ndiff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h\nindex 8a7dc8cf6..2c95571b1 100644\n--- a/drivers/net/sfc/base/efx_impl.h\n+++ b/drivers/net/sfc/base/efx_impl.h\n@@ -358,6 +358,7 @@ typedef struct efx_nic_ops_s {\n \tefx_rc_t\t(*eno_get_bar_region)(efx_nic_t *, efx_nic_region_t,\n \t\t\t\t\tuint32_t *, size_t *);\n \tboolean_t\t(*eno_hw_unavailable)(efx_nic_t *);\n+\tvoid\t\t(*eno_set_hw_unavailable)(efx_nic_t *);\n #if EFSYS_OPT_DIAG\n \tefx_rc_t\t(*eno_register_test)(efx_nic_t *);\n #endif\t/* EFSYS_OPT_DIAG */\ndiff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c\nindex 22e464a4e..e5cb0105f 100644\n--- a/drivers/net/sfc/base/efx_nic.c\n+++ b/drivers/net/sfc/base/efx_nic.c\n@@ -101,6 +101,7 @@ static const efx_nic_ops_t\t__efx_nic_siena_ops = {\n \tNULL,\t\t\t\t/* eno_get_vi_pool */\n \tNULL,\t\t\t\t/* eno_get_bar_region */\n \tNULL,\t\t\t\t/* eno_hw_unavailable */\n+\tNULL,\t\t\t\t/* eno_set_hw_unavailable */\n #if EFSYS_OPT_DIAG\n \tsiena_nic_register_test,\t/* eno_register_test */\n #endif\t/* EFSYS_OPT_DIAG */\n@@ -121,6 +122,7 @@ static const efx_nic_ops_t\t__efx_nic_hunt_ops = {\n \tef10_nic_get_vi_pool,\t\t/* eno_get_vi_pool */\n \tef10_nic_get_bar_region,\t/* eno_get_bar_region */\n \tef10_nic_hw_unavailable,\t/* eno_hw_unavailable */\n+\tef10_nic_set_hw_unavailable,\t/* eno_set_hw_unavailable */\n #if EFSYS_OPT_DIAG\n \tef10_nic_register_test,\t\t/* eno_register_test */\n #endif\t/* EFSYS_OPT_DIAG */\n@@ -141,6 +143,7 @@ static const efx_nic_ops_t\t__efx_nic_medford_ops = {\n \tef10_nic_get_vi_pool,\t\t/* eno_get_vi_pool */\n \tef10_nic_get_bar_region,\t/* eno_get_bar_region */\n \tef10_nic_hw_unavailable,\t/* eno_hw_unavailable */\n+\tef10_nic_set_hw_unavailable,\t/* eno_set_hw_unavailable */\n #if EFSYS_OPT_DIAG\n \tef10_nic_register_test,\t\t/* eno_register_test */\n #endif\t/* EFSYS_OPT_DIAG */\n@@ -161,6 +164,7 @@ static const efx_nic_ops_t\t__efx_nic_medford2_ops = {\n \tef10_nic_get_vi_pool,\t\t/* eno_get_vi_pool */\n \tef10_nic_get_bar_region,\t/* eno_get_bar_region */\n \tef10_nic_hw_unavailable,\t/* eno_hw_unavailable */\n+\tef10_nic_set_hw_unavailable,\t/* eno_set_hw_unavailable */\n #if EFSYS_OPT_DIAG\n \tef10_nic_register_test,\t\t/* eno_register_test */\n #endif\t/* EFSYS_OPT_DIAG */\n@@ -673,11 +677,21 @@ efx_nic_hw_unavailable(\n \treturn (B_FALSE);\n \n unavail:\n-\tEFSYS_PROBE(hw_unavail);\n-\n \treturn (B_TRUE);\n }\n \n+\t\t\tvoid\n+efx_nic_set_hw_unavailable(\n+\t__in\t\tefx_nic_t *enp)\n+{\n+\tconst efx_nic_ops_t *enop = enp->en_enop;\n+\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\n+\tif (enop->eno_set_hw_unavailable != NULL)\n+\t\tenop->eno_set_hw_unavailable(enp);\n+}\n+\n \n #if EFSYS_OPT_DIAG\n \n",
    "prefixes": [
        "25/37"
    ]
}