get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17272,
    "url": "https://patches.dpdk.org/api/patches/17272/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1480239317-7827-1-git-send-email-jingjing.wu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1480239317-7827-1-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1480239317-7827-1-git-send-email-jingjing.wu@intel.com",
    "date": "2016-11-27T09:35:17",
    "name": "[dpdk-dev] net/i40evf: fix casting between structs",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "d42c280a71ccd30654b41775b481a3aef1835a43",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1480239317-7827-1-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17272/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/17272/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id DD17E316B;\n\tSun, 27 Nov 2016 10:35:53 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 4AD6E2BD8\n\tfor <dev@dpdk.org>; Sun, 27 Nov 2016 10:35:51 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP; 27 Nov 2016 01:35:51 -0800",
            "from dpdk2.sh.intel.com ([10.239.128.246])\n\tby fmsmga006.fm.intel.com with ESMTP; 27 Nov 2016 01:35:50 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,705,1473145200\"; d=\"scan'208\";a=\"36060157\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jingjing.wu@intel.com,\n\thelin.zhang@intel.com",
        "Date": "Sun, 27 Nov 2016 17:35:17 +0800",
        "Message-Id": "<1480239317-7827-1-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 2.4.11",
        "Subject": "[dpdk-dev] [PATCH] net/i40evf: fix casting between structs",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Casting from structs which lay out data in typed members\nto structs which have flat memory buffers, will cause\nproblems if the alignment of the former isn't as expected.\nThis patch removes the casting between structs.\n\nFixes: ae19955e7c86 (\"i40evf: support reporting PF reset\")\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n drivers/net/i40e/i40e_ethdev_vf.c | 27 +++++++++++++++------------\n 1 file changed, 15 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c\nindex aa306d6..53d7c87 100644\n--- a/drivers/net/i40e/i40e_ethdev_vf.c\n+++ b/drivers/net/i40e/i40e_ethdev_vf.c\n@@ -1336,8 +1336,9 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)\n \tstruct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n \tstruct i40e_arq_event_info info;\n-\tstruct i40e_virtchnl_msg *v_msg;\n-\tuint16_t pending, opcode;\n+\tuint16_t pending, aq_opc;\n+\tenum i40e_virtchnl_ops msg_opc;\n+\tenum i40e_status_code msg_ret;\n \tint ret;\n \n \tinfo.buf_len = I40E_AQ_BUF_SZ;\n@@ -1346,7 +1347,6 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)\n \t\treturn;\n \t}\n \tinfo.msg_buf = vf->aq_resp;\n-\tv_msg = (struct i40e_virtchnl_msg *)&info.desc;\n \n \tpending = 1;\n \twhile (pending) {\n@@ -1357,32 +1357,35 @@ i40evf_handle_aq_msg(struct rte_eth_dev *dev)\n \t\t\t\t    \"ret: %d\", ret);\n \t\t\tbreak;\n \t\t}\n-\t\topcode = rte_le_to_cpu_16(info.desc.opcode);\n-\n-\t\tswitch (opcode) {\n+\t\taq_opc = rte_le_to_cpu_16(info.desc.opcode);\n+\t\tmsg_opc = (enum i40e_virtchnl_ops)rte_le_to_cpu_32(\n+\t\t\t\t\t\t  info.desc.cookie_high);\n+\t\tmsg_ret = (enum i40e_status_code)rte_le_to_cpu_32(\n+\t\t\t\t\t\t  info.desc.cookie_low);\n+\t\tswitch (aq_opc) {\n \t\tcase i40e_aqc_opc_send_msg_to_vf:\n-\t\t\tif (v_msg->v_opcode == I40E_VIRTCHNL_OP_EVENT)\n+\t\t\tif (msg_opc == I40E_VIRTCHNL_OP_EVENT)\n \t\t\t\t/* process event*/\n \t\t\t\ti40evf_handle_pf_event(dev, info.msg_buf,\n \t\t\t\t\t\t       info.msg_len);\n \t\t\telse {\n \t\t\t\t/* read message and it's expected one */\n-\t\t\t\tif (v_msg->v_opcode == vf->pend_cmd) {\n-\t\t\t\t\tvf->cmd_retval = v_msg->v_retval;\n+\t\t\t\tif (msg_opc == vf->pend_cmd) {\n+\t\t\t\t\tvf->cmd_retval = msg_ret;\n \t\t\t\t\t/* prevent compiler reordering */\n \t\t\t\t\trte_compiler_barrier();\n \t\t\t\t\t_clear_cmd(vf);\n \t\t\t\t} else\n \t\t\t\t\tPMD_DRV_LOG(ERR, \"command mismatch,\"\n \t\t\t\t\t\t\"expect %u, get %u\",\n-\t\t\t\t\t\tvf->pend_cmd, v_msg->v_opcode);\n+\t\t\t\t\t\tvf->pend_cmd, msg_ret);\n \t\t\t\tPMD_DRV_LOG(DEBUG, \"adminq response is received,\"\n-\t\t\t\t\t     \" opcode = %d\\n\", v_msg->v_opcode);\n+\t\t\t\t\t     \" opcode = %d\\n\", msg_ret);\n \t\t\t}\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tPMD_DRV_LOG(ERR, \"Request %u is not supported yet\",\n-\t\t\t\t    opcode);\n+\t\t\t\t    aq_opc);\n \t\t\tbreak;\n \t\t}\n \t}\n",
    "prefixes": [
        "dpdk-dev"
    ]
}