Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/22861/?format=api
https://patches.dpdk.org/api/patches/22861/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1490842311-96705-5-git-send-email-beilei.xing@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": "<1490842311-96705-5-git-send-email-beilei.xing@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1490842311-96705-5-git-send-email-beilei.xing@intel.com", "date": "2017-03-30T02:51:49", "name": "[dpdk-dev,v8,4/6] net/i40e: add get all loaded profiles", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9f38c92161fb498500cc3b25db917c77db88ed80", "submitter": { "id": 410, "url": "https://patches.dpdk.org/api/people/410/?format=api", "name": "Xing, Beilei", "email": "beilei.xing@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/1490842311-96705-5-git-send-email-beilei.xing@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/22861/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/22861/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 85D59FBCE;\n\tThu, 30 Mar 2017 08:04:25 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 31AB3FBE1\n\tfor <dev@dpdk.org>; Thu, 30 Mar 2017 04:53:05 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga105.jf.intel.com with ESMTP; 29 Mar 2017 19:53:04 -0700", "from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31])\n\tby fmsmga006.fm.intel.com with ESMTP; 29 Mar 2017 19:53:03 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.36,244,1486454400\"; d=\"scan'208\";a=\"82547056\"", "From": "Beilei Xing <beilei.xing@intel.com>", "To": "jingjing.wu@intel.com", "Cc": "helin.zhang@intel.com,\n\tdev@dpdk.org", "Date": "Thu, 30 Mar 2017 10:51:49 +0800", "Message-Id": "<1490842311-96705-5-git-send-email-beilei.xing@intel.com>", "X-Mailer": "git-send-email 2.5.5", "In-Reply-To": "<1490842311-96705-1-git-send-email-beilei.xing@intel.com>", "References": "<1490798651-116457-1-git-send-email-beilei.xing@intel.com>\n\t<1490842311-96705-1-git-send-email-beilei.xing@intel.com>", "Subject": "[dpdk-dev] [PATCH v8 4/6] net/i40e: add get all loaded profiles", "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": "This patch is to add get all loaded profiles function.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 28 ++++++++++++++++++++++++++++\n drivers/net/i40e/rte_pmd_i40e.h | 12 ++++++++++++\n drivers/net/i40e/rte_pmd_i40e_version.map | 1 +\n 3 files changed, 41 insertions(+)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex bd0ba78..0b28b13 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -11709,6 +11709,9 @@ rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map)\n \treturn ret;\n }\n \n+#define I40E_PROFILE_INFO_SIZE 48\n+#define I40E_MAX_PROFILE_NUM 16\n+\n static void\n i40e_generate_profile_info_sec(char *name, struct i40e_ddp_version *version,\n \t\t\t uint32_t track_id, uint8_t *profile_info_sec,\n@@ -11915,3 +11918,28 @@ rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,\n \trte_free(profile_info_sec);\n \treturn status;\n }\n+\n+int\n+rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size)\n+{\n+\tstruct rte_eth_dev *dev;\n+\tstruct i40e_hw *hw;\n+\tenum i40e_status_code status = I40E_SUCCESS;\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+\tif (size < (I40E_PROFILE_INFO_SIZE * I40E_MAX_PROFILE_NUM + 4))\n+\t\treturn -EINVAL;\n+\n+\thw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\n+\tstatus = i40e_aq_get_ddp_list(hw, (void *)buff,\n+\t\t\t\t size, 0, NULL);\n+\n+\treturn status;\n+}\ndiff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h\nindex 94dd92e..93cc56d 100644\n--- a/drivers/net/i40e/rte_pmd_i40e.h\n+++ b/drivers/net/i40e/rte_pmd_i40e.h\n@@ -476,4 +476,16 @@ int rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,\n \t\t\t\t uint32_t size,\n \t\t\t\t enum rte_pmd_i40e_package_op op);\n \n+/**\n+ * rte_pmd_i40e_get_ddp_list - Get loaded profile list\n+ * @port: port id\n+ * @buff: buffer for response\n+ * @size: buffer size\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENODEV) if *port* invalid.\n+ * - (-EINVAL) if bad parameter.\n+ */\n+int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);\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 6d001a3..dbb994e 100644\n--- a/drivers/net/i40e/rte_pmd_i40e_version.map\n+++ b/drivers/net/i40e/rte_pmd_i40e_version.map\n@@ -31,5 +31,6 @@ DPDK_17.05 {\n \trte_pmd_i40e_set_vf_tc_bw_alloc;\n \trte_pmd_i40e_set_vf_tc_max_bw;\n \trte_pmd_i40e_process_ddp_package;\n+\trte_pmd_i40e_get_ddp_list;\n \n } DPDK_17.02;\n", "prefixes": [ "dpdk-dev", "v8", "4/6" ] }{ "id": 22861, "url": "