get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18065,
    "url": "http://patches.dpdk.org/api/patches/18065/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20161216143919.4909-15-ferruh.yigit@intel.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": "<20161216143919.4909-15-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20161216143919.4909-15-ferruh.yigit@intel.com",
    "date": "2016-12-16T14:39:04",
    "name": "[dpdk-dev,v4,14/29] net/i40e: add set VF VLAN insert function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "44ba785af1f561d164115ecf8cb9abd25e146fe7",
    "submitter": {
        "id": 324,
        "url": "http://patches.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.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/20161216143919.4909-15-ferruh.yigit@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/18065/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/18065/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 2003EFA4B;\n\tFri, 16 Dec 2016 15:41:49 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id F0557FA47\n\tfor <dev@dpdk.org>; Fri, 16 Dec 2016 15:41:47 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga102.fm.intel.com with ESMTP; 16 Dec 2016 06:41:47 -0800",
            "from sivswdev02.ir.intel.com ([10.237.217.46])\n\tby fmsmga005.fm.intel.com with ESMTP; 16 Dec 2016 06:41:46 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,358,1477983600\"; d=\"scan'208\";a=\"43277775\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Jingjing Wu <jingjing.wu@intel.com>; Helin Zhang <helin.zhang@intel.com>,\n\tBernard Iremonger <bernard.iremonger@intel.com>",
        "Date": "Fri, 16 Dec 2016 14:39:04 +0000",
        "Message-Id": "<20161216143919.4909-15-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20161216143919.4909-1-ferruh.yigit@intel.com>",
        "References": "<1481835919-36488-1-git-send-email-qi.z.zhang@intel.com>\n\t<20161216143919.4909-1-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 14/29] net/i40e: add set VF VLAN insert\n\tfunction",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "From: Bernard Iremonger <bernard.iremonger@intel.com>\n\nSupport inserting VF VLAN id from PF.\nUser can call the API on PF to insert a VLAN id to a\nspecific VF.\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c            | 53 +++++++++++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h           | 19 +++++++++++\n drivers/net/i40e/rte_pmd_i40e_version.map |  1 +\n 3 files changed, 73 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex ae8d678..41663a2 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -10255,3 +10255,56 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)\n \telse\n \t\treturn -EINVAL;\n }\n+\n+int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,\n+\t\t\t\t    uint16_t vlan_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct rte_eth_dev_info dev_info;\n+\tstruct i40e_pf *pf;\n+\tstruct i40e_pf_vf *vf;\n+\tstruct i40e_hw *hw;\n+\tstruct i40e_vsi *vsi;\n+\tstruct i40e_vsi_context ctxt;\n+\tint ret;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\trte_eth_dev_info_get(port, &dev_info);\n+\n+\tpf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\thw = I40E_PF_TO_HW(pf);\n+\n+\t/**\n+\t * return -ENODEV if SRIOV not enabled, VF number not configured\n+\t * or no queue assigned.\n+\t */\n+\tif (!hw->func_caps.sr_iov_1_1 || pf->vf_num == 0 ||\n+\t    pf->vf_nb_qps == 0)\n+\t\treturn -ENODEV;\n+\n+\tif (vf_id >= pf->vf_num || !pf->vfs)\n+\t\treturn -EINVAL;\n+\n+\tif (vlan_id > ETHER_MAX_VLAN_ID)\n+\t\treturn -EINVAL;\n+\n+\tvf = &pf->vfs[vf_id];\n+\tvsi = vf->vsi;\n+\n+\tvsi->info.valid_sections = cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID);\n+\tvsi->info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_INSERT_PVID;\n+\tvsi->info.pvid = vlan_id;\n+\n+\tmemset(&ctxt, 0, sizeof(ctxt));\n+\t(void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));\n+\tctxt.seid = vsi->seid;\n+\n+\thw = I40E_VSI_TO_HW(vsi);\n+\tret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);\n+\tif (ret != I40E_SUCCESS)\n+\t\tPMD_DRV_LOG(ERR, \"Failed to update VSI params\");\n+\n+\treturn ret;\n+}\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex cea1192..0c364f8 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -206,4 +206,23 @@ int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,\n int\n rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);\n \n+/**\n+ * Enable/Disable vf vlan insert\n+ *\n+ * @param port\n+ *    The port identifier of the Ethernet device.\n+ * @param vf\n+ *    ID specifying VF.\n+ * @param vlan_id\n+ *    0 - Disable VF's vlan insert.\n+ *    n - Enable; n is inserted as the vlan id.\n+ *\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENODEV) if *port* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,\n+\t\t\t\t    uint16_t vlan_id);\n+\n #endif /* _PMD_I40E_H_ */\ndiff --git a/drivers/net/i40e/rte_pmd_i40e_version.map b/drivers/net/i40e/rte_pmd_i40e_version.map\nindex 2497b3e..e5e70e9 100644\n--- a/drivers/net/i40e/rte_pmd_i40e_version.map\n+++ b/drivers/net/i40e/rte_pmd_i40e_version.map\n@@ -14,5 +14,6 @@ DPDK_17.02 {\n \trte_pmd_i40e_set_vf_multicast_promisc;\n \trte_pmd_i40e_set_vf_mac_addr;\n \trte_pmd_i40e_set_vf_vlan_stripq;\n+\trte_pmd_i40e_set_vf_vlan_insert;\n \n } DPDK_2.0;\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "14/29"
    ]
}