get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66444,
    "url": "http://patches.dpdk.org/api/patches/66444/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200309114357.31800-28-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": "<20200309114357.31800-28-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200309114357.31800-28-qi.z.zhang@intel.com",
    "date": "2020-03-09T11:43:56",
    "name": "[27/28] net/ice/base: add the hook to send AdminQ command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4f8771c6028761d71a4a6c6995e9bdd81431a6b2",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200309114357.31800-28-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 8843,
            "url": "http://patches.dpdk.org/api/series/8843/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8843",
            "date": "2020-03-09T11:43:29",
            "name": "update ice base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8843/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66444/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66444/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 8ADCBA052E;\n\tMon,  9 Mar 2020 12:45:04 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 961EE1C1D0;\n\tMon,  9 Mar 2020 12:41:28 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id D45171C1C9\n for <dev@dpdk.org>; Mon,  9 Mar 2020 12:41:25 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 09 Mar 2020 04:41:25 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.245])\n by fmsmga002.fm.intel.com with ESMTP; 09 Mar 2020 04:41: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.70,533,1574150400\"; d=\"scan'208\";a=\"276483668\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "qiming.yang@intel.com,\n\tbeilei.xing@intel.com",
        "Cc": "xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Haiyue Wang <haiyue.wang@intel.com>,\n Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon,  9 Mar 2020 19:43:56 +0800",
        "Message-Id": "<20200309114357.31800-28-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20200309114357.31800-1-qi.z.zhang@intel.com>",
        "References": "<20200309114357.31800-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 27/28] net/ice/base: add the hook to send AdminQ\n\tcommand",
        "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": "Add the hook to send the PF's AdminQ command in another path, like not\ndirectly to the firmware.\n\nIf the AdminQ command is sent through the hook path, it needs to save\nthe AQ error codes from firmware as the last status for admin control\nqueue, so that the AdminQ command function can use it to do exception\nhandling like the buffer size is not enough accorindg to error ENOMEM.\n\nAnd convert explicitly the hook path result to the ice_status type.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@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_common.c | 22 ++++++++++++++++++++++\n drivers/net/ice/base/ice_type.h   |  4 ++++\n 2 files changed, 26 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex 709d8b95a..14c923701 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -1315,6 +1315,28 @@ enum ice_status\n ice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf,\n \t\tu16 buf_size, struct ice_sq_cd *cd)\n {\n+\tif (hw->aq_send_cmd_fn) {\n+\t\tenum ice_status status = ICE_ERR_NOT_READY;\n+\t\tu16 retval = ICE_AQ_RC_OK;\n+\n+\t\tice_acquire_lock(&hw->adminq.sq_lock);\n+\t\tif (!hw->aq_send_cmd_fn(hw->aq_send_cmd_param, desc,\n+\t\t\t\t\tbuf, buf_size)) {\n+\t\t\tretval = LE16_TO_CPU(desc->retval);\n+\t\t\t/* strip off FW internal code */\n+\t\t\tif (retval)\n+\t\t\t\tretval &= 0xff;\n+\t\t\tif (retval == ICE_AQ_RC_OK)\n+\t\t\t\tstatus = ICE_SUCCESS;\n+\t\t\telse\n+\t\t\t\tstatus = ICE_ERR_AQ_ERROR;\n+\t\t}\n+\n+\t\thw->adminq.sq_last_status = (enum ice_aq_err)retval;\n+\t\tice_release_lock(&hw->adminq.sq_lock);\n+\n+\t\treturn status;\n+\t}\n \treturn ice_sq_send_cmd(hw, &hw->adminq, desc, buf, buf_size, cd);\n }\n \ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex 127e8224d..478940225 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -818,6 +818,10 @@ struct ice_hw {\n \t/* Control Queue info */\n \tstruct ice_ctl_q_info adminq;\n \tstruct ice_ctl_q_info mailboxq;\n+\t/* Additional function to send AdminQ command */\n+\tint (*aq_send_cmd_fn)(void *param, struct ice_aq_desc *desc,\n+\t\t\t      void *buf, u16 buf_size);\n+\tvoid *aq_send_cmd_param;\n \n \tu8 api_branch;\t\t/* API branch version */\n \tu8 api_maj_ver;\t\t/* API major version */\n",
    "prefixes": [
        "27/28"
    ]
}