Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/21154/?format=api
https://patches.dpdk.org/api/patches/21154/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170303015924.68986-2-qi.z.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": "<20170303015924.68986-2-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170303015924.68986-2-qi.z.zhang@intel.com", "date": "2017-03-03T01:59:23", "name": "[dpdk-dev,1/2] net/i40e: enable VF untag drop", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "473bcc58d25ade108da0b9c660e7221e64ef41e9", "submitter": { "id": 504, "url": "https://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@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/20170303015924.68986-2-qi.z.zhang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/21154/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/21154/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 EBF4D69C3;\n\tFri, 3 Mar 2017 02:08:51 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 721E23DC\n\tfor <dev@dpdk.org>; Fri, 3 Mar 2017 02:08:34 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Mar 2017 17:08:34 -0800", "from unknown (HELO localhost.localdomain.sh.intel.com)\n\t([10.239.129.167])\n\tby FMSMGA003.fm.intel.com with ESMTP; 02 Mar 2017 17:08:33 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.35,234,1484035200\"; d=\"scan'208\";a=\"830354701\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "jingjing.wu@intel.com,\n\thelin.zhang@intel.com", "Cc": "dev@dpdk.org,\n\tQi Zhang <qi.z.zhang@intel.com>", "Date": "Thu, 2 Mar 2017 20:59:23 -0500", "Message-Id": "<20170303015924.68986-2-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170303015924.68986-1-qi.z.zhang@intel.com>", "References": "<20170303015924.68986-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 1/2] net/i40e: enable VF untag drop", "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": "Add a new private API to support the untag drop enable/disable\nfor specific VF.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 49 +++++++++++++++++++++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h | 18 +++++++++++++++\n 2 files changed, 67 insertions(+)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 303027b..9915cb2 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -11212,3 +11212,52 @@ rte_pmd_i40e_reset_vf_stats(uint8_t port,\n \n \treturn 0;\n }\n+\n+int rte_pmd_i40e_set_vf_vlan_untag_drop(uint8_t port,\n+\t\t\t\t\tuint16_t vf_id,\n+\t\t\t\t\tuint8_t on)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct i40e_pf *pf;\n+\tstruct i40e_vsi *vsi;\n+\tstruct i40e_aqc_add_remove_vlan_element_data vlan_data = {0};\n+\tstruct i40e_hw *hw;\n+\tint ret;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port];\n+\n+\tif (!is_device_supported(dev, &rte_i40e_pmd))\n+\t\treturn -ENOTSUP;\n+\n+\tpf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\n+\tif (vf_id >= pf->vf_num || !pf->vfs) {\n+\t\tPMD_DRV_LOG(ERR, \"Invalid VF ID.\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tvsi = pf->vfs[vf_id].vsi;\n+\tif (!vsi) {\n+\t\tPMD_DRV_LOG(ERR, \"Invalid VSI.\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\thw = I40E_VSI_TO_HW(vsi);\n+\tvlan_data.vlan_tag = 0;\n+\tvlan_data.vlan_flags = 0x1;\n+\n+\tif (on) {\n+\t\tret = i40e_aq_add_vlan(hw, vsi->seid, &vlan_data, 1, NULL);\n+\t\tif (ret != I40E_SUCCESS)\n+\t\t\tPMD_DRV_LOG(ERR, \"Failed to add vlan filter\");\n+\t} else {\n+\t\tret = i40e_aq_remove_vlan(hw, vsi->seid,\n+\t\t\t\t\t&vlan_data, 1, NULL);\n+\t\tif (ret != I40E_SUCCESS)\n+\t\t\tPMD_DRV_LOG(ERR, \"Failed to remove vlan filter\");\n+\t}\n+\n+\treturn ret;\n+}\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex a0ad88c..895e2cc 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -332,4 +332,22 @@ int rte_pmd_i40e_get_vf_stats(uint8_t port,\n int rte_pmd_i40e_reset_vf_stats(uint8_t port,\n \t\t\t\tuint16_t vf_id);\n \n+/**\n+ * Enable/Disable VF untag drop\n+ *\n+ * @param port\n+ * The port identifier of the Ethernet device.\n+ * @param vf_id\n+ * VF on witch to enable/disable\n+ * @param on\n+ * Enable or Disable\n+ * @retura\n+ * - (0) if successful.\n+ * -(-ENODEVE) if *port* invalid\n+ * -(-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_i40e_set_vf_vlan_untag_drop(uint8_t port,\n+\t\t\t\t\tuint16_t vf_id,\n+\t\t\t\t\tuint8_t on);\n+\n #endif /* _PMD_I40E_H_ */\n", "prefixes": [ "dpdk-dev", "1/2" ] }{ "id": 21154, "url": "