Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/16229/?format=api
http://patches.dpdk.org/api/patches/16229/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1475158591-2243-2-git-send-email-bernard.iremonger@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": "<1475158591-2243-2-git-send-email-bernard.iremonger@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1475158591-2243-2-git-send-email-bernard.iremonger@intel.com", "date": "2016-09-29T14:16:29", "name": "[dpdk-dev,v5,1/3] librte_ether: add API for VF management", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7e3b3adeaf83f95d4994faf2e4b877c3c7531835", "submitter": { "id": 91, "url": "http://patches.dpdk.org/api/people/91/?format=api", "name": "Iremonger, Bernard", "email": "bernard.iremonger@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1475158591-2243-2-git-send-email-bernard.iremonger@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/16229/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/16229/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 39F435597;\n\tThu, 29 Sep 2016 16:16:45 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 6FA6A2C39\n\tfor <dev@dpdk.org>; Thu, 29 Sep 2016 16:16:43 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga102.fm.intel.com with ESMTP; 29 Sep 2016 07:16:42 -0700", "from sivswdev01.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.45])\n\tby fmsmga002.fm.intel.com with ESMTP; 29 Sep 2016 07:16:41 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.30,415,1470726000\"; d=\"scan'208\";\n\ta=\"1063982646\"", "From": "Bernard Iremonger <bernard.iremonger@intel.com>", "To": "dev@dpdk.org, rahul.r.shah@intel.com, wenzhuo.lu@intel.com,\n\taz5157@att.com", "Cc": "Bernard Iremonger <bernard.iremonger@intel.com>,\n\tazelezniak <alexz@att.com>", "Date": "Thu, 29 Sep 2016 15:16:29 +0100", "Message-Id": "<1475158591-2243-2-git-send-email-bernard.iremonger@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<1474453204-31516-1-git-send-email-bernard.iremonger@intel.com>", "References": "<1474453204-31516-1-git-send-email-bernard.iremonger@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 1/3] librte_ether: add API for VF management", "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": "Add new API function to configure and manage VF's on a NIC.\n\nadd rte_eth_dev_set_vf_vlan_stripq function.\n\nSigned-off-by: azelezniak <alexz@att.com>\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 27 +++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 23 ++++++++++++++++++++++-\n lib/librte_ether/rte_ether_version.map | 6 ++++++\n 3 files changed, 55 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 382c959..15e21ca 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -2489,6 +2489,33 @@ rte_eth_dev_set_vf_vlan_filter(uint8_t port_id, uint16_t vlan_id,\n \t\t\t\t\t\t vf_mask, vlan_on);\n }\n \n+int\n+rte_eth_dev_set_vf_vlan_stripq(uint8_t port_id, uint16_t vf, int on)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct rte_eth_dev_info dev_info;\n+\tuint16_t queues_per_pool;\n+\tuint32_t q;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port_id];\n+\trte_eth_dev_info_get(port_id, &dev_info);\n+\n+\tif (vf >= dev_info.max_vfs) {\n+\t\tRTE_PMD_DEBUG_TRACE(\"set VF vlan stripq: invalid VF %d\\n\", vf);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_strip_queue_set, -ENOTSUP);\n+\n+\tqueues_per_pool = dev_info.vmdq_queue_num/dev_info.max_vmdq_pools;\n+\n+\tfor (q = 0; q < queues_per_pool; q++)\n+\t\t(*dev->dev_ops->vlan_strip_queue_set)(dev, q + vf * queues_per_pool, on);\n+\treturn 0;\n+}\n+\n int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,\n \t\t\t\t\tuint16_t tx_rate)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 96575e8..fb2be45 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -3499,7 +3499,28 @@ rte_eth_dev_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,\n \t\t\t\tuint8_t vlan_on);\n \n /**\n- * Set a traffic mirroring rule on an Ethernet device\n+ * Enable/Disable vf vlan strip for all queues in a pool\n+ *\n+ * @param port\n+ * The port identifier of the Ethernet device.\n+ * @param vf\n+ * ID specifying VF.\n+ * @param on\n+ * 1 - Enable VF's vlan strip on RX queues.\n+ * 0 - Disable VF's vlan strip on RX queues.\n+ * @param queues_per_pool\n+ * The number of queues per pool.\n+ *\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENOTSUP) if hardware doesn't support this feature.\n+ * - (-ENODEV) if *port* invalid.\n+ * - (-EINVAL) if bad parameter.\n+ */\n+int\n+rte_eth_dev_set_vf_vlan_stripq(uint8_t port, uint16_t vf, int on);\n+\n+/** Set a traffic mirroring rule on an Ethernet device\n *\n * @param port_id\n * The port identifier of the Ethernet device.\ndiff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map\nindex 45ddf44..ae44074 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -139,3 +139,9 @@ DPDK_16.07 {\n \trte_eth_dev_get_port_by_name;\n \trte_eth_xstats_get_names;\n } DPDK_16.04;\n+\n+DPDK_16.11 {\n+\tglobal:\n+\n+\trte_eth_dev_set_vf_vlan_stripq;\n+} DPDK_16.07;\n", "prefixes": [ "dpdk-dev", "v5", "1/3" ] }{ "id": 16229, "url": "