get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1162,
    "url": "https://patches.dpdk.org/api/patches/1162/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1415278430-17920-3-git-send-email-helin.zhang@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": "<1415278430-17920-3-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1415278430-17920-3-git-send-email-helin.zhang@intel.com",
    "date": "2014-11-06T12:53:47",
    "name": "[dpdk-dev,v3,2/5] i40evf: Remove 'host_is_dpdk', and use version number instead",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9aa6911d3e898c27553173a94a1b8a396d70f6b6",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1415278430-17920-3-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1162/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1162/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 446897F39;\n\tThu,  6 Nov 2014 13:44:53 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id EC2317F48\n\tfor <dev@dpdk.org>; Thu,  6 Nov 2014 13:44:49 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 06 Nov 2014 04:54:06 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 06 Nov 2014 04:54:04 -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 sA6Cs2HP010536;\n\tThu, 6 Nov 2014 20:54:02 +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 sA6Cs0RX017968; Thu, 6 Nov 2014 20:54:02 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sA6Cs0Aj017964; \n\tThu, 6 Nov 2014 20:54:00 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,325,1413270000\"; d=\"scan'208\";a=\"603420981\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu,  6 Nov 2014 20:53:47 +0800",
        "Message-Id": "<1415278430-17920-3-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1415278430-17920-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1410706109-30448-1-git-send-email-helin.zhang@intel.com>\n\t<1415278430-17920-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 2/5] i40evf: Remove 'host_is_dpdk',\n\tand use version number instead",
        "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": "API version number is straightfoward enough for checking\nthe PF host, and no need to use 'host_is_dpdk'.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_i40e/i40e_ethdev.h    |  3 ++-\n lib/librte_pmd_i40e/i40e_ethdev_vf.c | 29 +++++++++++++++--------------\n 2 files changed, 17 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e_ethdev.h b/lib/librte_pmd_i40e/i40e_ethdev.h\nindex afa14aa..96361c2 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev.h\n+++ b/lib/librte_pmd_i40e/i40e_ethdev.h\n@@ -323,7 +323,8 @@ struct i40e_vf {\n \tbool promisc_unicast_enabled;\n \tbool promisc_multicast_enabled;\n \n-\tbool host_is_dpdk; /* The flag indicates if the host is DPDK */\n+\tuint32_t version_major; /* Major version number */\n+\tuint32_t version_minor; /* Minor version number */\n \tuint16_t promisc_flags; /* Promiscuous setting */\n \tuint32_t vlan[I40E_VFTA_SIZE]; /* VLAN bit map */\n \ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\nindex fa838e6..966f02f 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n@@ -393,17 +393,18 @@ i40evf_check_api_version(struct rte_eth_dev *dev)\n \t}\n \n \tpver = (struct i40e_virtchnl_version_info *)args.out_buffer;\n-\t/* We are talking with DPDK host */\n-\tif (pver->major == I40E_DPDK_VERSION_MAJOR) {\n-\t\tvf->host_is_dpdk = TRUE;\n-\t\tPMD_DRV_LOG(INFO, \"Detect PF host is DPDK app\");\n-\t}\n-\t/* It's linux host driver */\n-\telse if ((pver->major != version.major) ||\n-\t    (pver->minor != version.minor)) {\n-\t\tPMD_INIT_LOG(ERR, \"pf/vf API version mismatch. \"\n-\t\t\t     \"(%u.%u)-(%u.%u)\", pver->major, pver->minor,\n-\t\t\t     version.major, version.minor);\n+\tvf->version_major = pver->major;\n+\tvf->version_minor = pver->minor;\n+\tif (vf->version_major == I40E_DPDK_VERSION_MAJOR)\n+\t\tPMD_DRV_LOG(INFO, \"Peer is DPDK PF host\");\n+\telse if ((vf->version_major == I40E_VIRTCHNL_VERSION_MAJOR) &&\n+\t\t(vf->version_minor == I40E_VIRTCHNL_VERSION_MINOR))\n+\t\tPMD_DRV_LOG(INFO, \"Peer is Linux PF host\");\n+\telse {\n+\t\tPMD_INIT_LOG(ERR, \"PF/VF API version mismatch:(%u.%u)-(%u.%u)\",\n+\t\t\t\t\tvf->version_major, vf->version_minor,\n+\t\t\t\t\t\tI40E_VIRTCHNL_VERSION_MAJOR,\n+\t\t\t\t\t\tI40E_VIRTCHNL_VERSION_MINOR);\n \t\treturn -1;\n \t}\n \n@@ -1182,7 +1183,7 @@ i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)\n \tstruct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n \n \t/* Linux pf host doesn't support vlan offload yet */\n-\tif (vf->host_is_dpdk) {\n+\tif (vf->version_major == I40E_DPDK_VERSION_MAJOR) {\n \t\t/* Vlan stripping setting */\n \t\tif (mask & ETH_VLAN_STRIP_MASK) {\n \t\t\t/* Enable or disable VLAN stripping */\n@@ -1207,7 +1208,7 @@ i40evf_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)\n \tinfo.on = on;\n \n \t/* Linux pf host don't support vlan offload yet */\n-\tif (vf->host_is_dpdk) {\n+\tif (vf->version_major == I40E_DPDK_VERSION_MAJOR) {\n \t\tif (info.on)\n \t\t\tinfo.config.pvid = pvid;\n \t\telse {\n@@ -1480,7 +1481,7 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,\n \t * DPDK pf host provide interfacet to acquire link status\n \t * while Linux driver does not\n \t */\n-\tif (vf->host_is_dpdk)\n+\tif (vf->version_major == I40E_DPDK_VERSION_MAJOR)\n \t\ti40evf_get_link_status(dev, &new_link);\n \telse {\n \t\t/* Always assume it's up, for Linux driver PF host */\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "2/5"
    ]
}