Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/19368/?format=api
https://patches.dpdk.org/api/patches/19368/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1484545498-33882-2-git-send-email-qiming.yang@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": "<1484545498-33882-2-git-send-email-qiming.yang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1484545498-33882-2-git-send-email-qiming.yang@intel.com", "date": "2017-01-16T05:44:54", "name": "[dpdk-dev,v9,1/5] ethdev: add firmware version get", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "38935cde26d8ce159fe8339b42d87644c4e53639", "submitter": { "id": 522, "url": "https://patches.dpdk.org/api/people/522/?format=api", "name": "Qiming Yang", "email": "qiming.yang@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1484545498-33882-2-git-send-email-qiming.yang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/19368/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/19368/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 3A122FA6B;\n\tMon, 16 Jan 2017 06:51:33 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 640E8FA5C\n\tfor <dev@dpdk.org>; Mon, 16 Jan 2017 06:50:58 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 15 Jan 2017 21:50:58 -0800", "from unknown (HELO dpdk7.bj.intel.com) ([172.16.182.76])\n\tby fmsmga001.fm.intel.com with ESMTP; 15 Jan 2017 21:50:56 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.33,237,1477983600\"; d=\"scan'208\";\n\ta=\"1094587001\"", "From": "Qiming Yang <qiming.yang@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas.monjalon@6wind.com, ferruh.yigit@intel.com,\n\tQiming Yang <qiming.yang@intel.com>", "Date": "Mon, 16 Jan 2017 13:44:54 +0800", "Message-Id": "<1484545498-33882-2-git-send-email-qiming.yang@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1484545498-33882-1-git-send-email-qiming.yang@intel.com>", "References": "<1484202716-41669-2-git-send-email-qiming.yang@intel.com>\n\t<1484545498-33882-1-git-send-email-qiming.yang@intel.com>", "Subject": "[dpdk-dev] [PATCH v9 1/5] ethdev: add firmware version get", "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 adds a new API 'rte_eth_dev_fw_version_get' for\nfetching firmware version by a given device.\n\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\nAcked-by: Remy Horton <remy.horton@intel.com>\n---\n doc/guides/nics/features/default.ini | 1 +\n doc/guides/rel_notes/deprecation.rst | 4 ----\n doc/guides/rel_notes/release_17_02.rst | 5 +++++\n lib/librte_ether/rte_ethdev.c | 12 ++++++++++++\n lib/librte_ether/rte_ethdev.h | 26 ++++++++++++++++++++++++++\n lib/librte_ether/rte_ether_version.map | 1 +\n 6 files changed, 45 insertions(+), 4 deletions(-)", "diff": "diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex f1bf9bf..ae40d57 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -50,6 +50,7 @@ Timesync =\n Basic stats =\n Extended stats =\n Stats per queue =\n+FW version =\n EEPROM dump =\n Registers dump =\n Multiprocess aware =\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex 054e2e7..755dc65 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -30,10 +30,6 @@ Deprecation Notices\n ``nb_seg_max`` and ``nb_mtu_seg_max`` providing information about number of\n segments limit to be transmitted by device for TSO/non-TSO packets.\n \n-* In 17.02 ABI change is planned: the ``rte_eth_dev_info`` structure\n- will be extended with a new member ``fw_version`` in order to store\n- the NIC firmware version.\n-\n * ethdev: an API change is planned for 17.02 for the function\n ``_rte_eth_dev_callback_process``. In 17.02 the function will return an ``int``\n instead of ``void`` and a fourth parameter ``void *ret_param`` will be added.\ndiff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst\nindex 5762d3f..f9134bb 100644\n--- a/doc/guides/rel_notes/release_17_02.rst\n+++ b/doc/guides/rel_notes/release_17_02.rst\n@@ -66,6 +66,11 @@ New Features\n Support for Mellanox ConnectX-5 family of 10/25/40/50/100 Gbps adapters\n has been added to the existing mlx5 PMD.\n \n+* **Added firmware version get API.**\n+\n+ Added a new function ``rte_eth_dev_fw_version_get()`` to fetch firmware\n+ version by a given device.\n+\n Resolved Issues\n ---------------\n \ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 917557a..89cffcf 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1588,6 +1588,18 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,\n \t\t\tSTAT_QMAP_RX);\n }\n \n+int\n+rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fw_version_get, -ENOTSUP);\n+\treturn (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_size);\n+}\n+\n void\n rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex ded43d7..37a55ef 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1177,6 +1177,10 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,\n typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n /**< @internal Check DD bit of specific RX descriptor */\n \n+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,\n+\t\t\t\t char *fw_version, size_t fw_size);\n+/**< @internal Get firmware information of an Ethernet device. */\n+\n typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n \tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n \n@@ -1459,6 +1463,7 @@ struct eth_dev_ops {\n \teth_dev_infos_get_t dev_infos_get; /**< Get device info. */\n \teth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */\n \teth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */\n+\teth_fw_version_get_t fw_version_get; /**< Get firmware version. */\n \teth_dev_supported_ptypes_get_t dev_supported_ptypes_get;\n \t/**< Get packet types supported and identified by device. */\n \n@@ -2396,6 +2401,27 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);\n void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);\n \n /**\n+ * Retrieve the firmware version of a device.\n+ *\n+ * @param port_id\n+ * The port identifier of the device.\n+ * @param fw_version\n+ * A array pointer to store the firmware version of a device,\n+ * allocated by caller.\n+ * @param fw_size\n+ * The size of the array pointed by fw_version, which should be\n+ * large enough to store firmware version of the device.\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENOTSUP) if operation is not supported.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (>0) if *fw_size* is not enough to store firmware version, return\n+ * the size of the non truncated string.\n+ */\n+int rte_eth_dev_fw_version_get(uint8_t port_id,\n+\t\t\t char *fw_version, size_t fw_size);\n+\n+/**\n * Retrieve the supported packet types of an Ethernet device.\n *\n * When a packet type is announced as supported, it *must* be recognized by\ndiff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map\nindex 0c2859e..c6c9d0d 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -146,6 +146,7 @@ DPDK_17.02 {\n \tglobal:\n \n \t_rte_eth_dev_reset;\n+\trte_eth_dev_fw_version_get;\n \trte_flow_create;\n \trte_flow_destroy;\n \trte_flow_flush;\n", "prefixes": [ "dpdk-dev", "v9", "1/5" ] }{ "id": 19368, "url": "