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 01972A053A; Mon, 27 Jul 2020 15:44:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D542C1BFDD; Mon, 27 Jul 2020 15:44:41 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 77E281BFCF for ; Mon, 27 Jul 2020 15:44:39 +0200 (CEST) IronPort-SDR: 0QPX+5usZtix15/gwe0yup6gkS0hC9kKMxrBYNwQ1y+MmYTM0IzpsBTGb3WEcQ5K8lyNyCWYLp 2O8rtLSBM+ow== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="150994394" X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="150994394" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2020 06:44:38 -0700 IronPort-SDR: 18gZwuUwAAHmOJ5h2fzwjG8X5+r+D1zkB5ZNyzL/NNPidHnPtPjvnIz04gBiyQ2Sq1iycpzPaU cvJkekItzm+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="464063513" Received: from silpixa00399126.ir.intel.com ([10.237.222.36]) by orsmga005.jf.intel.com with ESMTP; 27 Jul 2020 06:44:37 -0700 From: Bruce Richardson To: thomas@monjalon.net, anatoly.burakov@intel.com Cc: dev@dpdk.org, Bruce Richardson Date: Mon, 27 Jul 2020 14:44:27 +0100 Message-Id: <20200727134427.29896-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs 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" The "if", or interface, field in the status display of dpdk-devbind is only relevant for network interfaces, so don't display it for other device types. Signed-off-by: Bruce Richardson --- usertools/dpdk-devbind.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 35d4384041..8b466b2185 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -585,7 +585,7 @@ def display_devices(title, dev_list, extra_params=None): strings.sort() print("\n".join(strings)) # print one per line -def show_device_status(devices_type, device_name): +def show_device_status(devices_type, device_name, if_field=False): global dpdk_drivers kernel_drv = [] dpdk_drv = [] @@ -617,8 +617,11 @@ def show_device_status(devices_type, device_name): display_devices("%s devices using DPDK-compatible driver" % device_name, dpdk_drv, "drv=%(Driver_str)s unused=%(Module_str)s") if len(kernel_drv) != 0: + if_text = "" + if if_field: + if_text = "if=%(Interface)s " display_devices("%s devices using kernel driver" % device_name, kernel_drv, - "if=%(Interface)s drv=%(Driver_str)s " + if_text + "drv=%(Driver_str)s " "unused=%(Module_str)s %(Active)s") if len(no_drv) != 0: display_devices("Other %s devices" % device_name, no_drv, @@ -630,7 +633,7 @@ def show_status(): kernel driver or to no driver''' if status_dev == "net" or status_dev == "all": - show_device_status(network_devices, "Network") + show_device_status(network_devices, "Network", if_field=True) if status_dev == "baseband" or status_dev == "all": show_device_status(baseband_devices, "Baseband") -- 2.25.1