Show a patch.

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

{
    "id": 325,
    "url": "https://patches.dpdk.org/api/patches/325/?format=api",
    "web_url": "https://patches.dpdk.org/patch/325/",
    "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"
    },
    "msgid": "<1410247299-4365-16-git-send-email-helin.zhang@intel.com>",
    "date": "2014-09-09T07:21:39",
    "name": "[dpdk-dev,15/15] i40e: support redefined struct of 'i40e_arq_event_info'",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7091ee6d0b5700ddbfb00eb14b8489a0eb3da992",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Helin Zhang",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/325/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/325/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/325/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Message-Id": "<1410247299-4365-16-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "To": "dev@dpdk.org",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 117F96AB7;\n\tTue,  9 Sep 2014 09:17:24 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 2A0CFB399\n\tfor <dev@dpdk.org>; Tue,  9 Sep 2014 09:17:21 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 09 Sep 2014 00:22:25 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 09 Sep 2014 00:22:24 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s897MMql008898;\n\tTue, 9 Sep 2014 15:22:22 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s897MKbn004543; Tue, 9 Sep 2014 15:22:22 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s897MK9Q004539; \n\tTue, 9 Sep 2014 15:22:20 +0800"
        ],
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Subject": "[dpdk-dev] [PATCH 15/15] i40e: support redefined struct of\n\t'i40e_arq_event_info'",
        "In-Reply-To": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Date": "Tue,  9 Sep 2014 15:21:39 +0800",
        "X-ExtLoop1": "1",
        "Precedence": "list",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,491,1406617200\"; d=\"scan'208\";a=\"588396348\"",
        "References": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "As struct of 'i40e_arq_event_info' in share code has\nbeen redefined, relevant changes in PMD are needed to\nsupport that.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Chen Jing <jing.d.chen@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.c    |  8 +++-----\n lib/librte_pmd_i40e/i40e_ethdev_vf.c | 10 +++++-----\n 2 files changed, 8 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c\nindex 4e65ca4..ed73389 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.c\n@@ -3334,8 +3334,8 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)\n \tuint16_t pending, opcode;\n \tint ret;\n \n-\tinfo.msg_size = I40E_AQ_BUF_SZ;\n-\tinfo.msg_buf = rte_zmalloc(\"msg_buffer\", I40E_AQ_BUF_SZ, 0);\n+\tinfo.buf_len = I40E_AQ_BUF_SZ;\n+\tinfo.msg_buf = rte_zmalloc(\"msg_buffer\", info.buf_len, 0);\n \tif (!info.msg_buf) {\n \t\tPMD_DRV_LOG(ERR, \"Failed to allocate mem\\n\");\n \t\treturn;\n@@ -3360,15 +3360,13 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)\n \t\t\t\t\trte_le_to_cpu_32(info.desc.cookie_high),\n \t\t\t\t\trte_le_to_cpu_32(info.desc.cookie_low),\n \t\t\t\t\tinfo.msg_buf,\n-\t\t\t\t\tinfo.msg_size);\n+\t\t\t\t\tinfo.msg_len);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tPMD_DRV_LOG(ERR, \"Request %u is not supported yet\\n\",\n \t\t\t\topcode);\n \t\t\tbreak;\n \t\t}\n-\t\t/* Reset the buffer after processing one */\n-\t\tinfo.msg_size = I40E_AQ_BUF_SZ;\n \t}\n \trte_free(info.msg_buf);\n }\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\nindex d8552ad..b639486 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n@@ -78,6 +78,7 @@\n struct i40evf_arq_msg_info {\n \tenum i40e_virtchnl_ops ops;\n \tenum i40e_status_code result;\n+\tuint16_t buf_len;\n \tuint16_t msg_len;\n \tuint8_t *msg;\n };\n@@ -226,8 +227,8 @@ i40evf_parse_pfmsg(struct i40e_vf *vf,\n \t} else {\n \t\t/* async reply msg on command issued by vf previously */\n \t\tret = I40EVF_MSG_CMD;\n-\t\t/* Actual buffer length read from PF */\n-\t\tdata->msg_len = event->msg_size;\n+\t\t/* Actual data length read from PF */\n+\t\tdata->msg_len = event->msg_len;\n \t}\n \t/* fill the ops and result to notify VF */\n \tdata->result = retval;\n@@ -248,7 +249,7 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)\n \tint ret;\n \tenum i40evf_aq_result result = I40EVF_MSG_NON;\n \n-\tevent.msg_size = data->msg_len;\n+\tevent.buf_len = data->buf_len;\n \tevent.msg_buf = data->msg;\n \tret = i40e_clean_arq_element(hw, &event, NULL);\n \t/* Can't read any msg from adminQ */\n@@ -282,7 +283,6 @@ i40evf_wait_cmd_done(struct rte_eth_dev *dev,\n \t\t/* Delay some time first */\n \t\trte_delay_ms(ASQ_DELAY_MS);\n \t\tret = i40evf_read_pfmsg(dev, data);\n-\n \t\tif (ret == I40EVF_MSG_CMD)\n \t\t\treturn 0;\n \t\telse if (ret == I40EVF_MSG_ERR)\n@@ -332,7 +332,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)\n \t\treturn -1;\n \n \tinfo.msg = args->out_buffer;\n-\tinfo.msg_len = args->out_size;\n+\tinfo.buf_len = args->out_size;\n \tinfo.ops = I40E_VIRTCHNL_OP_UNKNOWN;\n \tinfo.result = I40E_SUCCESS;\n \n",
    "prefixes": [
        "dpdk-dev",
        "15/15"
    ]
}