get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64319,
    "url": "http://patches.dpdk.org/api/patches/64319/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-9-huwei013@chinasoftinc.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": "<20200109031559.63194-9-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109031559.63194-9-huwei013@chinasoftinc.com",
    "date": "2020-01-09T03:15:56",
    "name": "[08/11] net/hns3: fix ring vector related mailbox command format",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b6c37fe314daa23f73bbb7206823d6d901424174",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.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/20200109031559.63194-9-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 8023,
            "url": "http://patches.dpdk.org/api/series/8023/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8023",
            "date": "2020-01-09T03:15:48",
            "name": "misc updates and fixes for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8023/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64319/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64319/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 F11E1A04F3;\n\tThu,  9 Jan 2020 04:24:37 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EBFCF1DB66;\n\tThu,  9 Jan 2020 04:23:48 +0100 (CET)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id F085D1DB41\n for <dev@dpdk.org>; Thu,  9 Jan 2020 04:23:40 +0100 (CET)",
            "from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by\n incedge.chinasoftinc.com with ESMTP id E5pqtEX0XNFgCtV8 (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@dpdk.org>;\n Thu, 09 Jan 2020 11:22:50 +0800 (CST)",
            "from localhost.localdomain (203.160.91.226) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Thu, 9 Jan 2020\n 11:16:13 +0800"
        ],
        "X-ASG-Debug-ID": "1578539661-0a3dd116cf04580010-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.52",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Thu, 9 Jan 2020 11:15:56 +0800",
        "X-ASG-Orig-Subj": "[PATCH 08/11] net/hns3: fix ring vector related mailbox\n command format",
        "Message-ID": "<20200109031559.63194-9-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "References": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[203.160.91.226]",
        "X-Barracuda-Connect": "inccas002.ito.icss[10.168.0.52]",
        "X-Barracuda-Start-Time": "1578540170",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "2452",
        "Subject": "[dpdk-dev] [PATCH 08/11] net/hns3: fix ring vector related mailbox\n\tcommand format",
        "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": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nThe format of the ring vector related mailbox commands between driver and\nfirmware is different from those of other mailbox commands in hns3 network\nengine.\n\nThis patch fixes the error mailbox command format about the vector of the\nrings, the related command opcode as below:\nHNS3_MBX_MAP_RING_TO_VECTOR\nHNS3_MBX_UNMAP_RING_TO_VECTOR\nHNS3_MBX_GET_RING_VECTOR_MAP\n\nFixes: 463e748964f5 (\"net/hns3: support mailbox\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_mbx.c | 14 +++++++++++---\n drivers/net/hns3/hns3_mbx.h |  1 +\n 2 files changed, 12 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c\nindex 26807bc4b..0d03f5064 100644\n--- a/drivers/net/hns3/hns3_mbx.c\n+++ b/drivers/net/hns3/hns3_mbx.c\n@@ -150,6 +150,8 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,\n {\n \tstruct hns3_mbx_vf_to_pf_cmd *req;\n \tstruct hns3_cmd_desc desc;\n+\tbool is_ring_vector_msg;\n+\tint offset;\n \tint ret;\n \n \treq = (struct hns3_mbx_vf_to_pf_cmd *)desc.data;\n@@ -164,9 +166,15 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,\n \n \thns3_cmd_setup_basic_desc(&desc, HNS3_OPC_MBX_VF_TO_PF, false);\n \treq->msg[0] = code;\n-\treq->msg[1] = subcode;\n-\tif (msg_data)\n-\t\tmemcpy(&req->msg[HNS3_CMD_CODE_OFFSET], msg_data, msg_len);\n+\tis_ring_vector_msg = (code == HNS3_MBX_MAP_RING_TO_VECTOR) ||\n+\t\t\t     (code == HNS3_MBX_UNMAP_RING_TO_VECTOR) ||\n+\t\t\t     (code == HNS3_MBX_GET_RING_VECTOR_MAP);\n+\tif (!is_ring_vector_msg)\n+\t\treq->msg[1] = subcode;\n+\tif (msg_data) {\n+\t\toffset = is_ring_vector_msg ? 1 : HNS3_CMD_CODE_OFFSET;\n+\t\tmemcpy(&req->msg[offset], msg_data, msg_len);\n+\t}\n \n \t/* synchronous send */\n \tif (need_resp) {\ndiff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h\nindex 3722c8760..b01eaacc3 100644\n--- a/drivers/net/hns3/hns3_mbx.h\n+++ b/drivers/net/hns3/hns3_mbx.h\n@@ -41,6 +41,7 @@ enum HNS3_MBX_OPCODE {\n \tHNS3_MBX_GET_QID_IN_PF,         /* (VF -> PF) get queue id in pf */\n \n \tHNS3_MBX_HANDLE_VF_TBL = 38,    /* (VF -> PF) store/clear hw cfg tbl */\n+\tHNS3_MBX_GET_RING_VECTOR_MAP,   /* (VF -> PF) get ring-to-vector map */\n \tHNS3_MBX_PUSH_LINK_STATUS = 201, /* (IMP -> PF) get port link status */\n };\n \n",
    "prefixes": [
        "08/11"
    ]
}