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 BA3EDA0583; Fri, 20 Mar 2020 07:47:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A57412BB9; Fri, 20 Mar 2020 07:47:46 +0100 (CET) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 2EC86F90 for ; Fri, 20 Mar 2020 07:47:45 +0100 (CET) Received: by mail-lj1-f196.google.com with SMTP id g12so5254268ljj.3 for ; Thu, 19 Mar 2020 23:47:45 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=NccwooGfaR8wLsV/oT0JQiX1uw+ggabfdtbap70Q57s=; b=ckwxG5+Tbmwl5f6UKo9g8U9YTyluEymVvQUmh0KIjYE/zehaG5pNU+cGaYH72eN+ar GCUSWitv4ptDU3H96YYSWjz7kyB+KSiHv9xeEsIweOlio79v7D0lSW//itHGQxloDIzG gwdHOxNyGXPkeHMHdJQsW3m4awAks4uuPsKlK7DmPDibwx+SlwCxQ3wGN0CAaJppBZhQ q+O/7AWCxJynbICLEpiPc0j3rG75tBzMWx2NaPg8kOCMFROQ4VgSW3XjDbfEa0ui5D5k D0YN+Fb3eUjZWGHLwmtCcWRxiKHHRYolcN7ENsC5qnKdn18uXXQZB1PnSxGa7B/TwomJ qXRg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=NccwooGfaR8wLsV/oT0JQiX1uw+ggabfdtbap70Q57s=; b=tENg+IfCRyMSIf0zQffRZ7mJU1/BK9f+XjMSAp4vbGtCao2dGQ6S9J16/xz9nXU3Ef neZImJLbEw6jAkdXcGfyGDojkxQsmTwz54l9pA5T+b105Dhws3rUfeOEoRGVo6LRxP8J 6WG3Kea5ELnpao6ze8FK4YvQrS0Z9kzT1T/l5sUQ3c8g0U9AmSdXIH00gG1Mk916xYCY Itet3AVkub95Rtk9CEs4Ru/G/9QDjFMk5QL/ckMPlYrC/LZcfiz1ptUVlqWsI1jFm2nu NuA7kHobQ7Y9hSJy0crbdePdnEp1BpzOAyKK/Eoq2Xy8l00DQ2WmPMcRIWZL7nw6r/Hj 5Gmw== X-Gm-Message-State: ANhLgQ2suxoCdlycVZIQjYTUYV9CMEl6DdQZzaO3s9ZAeRdW+mRod5k+ /0yw9FeEe6Qp+Y3BzYBdV6ilNA== X-Google-Smtp-Source: ADFU+vtLQTUx1zXEubjfDEQjPoztMoUjYppzQYi+OmaLrjGsEAML4eEYCkxtwoyeuzSm4w60FIaGfg== X-Received: by 2002:a05:651c:233:: with SMTP id z19mr4133048ljn.176.1584686864644; Thu, 19 Mar 2020 23:47:44 -0700 (PDT) Received: from localhost.localdomain ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id r18sm2920112lji.16.2020.03.19.23.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 23:47:44 -0700 (PDT) From: Muhammad Ahmad To: wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, ferruh.yigit@intel.com Cc: kalesh-anakkur.purayil@broadcom.com, Muhammad Ahmad , dev@dpdk.org Date: Fri, 20 Mar 2020 11:46:00 +0500 Message-Id: <20200320064600.1240-1-muhammad.ahmad@emumba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200319074400.14139-1-muhammad.ahmad@emumba.com> References: <20200319074400.14139-1-muhammad.ahmad@emumba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4] app/testpmd: add fw version in port info 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 8cf84ccd3..66f3de908 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,13 @@ 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); + + if (rte_eth_dev_fw_version_get(port_id, fw_version, + ETHDEV_FWVERS_LEN) == 0) + printf("\nFirmware-version: %s", fw_version); + else + printf("\nFirmware-version: %s", "not available"); + 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