DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] e1000: add firmware version get
@ 2016-11-17  9:42 Qiming Yang
  2016-11-17  9:42 ` [dpdk-dev] [PATCH 1/5] ethdev: " Qiming Yang
                   ` (7 more replies)
  0 siblings, 8 replies; 128+ messages in thread
From: Qiming Yang @ 2016-11-17  9:42 UTC (permalink / raw)
  To: dev; +Cc: remy.horton, jingjing.wu, jing.d.chen, Qiming Yang

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2fddf0c..c47f1c8 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -120,6 +120,8 @@ static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,
 				    unsigned limit);
 static void eth_igb_stats_reset(struct rte_eth_dev *dev);
 static void eth_igb_xstats_reset(struct rte_eth_dev *dev);
+static void eth_igb_fw_version_get(struct rte_eth_dev *dev,
+				   char *fw_version, int fw_length);
 static void eth_igb_infos_get(struct rte_eth_dev *dev,
 			      struct rte_eth_dev_info *dev_info);
 static const uint32_t *eth_igb_supported_ptypes_get(struct rte_eth_dev *dev);
@@ -388,6 +390,7 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.xstats_get_names     = eth_igb_xstats_get_names,
 	.stats_reset          = eth_igb_stats_reset,
 	.xstats_reset         = eth_igb_xstats_reset,
+	.fw_version_get       = eth_igb_fw_version_get,
 	.dev_infos_get        = eth_igb_infos_get,
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.mtu_set              = eth_igb_mtu_set,
@@ -1977,6 +1980,49 @@ eth_igbvf_stats_reset(struct rte_eth_dev *dev)
 }
 
 static void
+eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+		       int fw_length)
+{
+	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct e1000_fw_version fw;
+
+	e1000_get_fw_version(hw, &fw);
+
+	switch (hw->mac.type) {
+	case e1000_i210:
+	case e1000_i211:
+		if (!(e1000_get_flash_presence_i210(hw))) {
+			snprintf(fw_version, fw_length,
+				 "%2d.%2d-%d",
+				 fw.invm_major, fw.invm_minor,
+				 fw.invm_img_type);
+			break;
+		}
+		/* fall through */
+	default:
+		/* if option rom is valid, display its version too*/
+		if (fw.or_valid) {
+			snprintf(fw_version, fw_length,
+				 "%d.%d, 0x%08x, %d.%d.%d",
+				 fw.eep_major, fw.eep_minor, fw.etrack_id,
+				 fw.or_major, fw.or_build, fw.or_patch);
+		/* no option rom */
+		} else {
+			if (fw.etrack_id != 0X0000) {
+			snprintf(fw_version, fw_length,
+				 "%d.%d, 0x%08x",
+				 fw.eep_major, fw.eep_minor, fw.etrack_id);
+			} else {
+			snprintf(fw_version, fw_length,
+				 "%d.%d.%d",
+				 fw.eep_major, fw.eep_minor, fw.eep_build);
+			}
+		}
+		break;
+	}
+}
+
+static void
 eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 128+ messages in thread

end of thread, other threads:[~2017-02-09 21:32 UTC | newest]

Thread overview: 128+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-17  9:42 [dpdk-dev] [PATCH] e1000: add firmware version get Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH 1/5] ethdev: " Qiming Yang
2016-11-17 13:36   ` Thomas Monjalon
2016-11-18  2:10     ` Yang, Qiming
2016-11-18  1:09   ` Remy Horton
2016-11-18  2:18     ` Yang, Qiming
2016-12-06  7:16   ` [dpdk-dev] [PATCH v2 0/5] example/ethtool: add bus info and fw " Qiming Yang
2016-12-06  7:16     ` [dpdk-dev] [PATCH v2 1/5] ethdev: add firmware " Qiming Yang
2016-12-08 11:07       ` Ferruh Yigit
2016-12-12  1:28         ` Yang, Qiming
2016-12-06  7:16     ` [dpdk-dev] [PATCH v2 2/5] net/e1000: " Qiming Yang
2016-12-07  1:16       ` Lu, Wenzhuo
2016-12-06  7:16     ` [dpdk-dev] [PATCH v2 3/5] net/ixgbe: " Qiming Yang
2016-12-06  7:16     ` [dpdk-dev] [PATCH v2 4/5] net/i40e: " Qiming Yang
2016-12-06  7:16     ` [dpdk-dev] [PATCH v2 5/5] ethtool: dispaly bus info and firmware version Qiming Yang
2016-12-23 12:50       ` Ferruh Yigit
2016-12-27 13:06       ` [dpdk-dev] [PATCH v3] " Qiming Yang
2017-01-04  7:51         ` Wu, Jingjing
2017-01-04 12:18         ` [dpdk-dev] [PATCH v4] ethtool: dispaly bus information Qiming Yang
2017-01-04 14:49           ` Mcnamara, John
2017-01-05  1:51             ` Yang, Qiming
2017-02-09 21:32           ` Thomas Monjalon
2016-12-08  8:34     ` [dpdk-dev] [PATCH v2 0/5] example/ethtool: add bus info and fw version get Remy Horton
2016-12-12  1:43       ` Yang, Qiming
2016-12-22 11:07       ` Thomas Monjalon
2016-12-22 14:36         ` Ferruh Yigit
2016-12-22 14:47           ` Thomas Monjalon
2016-12-22 15:05             ` Ferruh Yigit
2016-12-22 15:31               ` Thomas Monjalon
2016-12-23 12:48                 ` Ferruh Yigit
2017-01-05  3:04                 ` Zhang, Helin
2016-12-27 12:30     ` [dpdk-dev] [PATCH v3 0/4] new API 'rte_eth_dev_fw_info_get' Qiming Yang
2016-12-27 12:30       ` [dpdk-dev] [PATCH v3 1/4] ethdev: add firmware information get Qiming Yang
2017-01-02 15:38         ` Thomas Monjalon
     [not found]           ` <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16EDC9515@SHSMSX101.ccr.corp.intel.com>
     [not found]             ` <10603884.vrshqR2O82@xps13>
2017-01-03  9:05               ` Yang, Qiming
2017-01-03 14:49                 ` Ferruh Yigit
2017-01-04  3:33                   ` Yang, Qiming
2017-01-04  7:48                     ` Wu, Jingjing
2017-01-04  8:43                       ` Ferruh Yigit
2017-01-05  1:04                         ` Wu, Jingjing
2017-01-03 14:58         ` Ferruh Yigit
2016-12-27 12:30       ` [dpdk-dev] [PATCH v3 2/4] net/e1000: add firmware version get Qiming Yang
2017-01-03 15:02         ` Ferruh Yigit
2017-01-04  3:14           ` Yang, Qiming
2017-01-04  8:47             ` Ferruh Yigit
2016-12-27 12:30       ` [dpdk-dev] [PATCH v3 3/4] net/ixgbe: " Qiming Yang
2017-01-03 15:04         ` Ferruh Yigit
2017-01-04  2:44           ` Yang, Qiming
2017-01-04  9:06             ` Ferruh Yigit
2017-01-04  9:48               ` Yang, Qiming
2017-01-04 12:01                 ` Ferruh Yigit
2016-12-27 12:30       ` [dpdk-dev] [PATCH v3 4/4] net/i40e: " Qiming Yang
2017-01-04 12:03       ` [dpdk-dev] [PATCH v4 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-04 12:03         ` [dpdk-dev] [PATCH v4 1/5] ethdev: add firmware version get Qiming Yang
2017-01-05 13:44           ` Thomas Monjalon
2017-01-08  3:09             ` Yang, Qiming
2017-01-04 12:03         ` [dpdk-dev] [PATCH v4 2/5] net/e1000: " Qiming Yang
2017-01-04 13:59           ` Ferruh Yigit
2017-01-05  1:50             ` Yang, Qiming
2017-01-04 12:03         ` [dpdk-dev] [PATCH v4 3/5] net/ixgbe: " Qiming Yang
2017-01-04 12:03         ` [dpdk-dev] [PATCH v4 4/5] net/i40e: " Qiming Yang
2017-01-04 14:00           ` Ferruh Yigit
2017-01-04 12:03         ` [dpdk-dev] [PATCH v4 5/5] ethtool: dispaly firmware version Qiming Yang
2017-01-04 14:00           ` Ferruh Yigit
2017-01-05  1:31             ` Yang, Qiming
2017-01-06 15:55               ` Remy Horton
2017-01-08  4:11         ` [dpdk-dev] [PATCH v5 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-08  4:11           ` [dpdk-dev] [PATCH v5 1/5] ethdev: add firmware version get Qiming Yang
2017-01-08  6:38             ` Andrew Rybchenko
2017-01-08 23:05             ` Stephen Hemminger
2017-01-09  7:16               ` Yang, Qiming
2017-01-09 10:01                 ` Remy Horton
2017-01-09 17:23                   ` Stephen Hemminger
2017-01-08  4:11           ` [dpdk-dev] [PATCH v5 2/5] net/e1000: " Qiming Yang
2017-01-08 23:03             ` Stephen Hemminger
2017-01-09  1:48               ` Yang, Qiming
2017-01-08  4:11           ` [dpdk-dev] [PATCH v5 3/5] net/ixgbe: " Qiming Yang
2017-01-08  4:11           ` [dpdk-dev] [PATCH v5 4/5] net/i40e: " Qiming Yang
2017-01-08 23:08             ` Stephen Hemminger
2017-01-08  4:11           ` [dpdk-dev] [PATCH v5 5/5] ethtool: display firmware version Qiming Yang
2017-01-08 23:11             ` Stephen Hemminger
2017-01-10  9:00           ` [dpdk-dev] [DPDK 1/5] ethdev: add firmware version get Qiming Yang
2017-01-10  9:00             ` [dpdk-dev] [DPDK 2/5] net/e1000: " Qiming Yang
2017-01-10  9:00             ` [dpdk-dev] [DPDK 3/5] net/ixgbe: " Qiming Yang
2017-01-10  9:08           ` [dpdk-dev] [PATCH v6 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-10  9:08             ` [dpdk-dev] [PATCH v6 1/5] ethdev: add firmware version get Qiming Yang
2017-01-11  6:41               ` [dpdk-dev] [PATCH v7 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-11  6:41                 ` [dpdk-dev] [PATCH v7 1/5] ethdev: add firmware version get Qiming Yang
2017-01-11  6:41                 ` [dpdk-dev] [PATCH v7 2/5] net/e1000: " Qiming Yang
2017-01-11 15:45                   ` Remy Horton
2017-01-12  1:25                     ` Yang, Qiming
2017-01-11  6:41                 ` [dpdk-dev] [PATCH v7 3/5] net/ixgbe: " Qiming Yang
2017-01-11  6:41                 ` [dpdk-dev] [PATCH v7 4/5] net/i40e: " Qiming Yang
2017-01-11  6:41                 ` [dpdk-dev] [PATCH v7 5/5] ethtool: display firmware version Qiming Yang
2017-01-12  6:31                 ` [dpdk-dev] [PATCH v8 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-12  6:31                   ` [dpdk-dev] [PATCH v8 1/5] ethdev: add firmware version get Qiming Yang
2017-01-15 20:56                     ` Thomas Monjalon
2017-01-16  5:44                     ` [dpdk-dev] [PATCH v9 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-16  5:44                       ` [dpdk-dev] [PATCH v9 1/5] ethdev: add firmware version get Qiming Yang
2017-01-16  7:05                         ` Andrew Rybchenko
2017-01-16  8:51                           ` Yang, Qiming
2017-01-16  5:44                       ` [dpdk-dev] [PATCH v9 2/5] net/e1000: " Qiming Yang
2017-01-16  5:44                       ` [dpdk-dev] [PATCH v9 3/5] net/ixgbe: " Qiming Yang
2017-01-16  5:44                       ` [dpdk-dev] [PATCH v9 4/5] net/i40e: " Qiming Yang
2017-01-16  5:44                       ` [dpdk-dev] [PATCH v9 5/5] ethtool: display firmware version Qiming Yang
2017-01-16 10:48                       ` [dpdk-dev] [PATCH v10 0/5] new API 'rte_eth_dev_fw_version_get' Qiming Yang
2017-01-16 10:48                         ` [dpdk-dev] [PATCH v10 1/5] ethdev: add firmware version get Qiming Yang
2017-01-16 10:48                         ` [dpdk-dev] [PATCH v10 2/5] net/e1000: " Qiming Yang
2017-01-16 10:48                         ` [dpdk-dev] [PATCH v10 3/5] net/ixgbe: " Qiming Yang
2017-01-16 10:48                         ` [dpdk-dev] [PATCH v10 4/5] net/i40e: " Qiming Yang
2017-01-16 10:48                         ` [dpdk-dev] [PATCH v10 5/5] ethtool: display firmware version Qiming Yang
2017-01-17 21:35                         ` [dpdk-dev] [PATCH v10 0/5] new API 'rte_eth_dev_fw_version_get' Thomas Monjalon
2017-01-12  6:31                   ` [dpdk-dev] [PATCH v8 2/5] net/e1000: add firmware version get Qiming Yang
2017-01-12  6:31                   ` [dpdk-dev] [PATCH v8 3/5] net/ixgbe: " Qiming Yang
2017-01-12  6:31                   ` [dpdk-dev] [PATCH v8 4/5] net/i40e: " Qiming Yang
2017-01-12  6:31                   ` [dpdk-dev] [PATCH v8 5/5] ethtool: display firmware version Qiming Yang
2017-01-10  9:08             ` [dpdk-dev] [PATCH v6 2/5] net/e1000: add firmware version get Qiming Yang
2017-01-10  9:08             ` [dpdk-dev] [PATCH v6 3/5] net/ixgbe: " Qiming Yang
2017-01-10  9:08             ` [dpdk-dev] [PATCH v6 4/5] net/i40e: " Qiming Yang
2017-01-10  9:08             ` [dpdk-dev] [PATCH v6 5/5] ethtool: display firmware version Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH] ethtool: dispaly bus info and " Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH] i40e: add firmware version get Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH] ixgbe: " Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH 2/5] e1000: " Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH 3/5] ixgbe: " Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH 4/5] i40e: " Qiming Yang
2016-11-17  9:42 ` [dpdk-dev] [PATCH 5/5] ethtool: dispaly bus info and firmware version Qiming Yang
2016-11-18  1:10   ` Remy Horton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).