From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E98645688 for ; Thu, 17 Nov 2016 10:46:52 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 17 Nov 2016 01:46:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,653,1473145200"; d="scan'208";a="1060591461" Received: from unknown (HELO dpdk7.bj.intel.com) ([172.16.182.76]) by orsmga001.jf.intel.com with ESMTP; 17 Nov 2016 01:46:48 -0800 From: Qiming Yang To: dev@dpdk.org Cc: remy.horton@intel.com, jingjing.wu@intel.com, jing.d.chen@intel.com, Qiming Yang Date: Thu, 17 Nov 2016 17:42:53 +0800 Message-Id: <1479375779-46629-3-git-send-email-qiming.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479375779-46629-1-git-send-email-qiming.yang@intel.com> References: <1479375779-46629-1-git-send-email-qiming.yang@intel.com> Subject: [dpdk-dev] [PATCH] ethtool: dispaly bus info and firmware version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 09:46:53 -0000 This patch enhances the ethtool-API to support to show the bus information and firmware version as same as kernel version ethtool displayed. Signed-off-by: Qiming Yang --- examples/ethtool/ethtool-app/ethapp.c | 2 ++ examples/ethtool/lib/rte_ethtool.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c index 38e466c..9b77385 100644 --- a/examples/ethtool/ethtool-app/ethapp.c +++ b/examples/ethtool/ethtool-app/ethapp.c @@ -184,6 +184,8 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params, printf("Port %i driver: %s (ver: %s)\n", id_port, info.driver, info.version ); + printf("bus-info: %s\n", info.bus_info); + printf("firmware-version: %s\n", info.fw_version); } } diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index a1f91d4..542179c 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -54,6 +54,9 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo) RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); + rte_eth_dev_fwver_get(port_id, drvinfo->fw_version, + sizeof(drvinfo->fw_version)); + memset(&dev_info, 0, sizeof(dev_info)); rte_eth_dev_info_get(port_id, &dev_info); -- 2.7.4