get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57934,
    "url": "http://patches.dpdk.org/api/patches/57934/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-34-qi.z.zhang@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": "<20190826105105.19121-34-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190826105105.19121-34-qi.z.zhang@intel.com",
    "date": "2019-08-26T10:50:35",
    "name": "[33/63] net/ice/base: set status when global cfg lock is unavailable",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "203fe210580a71baed827c77a5bfbb6c1c7e618d",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190826105105.19121-34-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 6119,
            "url": "http://patches.dpdk.org/api/series/6119/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6119",
            "date": "2019-08-26T10:50:02",
            "name": "net/ice/base: update base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6119/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/57934/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/57934/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 262661C1A9;\n\tMon, 26 Aug 2019 12:50:35 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id ABACA1C0B3\n\tfor <dev@dpdk.org>; Mon, 26 Aug 2019 12:49:25 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Aug 2019 03:49:25 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n\tby orsmga003.jf.intel.com with ESMTP; 26 Aug 2019 03:49:23 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,431,1559545200\"; d=\"scan'208\";a=\"182402315\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "wenzhuo.lu@intel.com,\n\tqiming.yang@intel.com",
        "Cc": "dev@dpdk.org, xiaolong.ye@intel.com, Qi Zhang <qi.z.zhang@intel.com>,\n\tAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon, 26 Aug 2019 18:50:35 +0800",
        "Message-Id": "<20190826105105.19121-34-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "References": "<20190826105105.19121-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 33/63] net/ice/base: set status when global cfg\n\tlock is unavailable",
        "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": "To download the DDP file to the device, a PF first has to grab the\nglobal configuration lock. When a PF can't grab this lock, set\nhw->pkg_dwnld_status to ICE_AQ_RC_EEXIST.\n\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/ice/base/ice_flex_pipe.c | 15 ++++++++++++++-\n drivers/net/ice/base/ice_type.h      |  2 ++\n 2 files changed, 16 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 7daaf10b0..f8dd1c4d1 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -961,9 +961,19 @@ ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf *bufs, u32 count)\n \tif (LE32_TO_CPU(bh->section_entry[0].type) & ICE_METADATA_BUF)\n \t\treturn ICE_SUCCESS;\n \n+\t/* reset pkg_dwnld_status in case this function is called in the\n+\t * reset/rebuild flow\n+\t */\n+\thw->pkg_dwnld_status = ICE_AQ_RC_OK;\n+\n \tstatus = ice_acquire_global_cfg_lock(hw, ICE_RES_WRITE);\n-\tif (status)\n+\tif (status) {\n+\t\tif (status == ICE_ERR_AQ_NO_WORK)\n+\t\t\thw->pkg_dwnld_status = ICE_AQ_RC_EEXIST;\n+\t\telse\n+\t\t\thw->pkg_dwnld_status = hw->adminq.sq_last_status;\n \t\treturn status;\n+\t}\n \n \tfor (i = 0; i < count; i++) {\n \t\tbool last = ((i + 1) == count);\n@@ -986,6 +996,9 @@ ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf *bufs, u32 count)\n \n \t\tstatus = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE, last,\n \t\t\t\t\t     &offset, &info, NULL);\n+\n+\t\t/* Save AQ status from download package */\n+\t\thw->pkg_dwnld_status = hw->adminq.sq_last_status;\n \t\tif (status) {\n \t\t\tice_debug(hw, ICE_DBG_PKG,\n \t\t\t\t  \"Pkg download failed: err %d off %d inf %d\\n\",\ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex dc041760d..541e29851 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -775,6 +775,8 @@ struct ice_hw {\n \tu8 active_pkg_name[ICE_PKG_NAME_SIZE];\n \tu8 active_pkg_in_nvm;\n \n+\tenum ice_aq_err pkg_dwnld_status;\n+\n \t/* Driver's package ver - (from the Metadata seg) */\n \tstruct ice_pkg_ver pkg_ver;\n \tu8 pkg_name[ICE_PKG_NAME_SIZE];\n",
    "prefixes": [
        "33/63"
    ]
}