get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66484,
    "url": "http://patches.dpdk.org/api/patches/66484/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200310065029.40966-5-haiyue.wang@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": "<20200310065029.40966-5-haiyue.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200310065029.40966-5-haiyue.wang@intel.com",
    "date": "2020-03-10T06:50:26",
    "name": "[v2,4/7] net/ice: handle the AdminQ command by DCF",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "82257da6aaf12b1332541251065de474674066df",
    "submitter": {
        "id": 1044,
        "url": "http://patches.dpdk.org/api/people/1044/?format=api",
        "name": "Wang, Haiyue",
        "email": "haiyue.wang@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/20200310065029.40966-5-haiyue.wang@intel.com/mbox/",
    "series": [
        {
            "id": 8859,
            "url": "http://patches.dpdk.org/api/series/8859/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8859",
            "date": "2020-03-10T06:50:22",
            "name": "add Intel DCF PMD support",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8859/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66484/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66484/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 E7EE8A0563;\n\tTue, 10 Mar 2020 07:59:04 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 053B41C030;\n\tTue, 10 Mar 2020 07:58:29 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 533A81C011\n for <dev@dpdk.org>; Tue, 10 Mar 2020 07:58:26 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 09 Mar 2020 23:58:25 -0700",
            "from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.213])\n by orsmga001.jf.intel.com with ESMTP; 09 Mar 2020 23:58: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,518,1574150400\"; d=\"scan'208\";a=\"321693959\"",
        "From": "Haiyue Wang <haiyue.wang@intel.com>",
        "To": "dev@dpdk.org, xiaolong.ye@intel.com, qi.z.zhang@intel.com,\n qiming.yang@intel.com, beilei.xing@intel.com",
        "Cc": "wei.zhao1@intel.com,\n\tHaiyue Wang <haiyue.wang@intel.com>",
        "Date": "Tue, 10 Mar 2020 14:50:26 +0800",
        "Message-Id": "<20200310065029.40966-5-haiyue.wang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200310065029.40966-1-haiyue.wang@intel.com>",
        "References": "<20200309141437.11800-1-haiyue.wang@intel.com>\n <20200310065029.40966-1-haiyue.wang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 4/7] net/ice: handle the AdminQ command by DCF",
        "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": "The DCF (Device Config Function) splits the AdminQ command into two\nparts: one is the descriptor of AdminQ command, the other is the buffer\nof AdminQ command (the descriptor has BUF flag set). When both of them\nare received by the PF, the PF will handle them as one command.\n\nAnd also, the filled descriptor and buffer of the response will be sent\nback to DCF one by one through the virtchnl from PF.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/net/ice/ice_dcf.c | 65 +++++++++++++++++++++++++++++++++++++++\n drivers/net/ice/ice_dcf.h |  4 ++-\n 2 files changed, 68 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 7a3626939..24ed31f35 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -397,6 +397,71 @@ ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw,\n \treturn err;\n }\n \n+int\n+ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,\n+\t\t    void *buf, uint16_t buf_size)\n+{\n+\tstruct dcf_virtchnl_cmd desc_cmd, buff_cmd;\n+\tstruct ice_dcf_hw *hw = dcf_hw;\n+\tint err = 0;\n+\tint i = 0;\n+\n+\tif ((buf && !buf_size) || (!buf && buf_size) ||\n+\t    buf_size > ICE_DCF_AQ_BUF_SZ)\n+\t\treturn -EINVAL;\n+\n+\tdesc_cmd.v_op = VIRTCHNL_OP_DCF_CMD_DESC;\n+\tdesc_cmd.req_msglen = sizeof(*desc);\n+\tdesc_cmd.req_msg = (uint8_t *)desc;\n+\tdesc_cmd.rsp_buflen = sizeof(*desc);\n+\tdesc_cmd.rsp_msgbuf = (uint8_t *)desc;\n+\n+\tif (buf == NULL)\n+\t\treturn ice_dcf_execute_virtchnl_cmd(hw, &desc_cmd);\n+\n+\tdesc->flags |= rte_cpu_to_le_16(ICE_AQ_FLAG_BUF);\n+\n+\tbuff_cmd.v_op = VIRTCHNL_OP_DCF_CMD_BUFF;\n+\tbuff_cmd.req_msglen = buf_size;\n+\tbuff_cmd.req_msg = buf;\n+\tbuff_cmd.rsp_buflen = buf_size;\n+\tbuff_cmd.rsp_msgbuf = buf;\n+\n+\trte_spinlock_lock(&hw->vc_cmd_send_lock);\n+\tice_dcf_vc_cmd_set(hw, &desc_cmd);\n+\tice_dcf_vc_cmd_set(hw, &buff_cmd);\n+\n+\tif (ice_dcf_vc_cmd_send(hw, &desc_cmd) ||\n+\t    ice_dcf_vc_cmd_send(hw, &buff_cmd)) {\n+\t\terr = -1;\n+\t\tPMD_DRV_LOG(ERR, \"fail to send OP_DCF_CMD_DESC/BUFF\");\n+\t\tgoto ret;\n+\t}\n+\n+\tdo {\n+\t\tif ((!desc_cmd.pending && !buff_cmd.pending) ||\n+\t\t    (!desc_cmd.pending && desc_cmd.v_ret != IAVF_SUCCESS) ||\n+\t\t    (!buff_cmd.pending && buff_cmd.v_ret != IAVF_SUCCESS))\n+\t\t\tbreak;\n+\n+\t\trte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);\n+\t} while (i++ < ICE_DCF_ARQ_MAX_RETRIES);\n+\n+\tif (desc_cmd.v_ret != IAVF_SUCCESS || buff_cmd.v_ret != IAVF_SUCCESS) {\n+\t\terr = -1;\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"No response (%d times) or return failure (desc: %d / buff: %d)\",\n+\t\t\t    i, desc_cmd.v_ret, buff_cmd.v_ret);\n+\t}\n+\n+ret:\n+\tice_dcf_aq_cmd_clear(hw, &desc_cmd);\n+\tice_dcf_aq_cmd_clear(hw, &buff_cmd);\n+\trte_spinlock_unlock(&hw->vc_cmd_send_lock);\n+\n+\treturn err;\n+}\n+\n int\n ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)\n {\ndiff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h\nindex f44c09db2..99bd53b02 100644\n--- a/drivers/net/ice/ice_dcf.h\n+++ b/drivers/net/ice/ice_dcf.h\n@@ -11,6 +11,7 @@\n #include <iavf_adminq_cmd.h>\n #include <iavf_type.h>\n \n+#include \"base/ice_type.h\"\n #include \"ice_logs.h\"\n \n struct dcf_virtchnl_cmd {\n@@ -45,7 +46,8 @@ struct ice_dcf_hw {\n \n int ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw,\n \t\t\t\t struct dcf_virtchnl_cmd *cmd);\n-\n+int ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,\n+\t\t\tvoid *buf, uint16_t buf_size);\n int ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw);\n void ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw);\n \n",
    "prefixes": [
        "v2",
        "4/7"
    ]
}