get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226,
    "url": "https://patches.dpdk.org/api/patches/2226/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421042352-22399-3-git-send-email-changchun.ouyang@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": "<1421042352-22399-3-git-send-email-changchun.ouyang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421042352-22399-3-git-send-email-changchun.ouyang@intel.com",
    "date": "2015-01-12T05:59:08",
    "name": "[dpdk-dev,v6,2/6] ixgbe: Negotiate VF API version",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "72d44dbf5d154a34939809de315f9319d4fc7a87",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/?format=api",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421042352-22399-3-git-send-email-changchun.ouyang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2226/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2226/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 552215A81;\n\tMon, 12 Jan 2015 06:59:49 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 7F1C05A85\n\tfor <dev@dpdk.org>; Mon, 12 Jan 2015 06:59:24 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga103.jf.intel.com with ESMTP; 11 Jan 2015 21:55:51 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 11 Jan 2015 21:59:23 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0C5xLDL023484;\n\tMon, 12 Jan 2015 13:59:21 +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 t0C5xICT022447; Mon, 12 Jan 2015 13:59:20 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0C5xIhM022443; \n\tMon, 12 Jan 2015 13:59:18 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,742,1413270000\"; d=\"scan'208\";a=\"649670796\"",
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 12 Jan 2015 13:59:08 +0800",
        "Message-Id": "<1421042352-22399-3-git-send-email-changchun.ouyang@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "In-Reply-To": "<1421042352-22399-1-git-send-email-changchun.ouyang@intel.com>",
        "References": "<1420612355-6666-1-git-send-email-changchun.ouyang@intel.com>\n\t<1421042352-22399-1-git-send-email-changchun.ouyang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 2/6] ixgbe: Negotiate VF API version",
        "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": "Negotiate API version with VF when receiving the IXGBE_VF_API_NEGOTIATE message.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe_ethdev.h |  1 +\n lib/librte_pmd_ixgbe/ixgbe_pf.c     | 25 +++++++++++++++++++++++++\n 2 files changed, 26 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.h b/lib/librte_pmd_ixgbe/ixgbe_ethdev.h\nindex ca99170..730098d 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.h\n+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.h\n@@ -159,6 +159,7 @@ struct ixgbe_vf_info {\n \tuint16_t tx_rate[IXGBE_MAX_QUEUE_NUM_PER_VF];\n \tuint16_t vlan_count;\n \tuint8_t spoofchk_enabled;\n+\tuint8_t api_version;\n };\n \n /*\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c b/lib/librte_pmd_ixgbe/ixgbe_pf.c\nindex 51da1fd..495aff5 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_pf.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c\n@@ -469,6 +469,28 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms\n }\n \n static int\n+ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)\n+{\n+\tuint32_t api_version = msgbuf[1];\n+\tstruct ixgbe_vf_info *vfinfo =\n+\t\t*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);\n+\n+\tswitch (api_version) {\n+\tcase ixgbe_mbox_api_10:\n+\tcase ixgbe_mbox_api_11:\n+\t\tvfinfo[vf].api_version = (uint8_t)api_version;\n+\t\treturn 0;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\n+\tRTE_LOG(ERR, PMD, \"Negotiate invalid api version %u from VF %d\\n\",\n+\t\tapi_version, vf);\n+\n+\treturn -1;\n+}\n+\n+static int\n ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n {\n \tuint16_t mbx_size = IXGBE_VFMAILBOX_SIZE;\n@@ -512,6 +534,9 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)\n \tcase IXGBE_VF_SET_VLAN:\n \t\tretval = ixgbe_vf_set_vlan(dev, vf, msgbuf);\n \t\tbreak;\n+\tcase IXGBE_VF_API_NEGOTIATE:\n+\t\tretval = ixgbe_negotiate_vf_api(dev, vf, msgbuf);\n+\t\tbreak;\n \tdefault:\n \t\tPMD_DRV_LOG(DEBUG, \"Unhandled Msg %8.8x\", (unsigned)msgbuf[0]);\n \t\tretval = IXGBE_ERR_MBX;\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "2/6"
    ]
}