From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F5CFA057D; Wed, 18 Mar 2020 16:22:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4EA31AFF; Wed, 18 Mar 2020 16:22:45 +0100 (CET) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id BCC7CE07 for ; Wed, 18 Mar 2020 16:22:44 +0100 (CET) Received: by mail-lj1-f193.google.com with SMTP id u12so27526773ljo.2 for ; Wed, 18 Mar 2020 08:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=0IWJi+vTqWS0D8XBmZRsUucdAbDEb98k0U6l9vmyPRo=; b=DgT7+OzfeOa4dbdUAHELQLbCZNup79nnmikQe1SKANRvDpza8r/ZdLj5lFLNZpMzmn as3hvcaAVibg5enSwpkcInjUWMhXp749ya75Twrqy7/FhB5tFUxom+jftLRvar0XnA3m Bs7D/jJqVgSYudd4wHzMk3stwgDVEqifMU76UOCJCtjMvchISeOPUFdGc84XhJvXf5w0 aiofMoxtD+NdIoezQ3PcFHKNPJsrdm749SeSxQQYFTD83O72wqb49ioYYpnjg+KUWQdY 4YJXoPTjA12tqVGdqefYjpoPc3iW7uXCliwF/Gx6w0M8MufEPyIFphRDqf35pqvOsNed knDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0IWJi+vTqWS0D8XBmZRsUucdAbDEb98k0U6l9vmyPRo=; b=SzcdlLGKwVvj+OwI0j6Jr4IKPGO1CLYIVgOLfroI8Io2GAp/MdA9ZexjzKRuFXUroX N3q1hWOVIp2V2w9QqJyroBeV9noz9V15lskMGna4qh4LvstYsrdsDZ1n2/8/7PnA8Tln 79VJlEwh1pb8hEQ3bctaUvmbRskB/JDum2qP9wo6/3OmP+ZYuhIXGXJxdwJosI7CNmsP 2j8/rROYrpnXbsgyjcpKHtGRFj18nQgsyhcAZA9l7jrAMYy5nL6zAtZ2QqehDXjvs2uT /i300+oUrSL6VkNjFCIVDSltH5qstHuUCiaR43ZDNYCUzAgS6Oxyx09HJHiSDUuujXo0 aceA== X-Gm-Message-State: ANhLgQ3KOza4xveX6fVm1wP2BZakBLmvgqiQ3meBB1ITf2VAZprZqJCu qacpNrYUWhhuxbR75jbDiGCXzA== X-Google-Smtp-Source: ADFU+vtV8tYSdSwZCUOoYOTjgeFSMkIn3Mz6O8kk6zwPYr/WGuqE9DeTqxe7CuJZIEhLUo22XxFzdw== X-Received: by 2002:a2e:99ca:: with SMTP id l10mr2667104ljj.13.1584544964273; Wed, 18 Mar 2020 08:22:44 -0700 (PDT) Received: from localhost.localdomain ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id n12sm4428448lji.77.2020.03.18.08.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 08:22:43 -0700 (PDT) From: Muhammad Ahmad To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, ferruh.yigit@intel.com Cc: Muhammad Ahmad , dev@dpdk.org Date: Wed, 18 Mar 2020 20:22:27 +0500 Message-Id: <20200318152227.3931-1-muhammad.ahmad@emumba.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v2] testpmd: added rte_eth_dev_fw_version_get in testpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_eth_dev_fw_version_get() was not called in test pmd Added rte_eth_dev_fw_version_get() in testpmd under show port info Bugzilla ID: 225 Cc: dev@dpdk.org Reported-by: Thomas Monjalon Signed-off-by: Muhammad Ahmad --- app/test-pmd/config.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 8cf84ccd3..d0a59f6e7 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -52,6 +52,8 @@ #include "testpmd.h" +#define ETHDEV_FWVERS_LEN 32 + static char *flowtype_to_str(uint16_t flow_type); static const struct { @@ -523,6 +525,7 @@ port_infos_display(portid_t port_id) uint16_t mtu; char name[RTE_ETH_NAME_MAX_LEN]; int ret; + char fw_version[ETHDEV_FWVERS_LEN]; if (port_id_is_invalid(port_id, ENABLED_WARN)) { print_valid_ports(); @@ -544,6 +547,16 @@ port_infos_display(portid_t port_id) rte_eth_dev_get_name_by_port(port_id, name); printf("\nDevice name: %s", name); printf("\nDriver name: %s", dev_info.driver_name); + + ret = rte_eth_dev_fw_version_get(port_id, fw_version, ETHDEV_FWVERS_LEN); + if (ret < 0) + printf("\nFirmware version get error: (%s)", strerror(-ret)); + else if (ret > 0) + printf("\nInsufficient fw version buffer size, " + "the minimum size should be %d", ret); + else + printf("\nFirmware-version: %s", fw_version); + if (dev_info.device->devargs && dev_info.device->devargs->args) printf("\nDevargs: %s", dev_info.device->devargs->args); printf("\nConnect to socket: %u", port->socket_id); -- 2.17.1