DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs
@ 2020-07-27 13:44 Bruce Richardson
  2020-07-28 10:12 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2020-07-27 13:44 UTC (permalink / raw)
  To: thomas, anatoly.burakov; +Cc: dev, Bruce Richardson

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 <bruce.richardson@intel.com>
---
 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


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

* Re: [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs
  2020-07-27 13:44 [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs Bruce Richardson
@ 2020-07-28 10:12 ` Burakov, Anatoly
  2020-09-08 21:38   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2020-07-28 10:12 UTC (permalink / raw)
  To: Bruce Richardson, thomas; +Cc: dev

On 27-Jul-20 2:44 PM, Bruce Richardson wrote:
> 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 <bruce.richardson@intel.com>
> ---

We should probably get away from using legacy string formatting with % 
operator, but that's out of scope here :)

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs
  2020-07-28 10:12 ` Burakov, Anatoly
@ 2020-09-08 21:38   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-09-08 21:38 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Burakov, Anatoly

28/07/2020 12:12, Burakov, Anatoly:
> On 27-Jul-20 2:44 PM, Bruce Richardson wrote:
> > 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 <bruce.richardson@intel.com>
> > ---
> 
> We should probably get away from using legacy string formatting with % 
> operator, but that's out of scope here :)
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks



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

end of thread, other threads:[~2020-09-08 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 13:44 [dpdk-dev] [PATCH 20.11] usertools/dpdk-devbind: hide "if" value for non-network devs Bruce Richardson
2020-07-28 10:12 ` Burakov, Anatoly
2020-09-08 21:38   ` Thomas Monjalon

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).