Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/36362/?format=api
https://patches.dpdk.org/api/patches/36362/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1521630379-9554-2-git-send-email-zijie.pan@6wind.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": "<1521630379-9554-2-git-send-email-zijie.pan@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1521630379-9554-2-git-send-email-zijie.pan@6wind.com", "date": "2018-03-21T11:06:15", "name": "[dpdk-dev,v3,1/5] ethdev: add access to eeprom", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "1fd88f4f593d3c6c72631dff14f32cc908d0585c", "submitter": { "id": 991, "url": "https://patches.dpdk.org/api/people/991/?format=api", "name": "Zijie Pan", "email": "zijie.pan@6wind.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/1521630379-9554-2-git-send-email-zijie.pan@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/36362/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/36362/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4B1B75F33;\n\tWed, 21 Mar 2018 12:07:44 +0100 (CET)", "from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 91D085F17\n\tfor <dev@dpdk.org>; Wed, 21 Mar 2018 12:07:42 +0100 (CET)", "by mail-wm0-f67.google.com with SMTP id f125so8975911wme.4\n\tfor <dev@dpdk.org>; Wed, 21 Mar 2018 04:07:42 -0700 (PDT)", "from cougar.6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\tn23sm3708482wra.14.2018.03.21.04.07.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 21 Mar 2018 04:07:41 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=OQ4DaN1GxUGwyBW4AEF74v24gibFvvvGeO9qGYIs7lM=;\n\tb=p5K+K+9IxjQX6ovo46jNxFHkRBsDzWhyOLVHQQXt8VjU0/ghqOaU40j0XNMpDB+KAE\n\tJfcIRNTzCsuUd5f4ElmyRIksSjHcIng7lnjE/NnjvHidw/1Kd15Wov/zzxR7nettYR1f\n\tC6gyXi4bm9s8wK9KoHsJhrPW4EOXSWIzFsDC8GgDRh3fBBfy/vl+hj92X1MNyDVNN6K3\n\tqju5vb7tuEuaKvbDR1e56Dydlvr5EDImnRZAPhJDKN87Woa7BziW2wM4z5MRBq7+K8EB\n\t+A0cqf5XIo6p/4Q7mgedCDlxiGQFldaX3/KrIhgszNhTKCxIa72KW2LJuwmJn0Ia/ExV\n\tZyxA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=OQ4DaN1GxUGwyBW4AEF74v24gibFvvvGeO9qGYIs7lM=;\n\tb=kfj7Yi2qGBBiScOBTc2TOyn7rKDLkWQyEv506XRWINj/Ud7I1oIJM5lEEVqYgR3vJe\n\tcyTnETX0OhigfWKmDCwg0AKc/KeHDvjIwCHtblvfQLiJwjKBwIkq5kYRCMjcFUa/z1Xx\n\tnzqOuu04h1oS8VJlF34B5AD6O6PUnIuNEXMk213L1jKyfmWsA5WWtAeu70OhXhZUKuBO\n\tlOypPPmThKZ2I0OJWqxhwtnQtYm/PT5XDTXJF2KT2ETYdY7VgDwN+y6Wsyx+gxoZhCGj\n\tqGq8YcyW0KwiNQndRuF9XdVuOBnvUpeQQknlYUeUbesLLPFHck2d4skTIXZGEbL+bHPh\n\tNuEg==", "X-Gm-Message-State": "AElRT7EpN9iY1fRWz//J6c+rpLp8uEpIqiQSyJF859oXzLBnwgaUGl47\n\tjA52WYVILT39jvuAQ8RfVWSUwvae4sg=", "X-Google-Smtp-Source": "AG47ELt2YA+kYLnMlcr7f/aqV/SPsByPJefR48RlU2ki7VCvSqYAhgXHak/T4AezHhBdB+w7/qIE1A==", "X-Received": "by 10.28.193.65 with SMTP id r62mr2246044wmf.83.1521630462031;\n\tWed, 21 Mar 2018 04:07:42 -0700 (PDT)", "From": "Zijie Pan <zijie.pan@6wind.com>", "To": "dev@dpdk.org", "Cc": "remy.horton@intel.com, john.mcnamara@intel.com, marko.kovacevic@intel.com,\n\tthomas@monjalon.net", "Date": "Wed, 21 Mar 2018 12:06:15 +0100", "Message-Id": "<1521630379-9554-2-git-send-email-zijie.pan@6wind.com>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<1521630379-9554-1-git-send-email-zijie.pan@6wind.com>", "References": "<1521193010-25050-1-git-send-email-zijie.pan@6wind.com>\n\t<1521630379-9554-1-git-send-email-zijie.pan@6wind.com>", "Subject": "[dpdk-dev] [PATCH v3 1/5] ethdev: add access to eeprom", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://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": "<https://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 APIs:\n- rte_eth_dev_get_module_info\n- rte_eth_dev_get_module_eeprom\n\nSigned-off-by: Zijie Pan <zijie.pan@6wind.com>\nAcked-by: Remy Horton <remy.horton@intel.com>\n---\nCc: remy.horton@intel.com\nCc: john.mcnamara@intel.com\nCc: marko.kovacevic@intel.com\nCc: thomas@monjalon.net\n\n doc/guides/nics/features.rst | 11 ++++++++++\n lib/librte_ether/rte_dev_info.h | 18 ++++++++++++++++\n lib/librte_ether/rte_ethdev.c | 26 +++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 35 +++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev_core.h | 12 +++++++++++\n lib/librte_ether/rte_ethdev_version.map | 2 ++\n 6 files changed, 104 insertions(+)", "diff": "diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst\nindex 1b4fb97..bb183e2 100644\n--- a/doc/guides/nics/features.rst\n+++ b/doc/guides/nics/features.rst\n@@ -749,6 +749,17 @@ Supports getting/setting device eeprom data.\n ``rte_eth_dev_set_eeprom()``.\n \n \n+.. _nic_features_module_eeprom_dump:\n+\n+Module EEPROM dump\n+------------------\n+\n+Supports getting information and data of plugin module eeprom.\n+\n+* **[implements] eth_dev_ops**: ``get_module_info``, ``get_module_eeprom``.\n+* **[related] API**: ``rte_eth_dev_get_module_info()``, ``rte_eth_dev_get_module_eeprom()``.\n+\n+\n .. _nic_features_register_dump:\n \n Registers dump\ndiff --git a/lib/librte_ether/rte_dev_info.h b/lib/librte_ether/rte_dev_info.h\nindex 6b68584..c15a0fa 100644\n--- a/lib/librte_ether/rte_dev_info.h\n+++ b/lib/librte_ether/rte_dev_info.h\n@@ -28,4 +28,22 @@ struct rte_dev_eeprom_info {\n \tuint32_t magic; /**< Device-specific key, such as device-id */\n };\n \n+/*\n+ * Placeholder for accessing plugin module eeprom\n+ */\n+struct rte_dev_module_info {\n+\tuint32_t type; /**< Type of plugin module eeprom */\n+\tuint32_t eeprom_len; /**< Length of plugin module eeprom */\n+};\n+\n+/* EEPROM Standards for plug in modules */\n+#define ETH_MODULE_SFF_8079 0x1\n+#define ETH_MODULE_SFF_8079_LEN 256\n+#define ETH_MODULE_SFF_8472 0x2\n+#define ETH_MODULE_SFF_8472_LEN 512\n+#define ETH_MODULE_SFF_8636 0x3\n+#define ETH_MODULE_SFF_8636_LEN 256\n+#define ETH_MODULE_SFF_8436 0x4\n+#define ETH_MODULE_SFF_8436_LEN 256\n+\n #endif /* _RTE_DEV_INFO_H_ */\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 0590f0c..b83643d 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -4044,6 +4044,32 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n }\n \n int\n+rte_eth_dev_get_module_info(uint16_t port_id,\n+\t\t\t struct rte_dev_module_info *modinfo)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_info, -ENOTSUP);\n+\treturn (*dev->dev_ops->get_module_info)(dev, modinfo);\n+}\n+\n+\tint\n+rte_eth_dev_get_module_eeprom(uint16_t port_id,\n+\t\tstruct rte_dev_eeprom_info *info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_eeprom, -ENOTSUP);\n+\treturn (*dev->dev_ops->get_module_eeprom)(dev, info);\n+}\n+\n+int\n rte_eth_dev_get_dcb_info(uint16_t port_id,\n \t\t\t struct rte_eth_dcb_info *dcb_info)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 0361533..e8b1d94 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -3262,6 +3262,41 @@ int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);\n \n /**\n+ * Retrieve the type and size of plugin module EEPROM\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param modinfo\n+ * The type and size of plugin module EEPROM.\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENOTSUP) if hardware doesn't support.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-EIO) if device is removed.\n+ * - others depends on the specific operations implementation.\n+ */\n+int rte_eth_dev_get_module_info(uint16_t port_id,\n+\t\t\t\tstruct rte_dev_module_info *modinfo);\n+\n+/**\n+ * Retrieve the data of plugin module EEPROM\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param info\n+ * The template includes the plugin module EEPROM attributes, and the\n+ * buffer for return plugin module EEPROM data.\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENOTSUP) if hardware doesn't support.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-EIO) if device is removed.\n+ * - others depends on the specific operations implementation.\n+ */\n+int rte_eth_dev_get_module_eeprom(uint16_t port_id,\n+\t\t\t\t struct rte_dev_eeprom_info *info);\n+\n+/**\n * Set the list of multicast addresses to filter on an Ethernet device.\n *\n * @param port_id\ndiff --git a/lib/librte_ether/rte_ethdev_core.h b/lib/librte_ether/rte_ethdev_core.h\nindex e5681e4..26b5704 100644\n--- a/lib/librte_ether/rte_ethdev_core.h\n+++ b/lib/librte_ether/rte_ethdev_core.h\n@@ -337,6 +337,14 @@ typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_dev_eeprom_info *info);\n /**< @internal Program eeprom data */\n \n+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_dev_module_info *modinfo);\n+/**< @internal Retrieve type and size of plugin module eeprom */\n+\n+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_dev_eeprom_info *info);\n+/**< @internal Retrieve plugin module eeprom data */\n+\n typedef int (*eth_l2_tunnel_eth_type_conf_t)\n \t(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);\n /**< @internal config l2 tunnel ether type */\n@@ -467,6 +475,10 @@ struct eth_dev_ops {\n \teth_get_eeprom_t get_eeprom; /**< Get eeprom data. */\n \teth_set_eeprom_t set_eeprom; /**< Set eeprom. */\n \n+\teth_get_module_info_t get_module_info;\n+\t/** Get plugin module eeprom attribute. */\n+\teth_get_module_eeprom_t get_module_eeprom;\n+\t/** Get plugin module eeprom data. */\n \n \teth_filter_ctrl_t filter_ctrl; /**< common filter control. */\n \ndiff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map\nindex 87f02fb..ae4b2ad 100644\n--- a/lib/librte_ether/rte_ethdev_version.map\n+++ b/lib/librte_ether/rte_ethdev_version.map\n@@ -201,6 +201,8 @@ DPDK_18.02 {\n \tglobal:\n \n \trte_eth_dev_filter_ctrl;\n+\trte_eth_dev_get_module_info;\n+\trte_eth_dev_get_module_eeprom;\n \n } DPDK_17.11;\n \n", "prefixes": [ "dpdk-dev", "v3", "1/5" ] }{ "id": 36362, "url": "